diff --git a/nezha-fronted/src/components/common/rightBox/setting/globalizationBox.vue b/nezha-fronted/src/components/common/rightBox/setting/globalizationBox.vue index 975f1f6e3..3ec576b00 100644 --- a/nezha-fronted/src/components/common/rightBox/setting/globalizationBox.vue +++ b/nezha-fronted/src/components/common/rightBox/setting/globalizationBox.vue @@ -144,9 +144,6 @@ export default { this.$get('/sys/dict/all', { type: 'lang' }).then(response => { if (response.code === 200) { this.languageList = response.data - if (!this.editGlobalization.id) { - this.languageList[1].value = 'en' - } } else { this.$message.error(response.msg) } @@ -163,6 +160,9 @@ export default { handler (n, o) { this.isEdit = true this.editGlobalization = JSON.parse(JSON.stringify(n)) + if (!this.editGlobalization.id) { + this.languageList[1].value = 'en' + } } } } diff --git a/nezha-fronted/src/components/common/rightBox/setting/globalizationBox.vue.rej b/nezha-fronted/src/components/common/rightBox/setting/globalizationBox.vue.rej new file mode 100644 index 000000000..5b9ce7a8f --- /dev/null +++ b/nezha-fronted/src/components/common/rightBox/setting/globalizationBox.vue.rej @@ -0,0 +1,10 @@ +diff a/nezha-fronted/src/components/common/rightBox/setting/globalizationBox.vue b/nezha-fronted/src/components/common/rightBox/setting/globalizationBox.vue (rejected hunks) +@@ -145,7 +145,7 @@ + if (response.code === 200) { + this.languageList = response.data + if (!this.editGlobalization.id) { +- this.languageList[0].value = 'en' ++ this.languageList[1].value = 'en' + } + } else { + this.$message.error(response.msg)