vxe-table 4.8.4 → 4.8.5

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.
Files changed (45) hide show
  1. package/README.md +12 -12
  2. package/es/grid/src/grid.js +1 -1
  3. package/es/style.css +1 -1
  4. package/es/style.min.css +1 -1
  5. package/es/table/module/custom/hook.js +135 -3
  6. package/es/table/module/custom/panel.js +151 -175
  7. package/es/table/src/table.js +8 -28
  8. package/es/table/style.css +42 -37
  9. package/es/table/style.min.css +1 -1
  10. package/es/ui/index.js +1 -1
  11. package/es/ui/src/log.js +1 -1
  12. package/es/vxe-table/style.css +42 -37
  13. package/es/vxe-table/style.min.css +1 -1
  14. package/lib/grid/src/grid.js +1 -1
  15. package/lib/grid/src/grid.min.js +1 -1
  16. package/lib/index.umd.js +265 -197
  17. package/lib/index.umd.min.js +1 -1
  18. package/lib/style.css +1 -1
  19. package/lib/style.min.css +1 -1
  20. package/lib/table/module/custom/hook.js +177 -3
  21. package/lib/table/module/custom/hook.min.js +1 -1
  22. package/lib/table/module/custom/panel.js +77 -157
  23. package/lib/table/module/custom/panel.min.js +1 -1
  24. package/lib/table/src/table.js +8 -34
  25. package/lib/table/src/table.min.js +1 -1
  26. package/lib/table/style/style.css +42 -37
  27. package/lib/table/style/style.min.css +1 -1
  28. package/lib/ui/index.js +1 -1
  29. package/lib/ui/index.min.js +1 -1
  30. package/lib/ui/src/log.js +1 -1
  31. package/lib/ui/src/log.min.js +1 -1
  32. package/lib/vxe-table/style/style.css +42 -37
  33. package/lib/vxe-table/style/style.min.css +1 -1
  34. package/package.json +2 -2
  35. package/packages/grid/src/grid.ts +1 -1
  36. package/packages/table/module/custom/hook.ts +136 -3
  37. package/packages/table/module/custom/panel.ts +157 -179
  38. package/packages/table/src/table.ts +8 -28
  39. package/styles/components/table-module/custom.scss +21 -5
  40. /package/es/{iconfont.1730946045701.ttf → iconfont.1730971754265.ttf} +0 -0
  41. /package/es/{iconfont.1730946045701.woff → iconfont.1730971754265.woff} +0 -0
  42. /package/es/{iconfont.1730946045701.woff2 → iconfont.1730971754265.woff2} +0 -0
  43. /package/lib/{iconfont.1730946045701.ttf → iconfont.1730971754265.ttf} +0 -0
  44. /package/lib/{iconfont.1730946045701.woff → iconfont.1730971754265.woff} +0 -0
  45. /package/lib/{iconfont.1730946045701.woff2 → iconfont.1730971754265.woff2} +0 -0
@@ -4,7 +4,7 @@ import XEUtils from 'xe-utils'
4
4
 
5
5
  import type { TableCustomMethods, TableCustomPrivateMethods, VxeColumnPropTypes, VxeTableDefines } from '../../../../types'
6
6
 
7
- const tableCustomMethodKeys: (keyof TableCustomMethods)[] = ['openCustom', 'closeCustom']
7
+ const tableCustomMethodKeys: (keyof TableCustomMethods)[] = ['openCustom', 'closeCustom', 'saveCustom', 'cancelCustom', 'resetCustom', 'toggleCustomAllCheckbox', 'setCustomAllCheckbox']
8
8
 
9
9
  VxeUI.hooks.add('tableCustomModule', {
10
10
  setupTable ($xeTable) {
@@ -22,7 +22,7 @@ VxeUI.hooks.add('tableCustomModule', {
22
22
  if (el) {
23
23
  tableHeight = el.clientHeight - 28
24
24
  }
25
- customStore.maxHeight = Math.max(4, tableHeight)
25
+ customStore.maxHeight = Math.max(88, tableHeight)
26
26
  }
27
27
 
28
28
  const openCustom = () => {
@@ -63,9 +63,142 @@ VxeUI.hooks.add('tableCustomModule', {
63
63
  return nextTick()
64
64
  }
65
65
 
66
+ const saveCustom = () => {
67
+ const { customColumnList } = reactData
68
+ const customOpts = computeCustomOpts.value
69
+ const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts
70
+ XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
71
+ if (parent) {
72
+ // 更新子列信息
73
+ column.fixed = parent.fixed
74
+ } else {
75
+ if (allowSort) {
76
+ const sortIndex = index + 1
77
+ column.renderSortNumber = sortIndex
78
+ }
79
+ if (allowFixed) {
80
+ column.fixed = column.renderFixed
81
+ }
82
+ }
83
+ if (allowResizable) {
84
+ if (column.renderVisible && (!column.children || column.children.length)) {
85
+ if (column.renderResizeWidth !== column.renderWidth) {
86
+ column.resizeWidth = column.renderResizeWidth
87
+ column.renderWidth = column.renderResizeWidth
88
+ }
89
+ }
90
+ }
91
+ if (allowVisible) {
92
+ column.visible = column.renderVisible
93
+ }
94
+ })
95
+ return $xeTable.saveCustomStore('confirm')
96
+ }
97
+
98
+ const cancelCustom = () => {
99
+ const { customColumnList, customStore } = reactData
100
+ const { oldSortMaps, oldFixedMaps, oldVisibleMaps } = customStore
101
+ const customOpts = computeCustomOpts.value
102
+ const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts
103
+ XEUtils.eachTree(customColumnList, column => {
104
+ const colid = column.getKey()
105
+ const visible = !!oldVisibleMaps[colid]
106
+ const fixed = oldFixedMaps[colid] || ''
107
+ if (allowVisible) {
108
+ column.renderVisible = visible
109
+ column.visible = visible
110
+ }
111
+ if (allowFixed) {
112
+ column.renderFixed = fixed
113
+ column.fixed = fixed
114
+ }
115
+ if (allowSort) {
116
+ column.renderSortNumber = oldSortMaps[colid] || 0
117
+ }
118
+ if (allowResizable) {
119
+ column.renderResizeWidth = column.renderWidth
120
+ }
121
+ }, { children: 'children' })
122
+ return nextTick()
123
+ }
124
+
125
+ const setCustomAllCheckbox = (checked: boolean) => {
126
+ const { customStore } = reactData
127
+ const { customColumnList } = reactData
128
+ const customOpts = computeCustomOpts.value
129
+ const { checkMethod, visibleMethod } = customOpts
130
+ const isAll = !!checked
131
+ if (customOpts.immediate) {
132
+ XEUtils.eachTree(customColumnList, (column) => {
133
+ if (visibleMethod && !visibleMethod({ column })) {
134
+ return
135
+ }
136
+ if (checkMethod && !checkMethod({ column })) {
137
+ return
138
+ }
139
+ column.visible = isAll
140
+ column.renderVisible = isAll
141
+ column.halfVisible = false
142
+ })
143
+ customStore.isAll = isAll
144
+ $xeTable.handleCustom()
145
+ $xeTable.saveCustomStore('update:visible')
146
+ } else {
147
+ XEUtils.eachTree(customColumnList, (column) => {
148
+ if (visibleMethod && !visibleMethod({ column })) {
149
+ return
150
+ }
151
+ if (checkMethod && !checkMethod({ column })) {
152
+ return
153
+ }
154
+ column.renderVisible = isAll
155
+ column.halfVisible = false
156
+ })
157
+ customStore.isAll = isAll
158
+ }
159
+ $xeTable.checkCustomStatus()
160
+ return nextTick()
161
+ }
162
+
66
163
  const customMethods: TableCustomMethods = {
67
164
  openCustom,
68
- closeCustom
165
+ closeCustom,
166
+ saveCustom,
167
+ cancelCustom,
168
+ resetCustom (options) {
169
+ const { collectColumn } = internalData
170
+ const customOpts = computeCustomOpts.value
171
+ const { checkMethod } = customOpts
172
+ const opts: VxeTableDefines.VxeTableCustomStorageObj = Object.assign({
173
+ visible: true,
174
+ resizable: options === true,
175
+ fixed: options === true,
176
+ sort: options === true
177
+ }, options)
178
+ XEUtils.eachTree(collectColumn, (column) => {
179
+ if (opts.resizable) {
180
+ column.resizeWidth = 0
181
+ }
182
+ if (opts.fixed) {
183
+ column.fixed = column.defaultFixed
184
+ }
185
+ if (opts.sort) {
186
+ column.renderSortNumber = column.sortNumber
187
+ }
188
+ if (!checkMethod || checkMethod({ column })) {
189
+ column.visible = column.defaultVisible
190
+ }
191
+ column.renderResizeWidth = column.renderWidth
192
+ })
193
+ $xeTable.saveCustomStore('reset')
194
+ return $xeTable.handleCustom()
195
+ },
196
+ toggleCustomAllCheckbox () {
197
+ const { customStore } = reactData
198
+ const isAll = !customStore.isAll
199
+ return setCustomAllCheckbox(isAll)
200
+ },
201
+ setCustomAllCheckbox
69
202
  }
70
203
 
71
204
  const checkCustomStatus = () => {
@@ -8,7 +8,7 @@ import XEUtils from 'xe-utils'
8
8
  import type { VxeModalComponent, VxeDrawerComponent, VxeButtonComponent, VxeRadioGroupComponent, VxeTooltipComponent, VxeInputComponent, VxeButtonEvents } from 'vxe-pc-ui'
9
9
  import type { VxeTableDefines, VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods, VxeColumnPropTypes } from '../../../../types'
10
10
 
11
- const { getI18n, getIcon } = VxeUI
11
+ const { getI18n, getIcon, renderEmptyElement } = VxeUI
12
12
 
13
13
  export default defineComponent({
14
14
  name: 'TableCustomPanel',
@@ -56,37 +56,9 @@ export default defineComponent({
56
56
  }
57
57
 
58
58
  const confirmCustomEvent: VxeButtonEvents.Click = ({ $event }) => {
59
- const { customColumnList } = reactData
60
- const customOpts = computeCustomOpts.value
61
- const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts
62
- XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
63
- if (parent) {
64
- // 更新子列信息
65
- column.fixed = parent.fixed
66
- } else {
67
- if (allowSort) {
68
- const sortIndex = index + 1
69
- column.renderSortNumber = sortIndex
70
- }
71
- if (allowFixed) {
72
- column.fixed = column.renderFixed
73
- }
74
- }
75
- if (allowResizable) {
76
- if (column.renderVisible && (!column.children || column.children.length)) {
77
- if (column.renderResizeWidth !== column.renderWidth) {
78
- column.resizeWidth = column.renderResizeWidth
79
- column.renderWidth = column.renderResizeWidth
80
- }
81
- }
82
- }
83
- if (allowVisible) {
84
- column.visible = column.renderVisible
85
- }
86
- })
59
+ $xeTable.saveCustom()
87
60
  $xeTable.closeCustom()
88
61
  $xeTable.emitCustomEvent('confirm', $event)
89
- $xeTable.saveCustomStore('confirm')
90
62
  }
91
63
 
92
64
  const cancelCloseEvent: VxeButtonEvents.Click = ({ $event }) => {
@@ -95,36 +67,13 @@ export default defineComponent({
95
67
  }
96
68
 
97
69
  const cancelCustomEvent: VxeButtonEvents.Click = ({ $event }) => {
98
- const { customStore } = props
99
- const { customColumnList } = reactData
100
- const { oldSortMaps, oldFixedMaps, oldVisibleMaps } = customStore
101
- const customOpts = computeCustomOpts.value
102
- const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts
103
- XEUtils.eachTree(customColumnList, column => {
104
- const colid = column.getKey()
105
- const visible = !!oldVisibleMaps[colid]
106
- const fixed = oldFixedMaps[colid] || ''
107
- if (allowVisible) {
108
- column.renderVisible = visible
109
- column.visible = visible
110
- }
111
- if (allowFixed) {
112
- column.renderFixed = fixed
113
- column.fixed = fixed
114
- }
115
- if (allowSort) {
116
- column.renderSortNumber = oldSortMaps[colid] || 0
117
- }
118
- if (allowResizable) {
119
- column.renderResizeWidth = column.renderWidth
120
- }
121
- }, { children: 'children' })
70
+ $xeTable.cancelCustom()
122
71
  $xeTable.closeCustom()
123
72
  $xeTable.emitCustomEvent('cancel', $event)
124
73
  }
125
74
 
126
75
  const handleResetCustomEvent = (evnt: Event) => {
127
- $xeTable.resetColumn(true)
76
+ $xeTable.resetCustom(true)
128
77
  $xeTable.closeCustom()
129
78
  $xeTable.emitCustomEvent('reset', evnt)
130
79
  }
@@ -214,40 +163,7 @@ export default defineComponent({
214
163
  }
215
164
 
216
165
  const allOptionEvent = () => {
217
- const { customStore } = props
218
- const { customColumnList } = reactData
219
- const customOpts = computeCustomOpts.value
220
- const { checkMethod, visibleMethod } = customOpts
221
- const isAll = !customStore.isAll
222
- if (customOpts.immediate) {
223
- XEUtils.eachTree(customColumnList, (column) => {
224
- if (visibleMethod && !visibleMethod({ column })) {
225
- return
226
- }
227
- if (checkMethod && !checkMethod({ column })) {
228
- return
229
- }
230
- column.visible = isAll
231
- column.renderVisible = isAll
232
- column.halfVisible = false
233
- })
234
- customStore.isAll = isAll
235
- $xeTable.handleCustom()
236
- $xeTable.saveCustomStore('update:visible')
237
- } else {
238
- XEUtils.eachTree(customColumnList, (column) => {
239
- if (visibleMethod && !visibleMethod({ column })) {
240
- return
241
- }
242
- if (checkMethod && !checkMethod({ column })) {
243
- return
244
- }
245
- column.renderVisible = isAll
246
- column.halfVisible = false
247
- })
248
- customStore.isAll = isAll
249
- }
250
- $xeTable.checkCustomStatus()
166
+ $xeTable.toggleCustomAllCheckbox()
251
167
  }
252
168
 
253
169
  const sortMousedownEvent = (evnt: DragEvent) => {
@@ -259,6 +175,7 @@ export default defineComponent({
259
175
  trEl.draggable = true
260
176
  dragColumnRef.value = column
261
177
  addClass(trEl, 'active--drag-origin')
178
+ updateDropHint(evnt)
262
179
  }
263
180
 
264
181
  const sortMouseupEvent = (evnt: MouseEvent) => {
@@ -373,13 +290,29 @@ export default defineComponent({
373
290
  const { maxHeight } = customStore
374
291
  const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, trigger, placement } = customOpts
375
292
  const isMaxFixedColumn = computeIsMaxFixedColumn.value
293
+ const slots = customOpts.slots || {}
294
+ const headerSlot = slots.header
295
+ const topSlot = slots.top
296
+ const bottomSlot = slots.bottom
297
+ const defaultSlot = slots.default
298
+ const footerSlot = slots.footer
376
299
  const colVNs: VNode[] = []
377
300
  const customWrapperOns: any = {}
301
+ const isAllChecked = customStore.isAll
302
+ const isAllIndeterminate = customStore.isIndeterminate
303
+ const dragColumn = dragColumnRef.value
378
304
  // hover 触发
379
305
  if (trigger === 'hover') {
380
306
  customWrapperOns.onMouseenter = handleWrapperMouseenterEvent
381
307
  customWrapperOns.onMouseleave = handleWrapperMouseleaveEvent
382
308
  }
309
+ const params = {
310
+ $table: $xeTable,
311
+ $grid: $xeTable.xegrid,
312
+ columns: customColumnList,
313
+ isAllChecked,
314
+ isAllIndeterminate
315
+ }
383
316
  XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
384
317
  const isVisible = visibleMethod ? visibleMethod({ column }) : true
385
318
  if (isVisible) {
@@ -486,9 +419,6 @@ export default defineComponent({
486
419
  )
487
420
  }
488
421
  })
489
- const isAllChecked = customStore.isAll
490
- const isAllIndeterminate = customStore.isIndeterminate
491
- const dragColumn = dragColumnRef.value
492
422
  return h('div', {
493
423
  ref: refElem,
494
424
  key: 'simple',
@@ -502,45 +432,65 @@ export default defineComponent({
502
432
  : {}
503
433
  }, customStore.visible
504
434
  ? [
505
- h('ul', {
435
+ h('div', {
506
436
  class: 'vxe-table-custom--header'
507
- }, [
508
- h('li', {
509
- class: 'vxe-table-custom--option'
510
- }, [
511
- allowVisible
512
- ? h('div', {
513
- class: ['vxe-table-custom--checkbox-option', {
514
- 'is--checked': isAllChecked,
515
- 'is--indeterminate': isAllIndeterminate
516
- }],
517
- title: getI18n('vxe.table.allTitle'),
518
- onClick: allOptionEvent
437
+ }, headerSlot
438
+ ? $xeTable.callSlot(headerSlot, params)
439
+ : [
440
+ h('ul', {
441
+ class: 'vxe-table-custom--panel-list'
519
442
  }, [
520
- h('span', {
521
- class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
522
- }),
523
- h('span', {
524
- class: 'vxe-checkbox--label'
525
- }, getI18n('vxe.toolbar.customAll'))
443
+ h('li', {
444
+ class: 'vxe-table-custom--option'
445
+ }, [
446
+ allowVisible
447
+ ? h('div', {
448
+ class: ['vxe-table-custom--checkbox-option', {
449
+ 'is--checked': isAllChecked,
450
+ 'is--indeterminate': isAllIndeterminate
451
+ }],
452
+ title: getI18n('vxe.table.allTitle'),
453
+ onClick: allOptionEvent
454
+ }, [
455
+ h('span', {
456
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
457
+ }),
458
+ h('span', {
459
+ class: 'vxe-checkbox--label'
460
+ }, getI18n('vxe.toolbar.customAll'))
461
+ ])
462
+ : h('span', {
463
+ class: 'vxe-checkbox--label'
464
+ }, getI18n('vxe.table.customTitle'))
465
+ ])
526
466
  ])
527
- : h('span', {
528
- class: 'vxe-checkbox--label'
529
- }, getI18n('vxe.table.customTitle'))
530
- ])
531
- ]),
467
+ ]),
532
468
  h('div', {
533
469
  ref: bodyElemRef,
534
- class: 'vxe-table-custom--list-wrapper'
470
+ class: 'vxe-table-custom--body'
535
471
  }, [
536
- h(TransitionGroup, {
537
- class: 'vxe-table-custom--body',
538
- name: 'vxe-table-custom--list',
539
- tag: 'ul',
540
- ...customWrapperOns
541
- }, {
542
- default: () => colVNs
543
- }),
472
+ topSlot
473
+ ? h('div', {
474
+ class: 'vxe-table-custom--panel-top'
475
+ }, $xeTable.callSlot(topSlot, params))
476
+ : renderEmptyElement($xeTable),
477
+ defaultSlot
478
+ ? h('div', {
479
+ class: 'vxe-table-custom--panel-body'
480
+ }, $xeTable.callSlot(defaultSlot, params))
481
+ : h(TransitionGroup, {
482
+ class: 'vxe-table-custom--panel-list',
483
+ name: 'vxe-table-custom--list',
484
+ tag: 'ul',
485
+ ...customWrapperOns
486
+ }, {
487
+ default: () => colVNs
488
+ }),
489
+ bottomSlot
490
+ ? h('div', {
491
+ class: 'vxe-table-custom--panel-bottom'
492
+ }, $xeTable.callSlot(bottomSlot, params))
493
+ : renderEmptyElement($xeTable),
544
494
  h('div', {
545
495
  ref: dragHintElemRef,
546
496
  class: 'vxe-table-custom-popup--drag-hint'
@@ -549,40 +499,46 @@ export default defineComponent({
549
499
  customOpts.showFooter
550
500
  ? h('div', {
551
501
  class: 'vxe-table-custom--footer'
552
- }, [
553
- VxeUIButtonComponent
554
- ? h(VxeUIButtonComponent, {
555
- mode: 'text',
556
- content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
557
- onClick: resetCustomEvent
558
- })
559
- : createCommentVNode(),
560
- customOpts.immediate
561
- ? (VxeUIButtonComponent
562
- ? h(VxeUIButtonComponent, {
563
- mode: 'text',
564
- content: customOpts.closeButtonText || getI18n('vxe.table.customClose'),
565
- onClick: cancelCloseEvent
566
- })
567
- : createCommentVNode())
568
- : (VxeUIButtonComponent
569
- ? h(VxeUIButtonComponent, {
570
- mode: 'text',
571
- content: customOpts.cancelButtonText || getI18n('vxe.table.customCancel'),
572
- onClick: cancelCustomEvent
573
- })
574
- : createCommentVNode()),
575
- customOpts.immediate
576
- ? createCommentVNode()
577
- : (VxeUIButtonComponent
578
- ? h(VxeUIButtonComponent, {
579
- mode: 'text',
580
- status: 'primary',
581
- content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm'),
582
- onClick: confirmCustomEvent
583
- })
584
- : createCommentVNode())
585
- ])
502
+ }, footerSlot
503
+ ? $xeTable.callSlot(footerSlot, params)
504
+ : [
505
+ h('div', {
506
+ class: 'vxe-table-custom--footer-buttons'
507
+ }, [
508
+ VxeUIButtonComponent
509
+ ? h(VxeUIButtonComponent, {
510
+ mode: 'text',
511
+ content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
512
+ onClick: resetCustomEvent
513
+ })
514
+ : createCommentVNode(),
515
+ customOpts.immediate
516
+ ? (VxeUIButtonComponent
517
+ ? h(VxeUIButtonComponent, {
518
+ mode: 'text',
519
+ content: customOpts.closeButtonText || getI18n('vxe.table.customClose'),
520
+ onClick: cancelCloseEvent
521
+ })
522
+ : createCommentVNode())
523
+ : (VxeUIButtonComponent
524
+ ? h(VxeUIButtonComponent, {
525
+ mode: 'text',
526
+ content: customOpts.cancelButtonText || getI18n('vxe.table.customCancel'),
527
+ onClick: cancelCustomEvent
528
+ })
529
+ : createCommentVNode()),
530
+ customOpts.immediate
531
+ ? createCommentVNode()
532
+ : (VxeUIButtonComponent
533
+ ? h(VxeUIButtonComponent, {
534
+ mode: 'text',
535
+ status: 'primary',
536
+ content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm'),
537
+ onClick: confirmCustomEvent
538
+ })
539
+ : createCommentVNode())
540
+ ])
541
+ ])
586
542
  : null
587
543
  ]
588
544
  : [])
@@ -599,7 +555,23 @@ export default defineComponent({
599
555
  const modalOpts = Object.assign({}, modalOptions)
600
556
  const drawerOpts = Object.assign({}, drawerOptions)
601
557
  const isMaxFixedColumn = computeIsMaxFixedColumn.value
558
+ const slots = customOpts.slots || {}
559
+ const headerSlot = slots.header
560
+ const topSlot = slots.top
561
+ const bottomSlot = slots.bottom
562
+ const defaultSlot = slots.default
563
+ const footerSlot = slots.footer
602
564
  const trVNs: VNode[] = []
565
+ const isAllChecked = customStore.isAll
566
+ const isAllIndeterminate = customStore.isIndeterminate
567
+ const dragColumn = dragColumnRef.value
568
+ const params = {
569
+ $table: $xeTable,
570
+ $grid: $xeTable.xegrid,
571
+ columns: customColumnList,
572
+ isAllChecked,
573
+ isAllIndeterminate
574
+ }
603
575
  XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
604
576
  const isVisible = visibleMethod ? visibleMethod({ column }) : true
605
577
  if (isVisible) {
@@ -732,15 +704,20 @@ export default defineComponent({
732
704
  )
733
705
  }
734
706
  })
735
- const isAllChecked = customStore.isAll
736
- const isAllIndeterminate = customStore.isIndeterminate
737
- const dragColumn = dragColumnRef.value
738
- const scopedSlots = {
707
+ const scopedSlots: Record<string, any> = {
739
708
  default: () => {
709
+ if (defaultSlot) {
710
+ return $xeTable.callSlot(defaultSlot, params)
711
+ }
740
712
  return h('div', {
741
713
  ref: bodyElemRef,
742
714
  class: 'vxe-table-custom-popup--body'
743
715
  }, [
716
+ topSlot
717
+ ? h('div', {
718
+ class: 'vxe-table-custom-popup--table-top'
719
+ }, $xeTable.callSlot(topSlot, params))
720
+ : renderEmptyElement($xeTable),
744
721
  h('div', {
745
722
  class: 'vxe-table-custom-popup--table-wrapper'
746
723
  }, [
@@ -748,35 +725,25 @@ export default defineComponent({
748
725
  h('colgroup', {}, [
749
726
  allowVisible
750
727
  ? h('col', {
751
- style: {
752
- width: '80px'
753
- }
728
+ class: 'vxe-table-custom-popup--table-col-seq'
754
729
  })
755
730
  : createCommentVNode(),
756
731
  allowSort
757
732
  ? h('col', {
758
- style: {
759
- width: '80px'
760
- }
733
+ class: 'vxe-table-custom-popup--table-col-sort'
761
734
  })
762
735
  : createCommentVNode(),
763
736
  h('col', {
764
- style: {
765
- minWidth: '120px'
766
- }
737
+ class: 'vxe-table-custom-popup--table-col-title'
767
738
  }),
768
739
  allowResizable
769
740
  ? h('col', {
770
- style: {
771
- width: '140px'
772
- }
741
+ class: 'vxe-table-custom-popup--table-col-width'
773
742
  })
774
743
  : createCommentVNode(),
775
744
  allowFixed
776
745
  ? h('col', {
777
- style: {
778
- width: '200px'
779
- }
746
+ class: 'vxe-table-custom-popup--table-col-fixed'
780
747
  })
781
748
  : createCommentVNode()
782
749
  ]),
@@ -831,7 +798,7 @@ export default defineComponent({
831
798
  ])
832
799
  ]),
833
800
  h(TransitionGroup, {
834
- class: 'vxe-table-custom--body',
801
+ class: 'vxe-table-custom--panel-list',
835
802
  tag: 'tbody',
836
803
  name: 'vxe-table-custom--list'
837
804
  }, {
@@ -839,6 +806,11 @@ export default defineComponent({
839
806
  })
840
807
  ])
841
808
  ]),
809
+ bottomSlot
810
+ ? h('div', {
811
+ class: 'vxe-table-custom-popup--table-bottom'
812
+ }, $xeTable.callSlot(bottomSlot, params))
813
+ : renderEmptyElement($xeTable),
842
814
  h('div', {
843
815
  ref: dragHintElemRef,
844
816
  class: 'vxe-table-custom-popup--drag-hint'
@@ -846,6 +818,9 @@ export default defineComponent({
846
818
  ])
847
819
  },
848
820
  footer: () => {
821
+ if (footerSlot) {
822
+ return $xeTable.callSlot(footerSlot, params)
823
+ }
849
824
  return h('div', {
850
825
  class: 'vxe-table-custom-popup--footer'
851
826
  }, [
@@ -871,6 +846,9 @@ export default defineComponent({
871
846
  ])
872
847
  }
873
848
  }
849
+ if (headerSlot) {
850
+ scopedSlots.header = () => $xeTable.callSlot(headerSlot, params)
851
+ }
874
852
  if (mode === 'drawer') {
875
853
  return VxeUIDrawerComponent
876
854
  ? h(VxeUIDrawerComponent, {