yh-mobile-components 1.4.8 → 1.4.10
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.
- package/info/yhmList.vue +10 -4
- package/package.json +1 -1
package/info/yhmList.vue
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
@load="getList">
|
|
42
42
|
<template v-for="row in renderCustom">
|
|
43
43
|
<yhm-info has-top>
|
|
44
|
-
<template v-for="col in row">
|
|
44
|
+
<template v-for="col in row.cols">
|
|
45
45
|
<slot
|
|
46
46
|
v-if="col.slot"
|
|
47
47
|
:name="col.slot"
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
v-if="listConfig.btns && listConfig.btns.length > 0">
|
|
65
65
|
<template v-for="btn in listConfig.btns">
|
|
66
66
|
<div
|
|
67
|
-
v-if="!btn.show || (btn.show && btn.show(row))"
|
|
67
|
+
v-if="!btn.show || (btn.show && btn.show(row.data))"
|
|
68
68
|
:class="`yhm-list-btn${btn.type ? ' ' + btn.type : ''}${btn.size ? ' ' + btn.size : ''}`"
|
|
69
|
-
@click="() => btn.callback(row)">
|
|
69
|
+
@click="() => btn.callback(row.data)">
|
|
70
70
|
{{ btn.text }}
|
|
71
71
|
</div>
|
|
72
72
|
</template>
|
|
@@ -200,7 +200,7 @@ watch(
|
|
|
200
200
|
|
|
201
201
|
const renderCustom = computed(() => {
|
|
202
202
|
return list.value.map((row) => {
|
|
203
|
-
|
|
203
|
+
let cols = props.listConfig.items
|
|
204
204
|
.filter((item) => !item.show || (item.show && item.show(row)))
|
|
205
205
|
.map(({ label, span, align, descAlign, fontSize, status, description, defaultDescription, slot, value, defaultValue }) => {
|
|
206
206
|
return {
|
|
@@ -215,6 +215,11 @@ const renderCustom = computed(() => {
|
|
|
215
215
|
slot,
|
|
216
216
|
};
|
|
217
217
|
});
|
|
218
|
+
|
|
219
|
+
return {
|
|
220
|
+
cols,
|
|
221
|
+
data: row,
|
|
222
|
+
};
|
|
218
223
|
});
|
|
219
224
|
});
|
|
220
225
|
|
|
@@ -231,6 +236,7 @@ onActivated(() => {});
|
|
|
231
236
|
|
|
232
237
|
defineExpose({
|
|
233
238
|
getList,
|
|
239
|
+
keyword,
|
|
234
240
|
});
|
|
235
241
|
</script>
|
|
236
242
|
<style lang="scss">
|