mali-applet-ui 1.0.85 → 1.0.86
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-list-select-page" :class="[className || '', {'is-border': border}]" @tap="tapEvent">
|
|
2
|
+
<view class="ml-list-select-page" :class="[className || '', {'is-border': border, 'is-disabled': disabled}]" @tap="tapEvent">
|
|
3
3
|
<view class="ml-list-select-page-warpper">
|
|
4
4
|
<view v-if="hasEmpty" class="ml-list-select-page-placeholder">{{ placeholder }}</view>
|
|
5
5
|
<view v-else>
|
|
@@ -38,6 +38,7 @@ export default {
|
|
|
38
38
|
type: String,
|
|
39
39
|
default: '请选择'
|
|
40
40
|
},
|
|
41
|
+
disabled: Boolean,
|
|
41
42
|
border: Boolean,
|
|
42
43
|
clearable: Boolean,
|
|
43
44
|
className: String
|
|
@@ -64,17 +65,20 @@ export default {
|
|
|
64
65
|
return XEUtils.eqNull(this.value) || this.value === ''
|
|
65
66
|
},
|
|
66
67
|
selectLabel () {
|
|
68
|
+
let rest = []
|
|
67
69
|
if (this.type === 'checkbox') {
|
|
68
|
-
|
|
70
|
+
rest = this.dataList.filter(item => this.value.includes(item[this.optValueField]))
|
|
71
|
+
} else if (this.type === 'radio') {
|
|
72
|
+
rest = this.dataList.filter(item => this.value === item[this.optValueField])
|
|
69
73
|
}
|
|
70
|
-
|
|
71
|
-
return this.dataList.filter(item => this.value === item[this.optValueField]).map(item => item[this.optLabelField]).join(', ')
|
|
72
|
-
}
|
|
73
|
-
return ''
|
|
74
|
+
return rest.map(item => item[this.optLabelField]).join(',')
|
|
74
75
|
}
|
|
75
76
|
},
|
|
76
77
|
methods: {
|
|
77
78
|
tapEvent () {
|
|
79
|
+
if (this.disabled) {
|
|
80
|
+
return
|
|
81
|
+
}
|
|
78
82
|
// 打开选择列表页面
|
|
79
83
|
this.$store.dispatch('openSelectPage', {
|
|
80
84
|
compName: this.compRender.name, // 指定加载组件名称
|
|
@@ -112,6 +116,9 @@ export default {
|
|
|
112
116
|
padding: 0 10rpx;
|
|
113
117
|
height: 70rpx;
|
|
114
118
|
line-height: 70rpx;
|
|
119
|
+
&.is-disabled {
|
|
120
|
+
|
|
121
|
+
}
|
|
115
122
|
.ml-list-select-page-warpper {
|
|
116
123
|
flex-grow: 1;
|
|
117
124
|
overflow: hidden;
|