fix:系统国际化支持

This commit is contained in:
zhonghua 2026-04-03 14:55:27 +08:00
parent 764f6eec4b
commit 4a70bc7d43
2 changed files with 11 additions and 1 deletions

View File

@ -1,11 +1,16 @@
<template>
<a-config-provider :theme="themeConfig">
<a-config-provider :locale="locale" :theme="themeConfig">
<router-view />
</a-config-provider>
</template>
<script setup lang="ts">
import { ConfigProviderProps } from "ant-design-vue"
import zhCN from "ant-design-vue/es/locale/zh_CN"
import type { Locale } from "ant-design-vue/es/locale"
// ant-design-vue
const locale: Locale = zhCN
//
//

View File

@ -9,6 +9,11 @@ import router from "./router"
import { useAuthStore } from "./stores/auth"
import { setupPermissionDirective } from "./directives/permission"
// 引入 dayjs 及其中文语言包
import dayjs from "dayjs"
import "dayjs/locale/zh-cn"
dayjs.locale("zh-cn")
const app = createApp(App)
const pinia = createPinia()