修复了关于与插件的语言
This commit is contained in:
10
src/App.vue
10
src/App.vue
@@ -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
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user