fix: 修复语言设置逻辑问题

This commit is contained in:
chenjinsong
2023-08-09 18:32:52 +08:00
parent 00ab7e5991
commit 1d9214a5a1
4 changed files with 11 additions and 19 deletions

View File

@@ -2,15 +2,9 @@ import { createI18n } from 'vue-i18n/index'
import { storageKey } from '@/utils/constants'
import { getI18n } from '@/utils/api'
import store from '@/store'
// import cn from './cn'
// import en from './en'
const i18n = createI18n({
locale: localStorage.getItem(storageKey.language) || 'en'
/* messages: {
cn: cn,
en: en
} */
})
export async function loadI18n () {
if (!store.state.i18n) {