fix:系统国际化支持
This commit is contained in:
parent
764f6eec4b
commit
4a70bc7d43
@ -1,11 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-config-provider :theme="themeConfig">
|
<a-config-provider :locale="locale" :theme="themeConfig">
|
||||||
<router-view />
|
<router-view />
|
||||||
</a-config-provider>
|
</a-config-provider>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ConfigProviderProps } from "ant-design-vue"
|
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
|
||||||
|
|
||||||
// 乐绘世界创想活动乐园 — 主题配置
|
// 乐绘世界创想活动乐园 — 主题配置
|
||||||
// 风格:活泼、艺术、少儿绘本创作
|
// 风格:活泼、艺术、少儿绘本创作
|
||||||
|
|||||||
@ -9,6 +9,11 @@ import router from "./router"
|
|||||||
import { useAuthStore } from "./stores/auth"
|
import { useAuthStore } from "./stores/auth"
|
||||||
import { setupPermissionDirective } from "./directives/permission"
|
import { setupPermissionDirective } from "./directives/permission"
|
||||||
|
|
||||||
|
// 引入 dayjs 及其中文语言包
|
||||||
|
import dayjs from "dayjs"
|
||||||
|
import "dayjs/locale/zh-cn"
|
||||||
|
dayjs.locale("zh-cn")
|
||||||
|
|
||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
const pinia = createPinia()
|
const pinia = createPinia()
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user