FIX 国际化切换不能及时应用

This commit is contained in:
sc 2022-08-09 10:57:17 +08:00
parent 31ecae89e4
commit cff0dd9b1f
1 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<el-config-provider :locale="config.locale" :size="config.size" :zIndex="config.zIndex" :button="config.button"> <el-config-provider :locale="locale" :size="config.size" :zIndex="config.zIndex" :button="config.button">
<router-view></router-view> <router-view></router-view>
</el-config-provider> </el-config-provider>
</template> </template>
@ -12,7 +12,6 @@
data() { data() {
return { return {
config: { config: {
locale: this.$i18n.messages[this.$i18n.locale].el,
size: "default", size: "default",
zIndex: 2000, zIndex: 2000,
button: { button: {
@ -21,6 +20,11 @@
} }
} }
}, },
computed: {
locale(){
return this.$i18n.messages[this.$i18n.locale].el
},
},
created() { created() {
// //
const app_color = this.$CONFIG.COLOR || this.$TOOL.data.get('APP_COLOR') const app_color = this.$CONFIG.COLOR || this.$TOOL.data.get('APP_COLOR')