初始化项目

This commit is contained in:
18500206848
2024-02-02 15:04:47 +08:00
parent 12664d0204
commit 7aec486f06
718 changed files with 152280 additions and 1 deletions

28
src/lang/index.js Normal file
View File

@@ -0,0 +1,28 @@
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import elementEnLocale from 'element-ui/lib/locale/lang/en' // element-ui lang
import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN'// element-ui lang
import enLocale from './en'
import zhLocale from './zh'
import { getStore } from '@/util/store'
import Avue from '@smallwei/avue';
Vue.use(VueI18n)
const messages = {
en: {
...enLocale,
...elementEnLocale,
...Avue.locale.en,
},
zh: {
...zhLocale,
...elementZhLocale,
...Avue.locale.zh,
}
}
const i18n = new VueI18n({
locale: getStore({ name: 'language' }) || 'zh',
messages
})
export default i18n