NEZ-1164 fix: 登录页支持国际化

This commit is contained in:
chenjinsong
2021-11-04 12:13:36 +08:00
parent 14dc417a8a
commit f87c8d4c53
8 changed files with 49 additions and 123 deletions

View File

@@ -122,7 +122,13 @@ export default {
if (res.code === 200) {
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') })
this.esc(true)
this.$emit('clickProfile')
if (this.editProfile.lang !== localStorage.getItem('nz-language')) {
localStorage.setItem('nz-language', this.editProfile.lang)
this.$i18n.locale = this.editProfile.lang
this.$emit('clickProfile', true)
} else {
this.$emit('clickProfile', false)
}
} else {
this.$message.error(res.msg)
}