n20-common-lib 3.3.9 → 3.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/DateChoose/index.vue +4 -1
- package/src/components/Layout/HeaderWrap/index.vue +11 -10
- package/src/components/Layout/HeaderWrap/indexN.vue +5 -1
- package/src/components/LoginTemporary/indexN.vue +3 -1
- package/src/i18n.json +4060 -1810
- package/src/utils/amountInWords.js +1 -0
- package/src/utils/auth.js +1 -1
- package/src/utils/i18n/index.js +4 -0
package/src/utils/auth.js
CHANGED
|
@@ -52,7 +52,7 @@ const auth = {
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
setReqLang() {
|
|
55
|
-
let langMap = { 'zh-cn': 'zh_CN', en: 'en_US', 'zh-hk': 'zh_TW', th: 'th_TH', vi: 'vi_VI', ja: 'ja_JP' }
|
|
55
|
+
let langMap = { 'zh-cn': 'zh_CN', en: 'en_US', 'zh-hk': 'zh_TW', th: 'th_TH', vi: 'vi_VI', ja: 'ja_JP', es: 'es_ES' }
|
|
56
56
|
let langKey = window.localStorage.getItem('pageLang') || 'zh-cn'
|
|
57
57
|
reqLang = langMap[langKey]
|
|
58
58
|
},
|
package/src/utils/i18n/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import locale from 'element-ui/lib/locale'
|
|
2
2
|
import langEn from 'element-ui/lib/locale/lang/en'
|
|
3
|
+
import langEs from 'element-ui/lib/locale/lang/es'
|
|
3
4
|
import langTh from 'element-ui/lib/locale/lang/th'
|
|
4
5
|
import langVi from 'element-ui/lib/locale/lang/vi'
|
|
5
6
|
import langTw from 'element-ui/lib/locale/lang/zh-TW'
|
|
@@ -48,6 +49,9 @@ const directive = {}
|
|
|
48
49
|
directive.install = (Vue, map = {}) => {
|
|
49
50
|
if (pageLang === 'en') {
|
|
50
51
|
locale.use(langEn)
|
|
52
|
+
} else if (pageLang === 'es') {
|
|
53
|
+
// 与组件库语言键保持一致,同步切换 Element UI 内置文案。
|
|
54
|
+
locale.use(langEs)
|
|
51
55
|
} else if (pageLang === 'zh-hk') {
|
|
52
56
|
locale.use(langTw)
|
|
53
57
|
} else if (pageLang === 'th') {
|