Commit 93eef44d authored by 水落(YangLei)'s avatar 水落(YangLei)

feat: 优化国际化异常的问题

parent e7671869
<template>
<a-dropdown class="lang header-item">
<div><a-icon type="global" /> {{ langAlias }}</div>
<a-menu @click="changeLang" :selected-keys="[lang]" slot="overlay">
<a-menu @click="change" :selected-keys="[lang]" slot="overlay">
<a-menu-item v-for="lang in langList" :key="lang.key">
{{ lang.key.toLowerCase() + ' ' + lang.name }}
</a-menu-item>
......@@ -27,10 +27,9 @@ export default {
},
},
methods: {
change(langKey) {
this.$i18n.locale = langKey;
this.lang = langKey;
langUtils.set(langKey);
change({ key }) {
langUtils.set(key);
window.location.reload();
},
},
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment