|
@@ -16,7 +16,7 @@
|
|
|
:class="['lang-item', { active: curLang === type }]"
|
|
|
@click="curLang = type"
|
|
|
>
|
|
|
- {{ langList.find((item) => item.type === type).name }}
|
|
|
+ {{ langList.find((item) => item.type === type)?.name }}
|
|
|
</li>
|
|
|
<li class="lang-item" @click="showAddLang">
|
|
|
<i class="el-icon-plus"></i>
|
|
@@ -109,6 +109,9 @@ export default {
|
|
|
},
|
|
|
visible: {
|
|
|
handler(newVal) {
|
|
|
+ if (newVal && this.langList.length === 0) {
|
|
|
+ this.init();
|
|
|
+ }
|
|
|
if (!newVal && this.selectedLangList.length > 0) {
|
|
|
this.selectedLangList = this.selectedLangList.map((item) => ({
|
|
|
type: item.type,
|