init: 初始系统模板

This commit is contained in:
TsMask
2023-09-05 14:38:23 +08:00
parent a5bc16ae4f
commit 1075c8ae4f
130 changed files with 22531 additions and 1 deletions

16
src/i18n/index.ts Normal file
View File

@@ -0,0 +1,16 @@
import { createI18n } from 'vue-i18n';
import { localGet } from '@/utils/cache-local-utils';
import { CACHE_LOCAL_I18N } from '@/constants/cache-keys-constants';
import zhCN from './locales/zh-CN';
import enUS from './locales/en-US';
const i18n = createI18n({
legacy: false, // 使用 Composition API 的方式创建 i18n 实例
locale: localGet(CACHE_LOCAL_I18N) || 'zh_CN', // 默认显示语言
messages: {
zh_CN: zhCN,
en_US: enUS,
},
});
export default i18n;