【更新】修改多语种小瑕疵

pull/166/head
小诺 1 year ago committed by 俞宝山
parent 423f7985b0
commit c09fd7ba00

@ -10,5 +10,5 @@
const store = globalStore()
store.initTheme()
const locale = i18n.global.messages[i18n.global.locale].lang
const locale = i18n.global.messages.value[i18n.global.locale.value].lang
</script>

@ -57,7 +57,6 @@
import { createVNode } from 'vue'
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'
import { Modal } from 'ant-design-vue'
import i18n from '@/locales/index'
import screenFull from 'screenfull'
import { message } from 'ant-design-vue'
import Setting from './setting.vue'
@ -68,6 +67,8 @@
import DevUserMessage from './message.vue'
import PanelSearch from './panel-search/index.vue'
import { globalStore } from '@/store'
import { useI18n } from 'vue-i18n'
const { locale } = useI18n()
const lang = ref(new Array(tool.data.get('APP_LANG') || config.LANG))
const settingDialog = ref(false)
@ -142,7 +143,7 @@
const handleIn18 = (key) => {
lang.value = []
lang.value.push(key)
i18n.locale = key
locale.value = key
tool.data.set('APP_LANG', key)
}
//

@ -28,6 +28,7 @@ export const messages = {
}
const i18n = createI18n({
legacy: false,
locale: tool.data.get('APP_LANG') || sysConfig.LANG,
fallbackLocale: 'zh-cn',
globalInjection: true,

Loading…
Cancel
Save