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.
@@ -3,6 +3,7 @@ import Nzh from 'nzh'
3
3
 
4
4
  export const convert = (
5
5
  money,
6
+ // 人民币大写字符表按字符索引读取;西班牙语等语言也须保留中文字符,不能翻译成单词。
6
7
  options = {
7
8
  ch: $lc("零壹贰叁肆伍陆柒捌玖"), // 数字字符
8
9
  ch_u: $lc("个拾佰仟万亿兆京"), // 数位单位字符,万以下十进制,万以上万进制,个位不能省略
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
  },
@@ -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') {