web-component-gallery 2.3.19 → 2.3.20

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.
@@ -2,7 +2,7 @@
2
2
  <!-- 表格容器,根据tableStyle动态设置样式类 -->
3
3
  <div :class="[tableStyle, 'WebComponentTable']" ref="Table">
4
4
  <!-- 表格头部插槽 -->
5
- <div v-if="$slots.ATableHead" class="WebComponentTable__Head" ref="TableHead">
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="$slots.ATableTitle" class="WebComponentTable__List__Title" ref="TableListTitle" slot="title">
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
+ :customProps="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.map(r => {
265
- if (newIds.has(r[rowKey]) && !currentIds.has(r[rowKey])) return { ...r, [this.rowKeyB]: r[rowKey] }
266
- }).filter(Boolean)]
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-component-gallery",
3
- "version": "2.3.19",
3
+ "version": "2.3.20",
4
4
  "description": "基础vue、antdvue、less实现的私有组件库",
5
5
  "main": "dist/index.umd.js",
6
6
  "files": [