mali-applet-ui 1.0.101 → 1.0.103
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.
|
@@ -147,6 +147,7 @@ export default {
|
|
|
147
147
|
},
|
|
148
148
|
tapEvent () {
|
|
149
149
|
if (this.disabled) {
|
|
150
|
+
this.$emit('disabled-click', { value: this.value })
|
|
150
151
|
return
|
|
151
152
|
}
|
|
152
153
|
if (this.listSelectGroup) {
|
|
@@ -212,7 +213,6 @@ export default {
|
|
|
212
213
|
overflow: hidden;
|
|
213
214
|
text-overflow: ellipsis;
|
|
214
215
|
white-space: nowrap;
|
|
215
|
-
color: rgba(0, 0, 0, 0.45);
|
|
216
216
|
}
|
|
217
217
|
&.is-vertical {
|
|
218
218
|
.ml-list-item-content {
|
|
@@ -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') {
|