mali-applet-ui 1.0.101 → 1.0.102
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.
|
@@ -2,7 +2,16 @@
|
|
|
2
2
|
<view class="ml-list-select-group" :class="[className || '', type ? `type-${type}` : '']">
|
|
3
3
|
<slot>
|
|
4
4
|
<ml-list-group :border="border">
|
|
5
|
-
<ml-list-item
|
|
5
|
+
<ml-list-item
|
|
6
|
+
v-for="(item, index) in options"
|
|
7
|
+
:key="index"
|
|
8
|
+
:value="item[optValueField]"
|
|
9
|
+
:disabled="!!item[optDisabledField]"
|
|
10
|
+
:padding="false"
|
|
11
|
+
suffixIcon="none"
|
|
12
|
+
@disabled-click="disabledClickEvent(item)">
|
|
13
|
+
{{ item[optLabelField] }}
|
|
14
|
+
</ml-list-item>
|
|
6
15
|
</ml-list-group>
|
|
7
16
|
</slot>
|
|
8
17
|
</view>
|
|
@@ -54,6 +63,9 @@ export default {
|
|
|
54
63
|
},
|
|
55
64
|
optValueField () {
|
|
56
65
|
return this.optOptions.value || 'value'
|
|
66
|
+
},
|
|
67
|
+
optDisabledField () {
|
|
68
|
+
return this.optOptions.disabled || 'disabled'
|
|
57
69
|
}
|
|
58
70
|
},
|
|
59
71
|
watch: {
|
|
@@ -168,6 +180,9 @@ export default {
|
|
|
168
180
|
this.selectValue = null
|
|
169
181
|
this.updateChecked()
|
|
170
182
|
},
|
|
183
|
+
disabledClickEvent (item) {
|
|
184
|
+
this.$emit('disabled-click', { option: item })
|
|
185
|
+
},
|
|
171
186
|
triggerItemEvent (params) {
|
|
172
187
|
const { value: label } = params
|
|
173
188
|
if (this.type === 'checkbox') {
|