t20-common-lib 0.15.32 → 0.15.34
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
|
@@ -40,10 +40,6 @@ export default {
|
|
|
40
40
|
type: [Boolean, Array, Number],
|
|
41
41
|
defalut: false,
|
|
42
42
|
},
|
|
43
|
-
multiple:{
|
|
44
|
-
type:Boolean,
|
|
45
|
-
default:false
|
|
46
|
-
},
|
|
47
43
|
items: {
|
|
48
44
|
type: Object,
|
|
49
45
|
defalut: () => {
|
|
@@ -63,22 +59,15 @@ export default {
|
|
|
63
59
|
handler(value,oldV){
|
|
64
60
|
if(JSON.stringify(value)!==JSON.stringify(oldV)){
|
|
65
61
|
if(!value) return this.upDateValue=[];
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
this.upDateValue=[
|
|
63
|
+
{
|
|
68
64
|
unitNo:this.value,
|
|
69
65
|
unitName:this.label
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
this.upDateValue=value.map((item,index)=>{
|
|
73
|
-
return {
|
|
74
|
-
unitNo:item,
|
|
75
|
-
unitName:this.label?.split(',')?.[index]
|
|
76
|
-
}
|
|
77
|
-
})
|
|
78
|
-
}
|
|
66
|
+
}
|
|
67
|
+
];
|
|
79
68
|
this.$nextTick(()=>{
|
|
80
|
-
|
|
81
|
-
|
|
69
|
+
this.$refs?.unitRef?.upDateShowValue()
|
|
70
|
+
})
|
|
82
71
|
}
|
|
83
72
|
},
|
|
84
73
|
immediate:true
|
|
@@ -90,7 +79,7 @@ export default {
|
|
|
90
79
|
return this.value;
|
|
91
80
|
},
|
|
92
81
|
set(value) {
|
|
93
|
-
if(Array.isArray(value)
|
|
82
|
+
if(Array.isArray(value)){
|
|
94
83
|
this.$emit("input", value[0]);
|
|
95
84
|
}else{
|
|
96
85
|
this.$emit("input", value)
|
|
@@ -99,24 +88,16 @@ export default {
|
|
|
99
88
|
},
|
|
100
89
|
},
|
|
101
90
|
methods: {
|
|
102
|
-
dataChange(item) {
|
|
91
|
+
dataChange(item, type) {
|
|
103
92
|
//item一直是数组
|
|
104
93
|
if (Array.isArray(item) && item.length) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
this.$emit("change", item);
|
|
108
|
-
} else {
|
|
109
|
-
this.$emit(`update:label`, item[0].unitName);
|
|
110
|
-
this.$emit("change", item);
|
|
111
|
-
}
|
|
94
|
+
this.$emit(`update:label`, item[0].unitName);
|
|
95
|
+
this.$emit("change", item[0].unitNo, item, { type });
|
|
112
96
|
} else {
|
|
113
97
|
this.$emit(`update:label`, "");
|
|
114
|
-
this.$emit("change", []);
|
|
98
|
+
this.$emit("change", null, [], { type });
|
|
115
99
|
}
|
|
116
100
|
},
|
|
117
101
|
},
|
|
118
102
|
};
|
|
119
|
-
</script>
|
|
120
|
-
|
|
121
|
-
<style>
|
|
122
|
-
</style>
|
|
103
|
+
</script>
|
|
@@ -36,13 +36,14 @@
|
|
|
36
36
|
:label.sync="formData[group.prop][item.nameProp]"
|
|
37
37
|
v-bind="item.props"
|
|
38
38
|
@change="
|
|
39
|
-
(val, option) =>
|
|
39
|
+
(val, option, args) =>
|
|
40
40
|
$emit('change', {
|
|
41
41
|
val,
|
|
42
42
|
option,
|
|
43
43
|
groupProp: group.prop,
|
|
44
44
|
item,
|
|
45
45
|
group,
|
|
46
|
+
args
|
|
46
47
|
})
|
|
47
48
|
"
|
|
48
49
|
@dialogChange="
|