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