mali-applet-ui 1.1.64 → 1.1.65
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,7 +3,7 @@
|
|
|
3
3
|
<view class="ml-list-select-page-warpper">
|
|
4
4
|
<view v-if="hasEmpty" class="ml-list-select-page-placeholder">{{ readonly ? '' : placeholder }}</view>
|
|
5
5
|
<view v-else>
|
|
6
|
-
<slot :items="
|
|
6
|
+
<slot :items="selectRowList">
|
|
7
7
|
<view>{{ selectLabel }}</view>
|
|
8
8
|
</slot>
|
|
9
9
|
</view>
|
|
@@ -27,6 +27,7 @@ export default {
|
|
|
27
27
|
name: 'MlListSelectPage',
|
|
28
28
|
props: {
|
|
29
29
|
value: [Array, Number, String],
|
|
30
|
+
selectRows: Array,
|
|
30
31
|
defaultOptions: Array,
|
|
31
32
|
options: Array,
|
|
32
33
|
optionProps: Object,
|
|
@@ -72,11 +73,11 @@ export default {
|
|
|
72
73
|
}
|
|
73
74
|
return XEUtils.eqNull(this.value) || this.value === ''
|
|
74
75
|
},
|
|
75
|
-
|
|
76
|
+
selectRowList () {
|
|
76
77
|
return this.getSelectRows(this.value)
|
|
77
78
|
},
|
|
78
79
|
selectLabel () {
|
|
79
|
-
return this.
|
|
80
|
+
return this.selectRowList.map(item => item[this.optLabelField]).join(',')
|
|
80
81
|
}
|
|
81
82
|
},
|
|
82
83
|
watch: {
|
|
@@ -115,6 +116,7 @@ export default {
|
|
|
115
116
|
value = this.value.filter(key => key !== item[this.optValueField])
|
|
116
117
|
}
|
|
117
118
|
this.$emit('input', value)
|
|
119
|
+
this.$emit('update:selectRows', this.getSelectRows(value))
|
|
118
120
|
},
|
|
119
121
|
tapEvent () {
|
|
120
122
|
if (this.showAddBtn || this.disabled) {
|
|
@@ -144,6 +146,7 @@ export default {
|
|
|
144
146
|
// 点击确认事件
|
|
145
147
|
confirm: (params) => {
|
|
146
148
|
this.$emit('input', params.value)
|
|
149
|
+
this.$emit('update:selectRows', params.selectRows)
|
|
147
150
|
this.$emit('change', params)
|
|
148
151
|
}
|
|
149
152
|
}
|