修复了关于与插件的语言

This commit is contained in:
2020-10-31 14:47:50 +08:00
parent 61f471600e
commit 547cab2ac0
4 changed files with 72 additions and 17 deletions

View File

@@ -3,7 +3,7 @@
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
</div> -->
<a-config-provider :locale="locale">
<a-config-provider :locale="len.$s() == 'zh' ? zh : en">
<router-view/>
</a-config-provider>
</template>
@@ -20,7 +20,7 @@ import zhCN from 'ant-design-vue/es/locale/zh_CN';
export default defineComponent({
setup(){
console.log(i18ninit)
provideI18n(i18ninit);
const len = provideI18n(i18ninit);
if(getValue('token')){
store.commit("login", true)
store.dispatch("setUserInfo");
@@ -29,8 +29,12 @@ export default defineComponent({
store.dispatch("getip");
router.push("/")
}
const zh = zhCN
const en = enUS
return{
locale: zhCN
zh,
en,
len
}
}
})