n20-common-lib 3.3.10 → 3.3.12
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
CHANGED
|
@@ -104,8 +104,8 @@ export default {
|
|
|
104
104
|
let typeEnum = (type) => {
|
|
105
105
|
switch (type) {
|
|
106
106
|
case 'text':
|
|
107
|
+
case 'input':
|
|
107
108
|
case 'number':
|
|
108
|
-
case 'text':
|
|
109
109
|
case 'numberrange':
|
|
110
110
|
return $lc('请输入')
|
|
111
111
|
case 'select':
|
|
@@ -369,6 +369,7 @@ export default {
|
|
|
369
369
|
switch (item.type) {
|
|
370
370
|
case 'search':
|
|
371
371
|
case 'text':
|
|
372
|
+
case 'input':
|
|
372
373
|
elementDom = h(
|
|
373
374
|
'el-input',
|
|
374
375
|
{
|
|
@@ -802,8 +803,9 @@ export default {
|
|
|
802
803
|
elementDom = h('el-input', {
|
|
803
804
|
attrs: {
|
|
804
805
|
style: {
|
|
805
|
-
width: calcTextWidth(item
|
|
806
|
+
width: calcTextWidth(item, form[item.value])
|
|
806
807
|
},
|
|
808
|
+
title: form[item.value],
|
|
807
809
|
ruleField: true,
|
|
808
810
|
'rule-form': 'ruleValidate',
|
|
809
811
|
rules: item.rules,
|
|
@@ -812,32 +814,28 @@ export default {
|
|
|
812
814
|
maxlength: item.props && item.props.maxlength,
|
|
813
815
|
minlength: item.props && item.props.minlength
|
|
814
816
|
},
|
|
815
|
-
on: {
|
|
816
|
-
blur: this.handleBlur,
|
|
817
|
-
clear: this.handleClear
|
|
818
|
-
},
|
|
819
817
|
directives: [
|
|
820
818
|
{
|
|
821
819
|
name: 'rule-key'
|
|
822
820
|
}
|
|
823
821
|
],
|
|
824
822
|
props: {
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
},
|
|
828
|
-
domProps: {
|
|
829
|
-
value: form[item.value]
|
|
823
|
+
clearable: (item.props && item.props.clearable) ?? true,
|
|
824
|
+
...item.props
|
|
830
825
|
},
|
|
831
826
|
model: {
|
|
832
827
|
value: form[item.value],
|
|
833
828
|
callback: (value) => {
|
|
834
829
|
this.$set(form, item.value, value)
|
|
830
|
+
this.handleChange(value)
|
|
835
831
|
}
|
|
836
832
|
},
|
|
833
|
+
on: {
|
|
834
|
+
blur: this.handleBlur,
|
|
835
|
+
clear: this.handleClear,
|
|
836
|
+
...item.on
|
|
837
|
+
},
|
|
837
838
|
nativeOn: {
|
|
838
|
-
input: (event) => {
|
|
839
|
-
form[item.value] = event.target.value
|
|
840
|
-
},
|
|
841
839
|
keyup
|
|
842
840
|
}
|
|
843
841
|
})
|
package/src/utils/auth.js
CHANGED
|
@@ -52,7 +52,15 @@ const auth = {
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
setReqLang() {
|
|
55
|
-
let langMap = {
|
|
55
|
+
let langMap = {
|
|
56
|
+
'zh-cn': 'zh_CN',
|
|
57
|
+
en: 'en_US',
|
|
58
|
+
'zh-hk': 'zh_TW',
|
|
59
|
+
th: 'th_TH',
|
|
60
|
+
vi: 'vi_VN',
|
|
61
|
+
ja: 'ja_JP',
|
|
62
|
+
es: 'es_ES'
|
|
63
|
+
}
|
|
56
64
|
let langKey = window.localStorage.getItem('pageLang') || 'zh-cn'
|
|
57
65
|
reqLang = langMap[langKey]
|
|
58
66
|
},
|