NEZ-1164 fix: 登录页支持国际化
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import locale from 'element-ui/lib/locale'
|
||||
import VueI18n from 'vue-i18n'
|
||||
import { get } from '@/http'
|
||||
// import messages from './language'
|
||||
Vue.use(VueI18n)
|
||||
// 从localStorage获取语言选择。
|
||||
@@ -15,14 +16,6 @@ export function loadI18n (i18nData) {
|
||||
Object.keys(i18nData).forEach(lang => {
|
||||
i18n.setLocaleMessage(lang, i18nData[lang])
|
||||
})
|
||||
} else {
|
||||
i18nData = localStorage.getItem('nz-i18n-data')
|
||||
if (i18nData) {
|
||||
i18nData = JSON.parse(i18nData)
|
||||
Object.keys(i18nData).forEach(lang => {
|
||||
i18n.setLocaleMessage(lang, i18nData[lang])
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
export default i18n
|
||||
|
||||
Reference in New Issue
Block a user