From 1cac99f208393c6e9fd4798bc5d750d67a4f3a8c Mon Sep 17 00:00:00 2001 From: "@changcode" Date: Wed, 3 Nov 2021 15:36:54 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=20i18n=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/rightBox/setting/globalizationBox.vue | 6 +++--- .../common/rightBox/setting/globalizationBox.vue.rej | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 nezha-fronted/src/components/common/rightBox/setting/globalizationBox.vue.rej 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)