Browse Source

fix:将历史记录日历修改为中文

dxj
杜贤金 1 year ago
parent
commit
f87e071fb7
  1. 3
      src/components/AppRecharge/index.vue
  2. 1
      src/store/moules/userStore/index.ts
  3. 9
      src/views/task/components/HisTory/index.vue

3
src/components/AppRecharge/index.vue

@ -813,8 +813,7 @@ function separator(num: number | string) {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.dotnum { .dotnum {
font-size: 20px; font-size: 18px;
font-weight: 800; font-weight: 800;
color: #6b2d01; color: #6b2d01;
letter-spacing: 1px; letter-spacing: 1px;

1
src/store/moules/userStore/index.ts

@ -55,7 +55,6 @@ export const useUserStore = defineStore('useUserStore', {
getChatInfoFun() { getChatInfoFun() {
chatInfo().then((res) => { chatInfo().then((res) => {
console.log(res, 'sotre')
this.setChatInfo(crypto.encryptAES(JSON.stringify(res), crypto.localKey)) this.setChatInfo(crypto.encryptAES(JSON.stringify(res), crypto.localKey))
}) })
}, },

9
src/views/task/components/HisTory/index.vue

@ -1,11 +1,13 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref, watchEffect } from 'vue' import { ref, watchEffect } from 'vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
import { Button, Calendar } from 'ant-design-vue' import { Button, Calendar } from 'ant-design-vue'
import { import {
LeftOutlined, LeftOutlined,
RightOutlined, RightOutlined,
} from '@ant-design/icons-vue' } from '@ant-design/icons-vue'
import zhCN from 'ant-design-vue/lib/locale/zh_CN'
import type { HistoryType } from './index.d' import type { HistoryType } from './index.d'
import { history } from '@/api/task/index' import { history } from '@/api/task/index'
@ -15,7 +17,13 @@ const props = defineProps({
default: false, default: false,
}, },
}) })
const emit = defineEmits(['handleHsigns']) const emit = defineEmits(['handleHsigns'])
dayjs.locale('zh-cn')
const china = zhCN.Calendar
const data = ref(dayjs()) const data = ref(dayjs())
const yam = ref(dayjs(data.value).format('YYYY-MM')) // yyyy-MM const yam = ref(dayjs(data.value).format('YYYY-MM')) // yyyy-MM
const datesData = ref<HistoryType[]>([]) // const datesData = ref<HistoryType[]>([]) //
@ -99,6 +107,7 @@ const getCellTypeClass = function (value: { $D: number }) {
<Calendar <Calendar
v-model:value="data" v-model:value="data"
:fullscreen="false" :fullscreen="false"
:locale="china"
> >
<template #headerRender="{ value }"> <template #headerRender="{ value }">
<div class="header"> <div class="header">

Loading…
Cancel
Save