feat: Support dayjs and component library in multiple languages
This commit is contained in:
@@ -5,15 +5,11 @@ import { GlobalProvider } from '@vben/widgets';
|
||||
import { preferences, usePreferences } from '@vben-core/preferences';
|
||||
|
||||
import { App, ConfigProvider, theme } from 'ant-design-vue';
|
||||
import zhCN from 'ant-design-vue/es/locale/zh_CN';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
import 'dayjs/locale/zh-cn';
|
||||
import { antdLocale } from '#/forward';
|
||||
|
||||
defineOptions({ name: 'App' });
|
||||
|
||||
dayjs.locale(zhCN.locale);
|
||||
|
||||
const { isDark } = usePreferences();
|
||||
|
||||
const tokenTheme = computed(() => {
|
||||
@@ -35,7 +31,7 @@ const tokenTheme = computed(() => {
|
||||
|
||||
<template>
|
||||
<GlobalProvider>
|
||||
<ConfigProvider :locale="zhCN" :theme="tokenTheme">
|
||||
<ConfigProvider :locale="antdLocale" :theme="tokenTheme">
|
||||
<App>
|
||||
<RouterView />
|
||||
</App>
|
||||
|
Reference in New Issue
Block a user