CN-1307 fix: 在 Administration> Appearance页面将Default language切换成中文后,页面语言仍为英文
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
import { api } from '@/utils/api'
|
||||
import { storageKey } from '@/utils/constants'
|
||||
import axios from 'axios'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
export default {
|
||||
name: 'Appearance',
|
||||
@@ -173,6 +174,10 @@ export default {
|
||||
localStorage.setItem(storageKey.timezoneOffset, window.$dayJs.tz().utcOffset() / 60)
|
||||
localStorage.setItem(storageKey.timezoneLocalOffset, dayjs().utcOffset() / 60)
|
||||
}
|
||||
if (this.appearanceObject.lang !== localStorage.getItem(storageKey.language)) {
|
||||
localStorage.setItem(storageKey.language, this.appearanceObject.lang)
|
||||
}
|
||||
window.location.reload()
|
||||
} else {
|
||||
this.$message.error(response.message)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user