web-component-gallery 2.3.19 → 2.3.21
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/dist/js.umd.js +1 -1
- package/lib/table/index.vue +12 -2
- package/lib/transfer-table/index.vue +3 -3
- package/package.json +1 -1
package/lib/table/index.vue
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<!-- 表格容器,根据tableStyle动态设置样式类 -->
|
|
3
3
|
<div :class="[tableStyle, 'WebComponentTable']" ref="Table">
|
|
4
4
|
<!-- 表格头部插槽 -->
|
|
5
|
-
<div v-if="$
|
|
5
|
+
<div v-if="$scopedSlots.ATableHead" class="WebComponentTable__Head" ref="TableHead">
|
|
6
6
|
<slot name="ATableHead" />
|
|
7
7
|
</div>
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
class="WebComponentTable__List"
|
|
17
17
|
>
|
|
18
18
|
<!-- 表格标题插槽 -->
|
|
19
|
-
<div v-if="$
|
|
19
|
+
<div v-if="$scopedSlots.ATableTitle" class="WebComponentTable__List__Title" ref="TableListTitle" slot="title">
|
|
20
20
|
<slot name="ATableTitle" />
|
|
21
21
|
</div>
|
|
22
22
|
|
|
@@ -50,6 +50,16 @@
|
|
|
50
50
|
:column="column"
|
|
51
51
|
/>
|
|
52
52
|
</template>
|
|
53
|
+
|
|
54
|
+
<!-- 额外展开行 -->
|
|
55
|
+
<template v-if="$scopedSlots.expandedRowRender" #expandedRowRender="record, i, indent, expanded">
|
|
56
|
+
<slot
|
|
57
|
+
name="expandedRowRender"
|
|
58
|
+
:index="i"
|
|
59
|
+
:record="record"
|
|
60
|
+
:expanded="expanded"
|
|
61
|
+
/>
|
|
62
|
+
</template>
|
|
53
63
|
</Table>
|
|
54
64
|
|
|
55
65
|
<!-- 分页组件容器 -->
|
|
@@ -261,9 +261,9 @@ export default {
|
|
|
261
261
|
const newIds = new Set(selectedKey)
|
|
262
262
|
|
|
263
263
|
this.selectedRecordsB = newIds.size > currentIds.size
|
|
264
|
-
? [...this.selectedRecordsB, ...selectedRecord.
|
|
265
|
-
|
|
266
|
-
|
|
264
|
+
? [...this.selectedRecordsB, ...selectedRecord.filter(r =>
|
|
265
|
+
newIds.has(r[rowKey]) && !currentIds.has(r[rowKey])
|
|
266
|
+
).map(r => ({ ...r, [this.rowKeyB]: r[rowKey] }))]
|
|
267
267
|
: this.selectedRecordsB.filter(r => newIds.has(r[this.rowKeyB]))
|
|
268
268
|
},
|
|
269
269
|
|