mali-applet-ui 1.0.93 → 1.0.95
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.
|
@@ -66,7 +66,10 @@ export default {
|
|
|
66
66
|
return XEUtils.eqNull(this.value) || this.value === ''
|
|
67
67
|
},
|
|
68
68
|
selectRows () {
|
|
69
|
-
|
|
69
|
+
if (this.type === 'checkbox') {
|
|
70
|
+
return this.dataList.filter(item => this.value.includes(item[this.optValueField]))
|
|
71
|
+
}
|
|
72
|
+
return this.dataList.filter(item => this.value === item[this.optValueField])
|
|
70
73
|
}
|
|
71
74
|
},
|
|
72
75
|
methods: {
|
|
@@ -103,7 +106,10 @@ export default {
|
|
|
103
106
|
})
|
|
104
107
|
},
|
|
105
108
|
removeItem (item) {
|
|
106
|
-
|
|
109
|
+
let value = null
|
|
110
|
+
if (this.type === 'checkbox') {
|
|
111
|
+
value = this.value.filter(key => key !== item[this.optValueField])
|
|
112
|
+
}
|
|
107
113
|
this.$emit('input', value)
|
|
108
114
|
this.$emit('change', { value })
|
|
109
115
|
},
|
|
@@ -128,7 +134,7 @@ export default {
|
|
|
128
134
|
display: flex;
|
|
129
135
|
flex-direction: row;
|
|
130
136
|
flex-wrap: wrap;
|
|
131
|
-
min-height:
|
|
137
|
+
min-height: 76rpx;
|
|
132
138
|
}
|
|
133
139
|
.ml-list-select-user-item {
|
|
134
140
|
display: flex;
|
|
@@ -164,17 +164,17 @@ export default {
|
|
|
164
164
|
}
|
|
165
165
|
},
|
|
166
166
|
mounted () {
|
|
167
|
-
const { autoload,
|
|
167
|
+
const { autoload, requestLazy } = this
|
|
168
168
|
if (autoload) {
|
|
169
|
-
|
|
169
|
+
requestLazy()
|
|
170
170
|
}
|
|
171
171
|
},
|
|
172
172
|
methods: {
|
|
173
173
|
async handleIntoChildren (item) {
|
|
174
|
-
const {
|
|
174
|
+
const { requestLazy } = this
|
|
175
175
|
if (!(item.children && item.children.length) && !item.isLeaf) {
|
|
176
176
|
// this.lazyLoading = true
|
|
177
|
-
await
|
|
177
|
+
await requestLazy(item)
|
|
178
178
|
// this.lazyLoading = false
|
|
179
179
|
}
|
|
180
180
|
if (item.children && item.children.length) {
|
|
@@ -182,7 +182,11 @@ export default {
|
|
|
182
182
|
this.$emit('into', this.cache[this.cache.length - 1])
|
|
183
183
|
}
|
|
184
184
|
},
|
|
185
|
-
|
|
185
|
+
reloadLazy () {
|
|
186
|
+
const { current } = this
|
|
187
|
+
this.requestLazy(current)
|
|
188
|
+
},
|
|
189
|
+
async requestLazy (current) {
|
|
186
190
|
const { lazyLoad, lazy, useProps } = this
|
|
187
191
|
if (lazy && lazyLoad) {
|
|
188
192
|
const list = await lazyLoad.call(this.currVM, current)
|