vxe-table 4.8.4 → 4.8.6

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 (55) 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 +179 -181
  7. package/es/table/module/validator/hook.js +1 -1
  8. package/es/table/src/body.js +14 -8
  9. package/es/table/src/table.js +77 -73
  10. package/es/table/style.css +67 -52
  11. package/es/table/style.min.css +1 -1
  12. package/es/ui/index.js +3 -2
  13. package/es/ui/src/log.js +1 -1
  14. package/es/vxe-table/style.css +67 -52
  15. package/es/vxe-table/style.min.css +1 -1
  16. package/lib/grid/src/grid.js +1 -1
  17. package/lib/grid/src/grid.min.js +1 -1
  18. package/lib/index.umd.js +374 -247
  19. package/lib/index.umd.min.js +1 -1
  20. package/lib/style.css +1 -1
  21. package/lib/style.min.css +1 -1
  22. package/lib/table/module/custom/hook.js +177 -3
  23. package/lib/table/module/custom/hook.min.js +1 -1
  24. package/lib/table/module/custom/panel.js +108 -162
  25. package/lib/table/module/custom/panel.min.js +1 -1
  26. package/lib/table/module/validator/hook.js +1 -1
  27. package/lib/table/module/validator/hook.min.js +1 -1
  28. package/lib/table/src/body.js +5 -3
  29. package/lib/table/src/body.min.js +1 -1
  30. package/lib/table/src/table.js +78 -74
  31. package/lib/table/src/table.min.js +1 -1
  32. package/lib/table/style/style.css +67 -52
  33. package/lib/table/style/style.min.css +1 -1
  34. package/lib/ui/index.js +3 -2
  35. package/lib/ui/index.min.js +1 -1
  36. package/lib/ui/src/log.js +1 -1
  37. package/lib/ui/src/log.min.js +1 -1
  38. package/lib/vxe-table/style/style.css +67 -52
  39. package/lib/vxe-table/style/style.min.css +1 -1
  40. package/package.json +2 -2
  41. package/packages/grid/src/grid.ts +1 -1
  42. package/packages/table/module/custom/hook.ts +136 -3
  43. package/packages/table/module/custom/panel.ts +186 -185
  44. package/packages/table/module/validator/hook.ts +1 -1
  45. package/packages/table/src/body.ts +14 -8
  46. package/packages/table/src/table.ts +77 -73
  47. package/packages/ui/index.ts +2 -1
  48. package/styles/components/table-module/custom.scss +23 -6
  49. package/styles/components/table.scss +36 -26
  50. /package/es/{iconfont.1730946045701.ttf → iconfont.1731028500961.ttf} +0 -0
  51. /package/es/{iconfont.1730946045701.woff → iconfont.1731028500961.woff} +0 -0
  52. /package/es/{iconfont.1730946045701.woff2 → iconfont.1731028500961.woff2} +0 -0
  53. /package/lib/{iconfont.1730946045701.ttf → iconfont.1731028500961.ttf} +0 -0
  54. /package/lib/{iconfont.1730946045701.woff → iconfont.1731028500961.woff} +0 -0
  55. /package/lib/{iconfont.1730946045701.woff2 → iconfont.1731028500961.woff2} +0 -0
@@ -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',
@@ -22,14 +22,14 @@ export default defineComponent({
22
22
  const VxeUIModalComponent = VxeUI.getComponent<VxeModalComponent>('VxeModal')
23
23
  const VxeUIDrawerComponent = VxeUI.getComponent<VxeDrawerComponent>('VxeDrawer')
24
24
  const VxeUIButtonComponent = VxeUI.getComponent<VxeButtonComponent>('VxeButton')
25
- const VxeUIInputComponent = VxeUI.getComponent<VxeInputComponent>('VxeInput')
25
+ const VxeUINumberInputComponent = VxeUI.getComponent<VxeInputComponent>('VxeNumberInput')
26
26
  const VxeUITooltipComponent = VxeUI.getComponent<VxeTooltipComponent>('VxeTooltip')
27
27
  const VxeUIRadioGroupComponent = VxeUI.getComponent<VxeRadioGroupComponent>('VxeRadioGroup')
28
28
 
29
29
  const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods)
30
30
 
31
31
  const { reactData } = $xeTable
32
- const { computeCustomOpts, computeColumnOpts, computeIsMaxFixedColumn } = $xeTable.getComputeMaps()
32
+ const { computeCustomOpts, computeColumnOpts, computeIsMaxFixedColumn, computeResizableOpts } = $xeTable.getComputeMaps()
33
33
 
34
34
  const refElem = ref() as Ref<HTMLDivElement>
35
35
  const bodyElemRef = ref() as Ref<HTMLDivElement>
@@ -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
  : [])
@@ -595,14 +551,51 @@ export default defineComponent({
595
551
  const { modalOptions, drawerOptions, allowVisible, allowSort, allowFixed, allowResizable, checkMethod, visibleMethod } = customOpts
596
552
  const columnOpts = computeColumnOpts.value
597
553
  const { maxFixedSize } = columnOpts
554
+ const resizableOpts = computeResizableOpts.value
555
+ const { minWidth: reMinWidth, maxWidth: reMaxWidth } = resizableOpts
598
556
  const { mode } = customOpts
599
557
  const modalOpts = Object.assign({}, modalOptions)
600
558
  const drawerOpts = Object.assign({}, drawerOptions)
601
559
  const isMaxFixedColumn = computeIsMaxFixedColumn.value
560
+ const slots = customOpts.slots || {}
561
+ const headerSlot = slots.header
562
+ const topSlot = slots.top
563
+ const bottomSlot = slots.bottom
564
+ const defaultSlot = slots.default
565
+ const footerSlot = slots.footer
602
566
  const trVNs: VNode[] = []
567
+ const isAllChecked = customStore.isAll
568
+ const isAllIndeterminate = customStore.isIndeterminate
569
+ const dragColumn = dragColumnRef.value
570
+ const params = {
571
+ $table: $xeTable,
572
+ $grid: $xeTable.xegrid,
573
+ columns: customColumnList,
574
+ isAllChecked,
575
+ isAllIndeterminate
576
+ }
603
577
  XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
604
578
  const isVisible = visibleMethod ? visibleMethod({ column }) : true
605
579
  if (isVisible) {
580
+ // 默认继承调整宽度
581
+ let customMinWidth = 0
582
+ let customMaxWidth = 0
583
+ if (allowResizable) {
584
+ const resizeParams = {
585
+ $table: $xeTable,
586
+ column,
587
+ columnIndex: index,
588
+ $columnIndex: index,
589
+ $rowIndex: -1
590
+ }
591
+ if (reMinWidth) {
592
+ customMinWidth = XEUtils.toNumber(XEUtils.isFunction(reMinWidth) ? reMinWidth(resizeParams) : reMinWidth)
593
+ }
594
+ if (reMaxWidth) {
595
+ customMaxWidth = XEUtils.toNumber(XEUtils.isFunction(reMaxWidth) ? reMaxWidth(resizeParams) : reMaxWidth)
596
+ }
597
+ }
598
+
606
599
  const isChecked = column.renderVisible
607
600
  const isIndeterminate = column.halfVisible
608
601
  const colTitle = formatText(column.getTitle(), 1)
@@ -689,11 +682,13 @@ export default defineComponent({
689
682
  column.children && column.children.length
690
683
  ? h('span', '-')
691
684
  : (
692
- VxeUIInputComponent
693
- ? h(VxeUIInputComponent, {
685
+ VxeUINumberInputComponent
686
+ ? h(VxeUINumberInputComponent, {
694
687
  type: 'integer',
695
688
  disabled: isDisabled || isHidden,
696
689
  modelValue: column.renderResizeWidth,
690
+ min: customMinWidth || undefined,
691
+ max: customMaxWidth || undefined,
697
692
  'onUpdate:modelValue' (value: any) {
698
693
  column.renderResizeWidth = Math.max(0, Number(value))
699
694
  }
@@ -732,15 +727,20 @@ export default defineComponent({
732
727
  )
733
728
  }
734
729
  })
735
- const isAllChecked = customStore.isAll
736
- const isAllIndeterminate = customStore.isIndeterminate
737
- const dragColumn = dragColumnRef.value
738
- const scopedSlots = {
730
+ const scopedSlots: Record<string, any> = {
739
731
  default: () => {
732
+ if (defaultSlot) {
733
+ return $xeTable.callSlot(defaultSlot, params)
734
+ }
740
735
  return h('div', {
741
736
  ref: bodyElemRef,
742
737
  class: 'vxe-table-custom-popup--body'
743
738
  }, [
739
+ topSlot
740
+ ? h('div', {
741
+ class: 'vxe-table-custom-popup--table-top'
742
+ }, $xeTable.callSlot(topSlot, params))
743
+ : renderEmptyElement($xeTable),
744
744
  h('div', {
745
745
  class: 'vxe-table-custom-popup--table-wrapper'
746
746
  }, [
@@ -748,35 +748,25 @@ export default defineComponent({
748
748
  h('colgroup', {}, [
749
749
  allowVisible
750
750
  ? h('col', {
751
- style: {
752
- width: '80px'
753
- }
751
+ class: 'vxe-table-custom-popup--table-col-seq'
754
752
  })
755
753
  : createCommentVNode(),
756
754
  allowSort
757
755
  ? h('col', {
758
- style: {
759
- width: '80px'
760
- }
756
+ class: 'vxe-table-custom-popup--table-col-sort'
761
757
  })
762
758
  : createCommentVNode(),
763
759
  h('col', {
764
- style: {
765
- minWidth: '120px'
766
- }
760
+ class: 'vxe-table-custom-popup--table-col-title'
767
761
  }),
768
762
  allowResizable
769
763
  ? h('col', {
770
- style: {
771
- width: '140px'
772
- }
764
+ class: 'vxe-table-custom-popup--table-col-width'
773
765
  })
774
766
  : createCommentVNode(),
775
767
  allowFixed
776
768
  ? h('col', {
777
- style: {
778
- width: '200px'
779
- }
769
+ class: 'vxe-table-custom-popup--table-col-fixed'
780
770
  })
781
771
  : createCommentVNode()
782
772
  ]),
@@ -831,7 +821,7 @@ export default defineComponent({
831
821
  ])
832
822
  ]),
833
823
  h(TransitionGroup, {
834
- class: 'vxe-table-custom--body',
824
+ class: 'vxe-table-custom--panel-list',
835
825
  tag: 'tbody',
836
826
  name: 'vxe-table-custom--list'
837
827
  }, {
@@ -839,6 +829,11 @@ export default defineComponent({
839
829
  })
840
830
  ])
841
831
  ]),
832
+ bottomSlot
833
+ ? h('div', {
834
+ class: 'vxe-table-custom-popup--table-bottom'
835
+ }, $xeTable.callSlot(bottomSlot, params))
836
+ : renderEmptyElement($xeTable),
842
837
  h('div', {
843
838
  ref: dragHintElemRef,
844
839
  class: 'vxe-table-custom-popup--drag-hint'
@@ -846,6 +841,9 @@ export default defineComponent({
846
841
  ])
847
842
  },
848
843
  footer: () => {
844
+ if (footerSlot) {
845
+ return $xeTable.callSlot(footerSlot, params)
846
+ }
849
847
  return h('div', {
850
848
  class: 'vxe-table-custom-popup--footer'
851
849
  }, [
@@ -871,6 +869,9 @@ export default defineComponent({
871
869
  ])
872
870
  }
873
871
  }
872
+ if (headerSlot) {
873
+ scopedSlots.header = () => $xeTable.callSlot(headerSlot, params)
874
+ }
874
875
  if (mode === 'drawer') {
875
876
  return VxeUIDrawerComponent
876
877
  ? h(VxeUIDrawerComponent, {
@@ -936,8 +937,8 @@ export default defineComponent({
936
937
  if (!VxeUIButtonComponent) {
937
938
  errLog('vxe.error.reqComp', ['vxe-button'])
938
939
  }
939
- if (!VxeUIInputComponent) {
940
- errLog('vxe.error.reqComp', ['vxe-input'])
940
+ if (!VxeUINumberInputComponent) {
941
+ errLog('vxe.error.reqComp', ['vxe-number-input'])
941
942
  }
942
943
  if (!VxeUITooltipComponent) {
943
944
  errLog('vxe.error.reqComp', ['vxe-tooltip'])
@@ -87,7 +87,7 @@ hooks.add('tableValidatorModule', {
87
87
  column: any;
88
88
  rule: any;
89
89
  content: any;
90
- }> = validErrMaps
90
+ }> = {}
91
91
  if (keys.length) {
92
92
  const firstKey = keys[0]
93
93
  resMaps[firstKey] = validErrMaps[firstKey]
@@ -306,19 +306,25 @@ export default defineComponent({
306
306
  const validParams = { ...params, ...errorValidItem }
307
307
  tdVNs.push(
308
308
  h('div', {
309
- class: ['vxe-cell--valid-error-hint', getPropClass(validOpts.className, validParams)],
309
+ class: ['vxe-cell--valid-error-tip', getPropClass(validOpts.className, validParams)],
310
310
  style: errRule && errRule.maxWidth
311
311
  ? {
312
312
  width: `${errRule.maxWidth}px`
313
313
  }
314
314
  : null
315
- }, validSlot
316
- ? $xeTable.callSlot(validSlot, validParams)
317
- : [
318
- h('span', {
319
- class: 'vxe-cell--valid-error-msg'
320
- }, errorValidItem.content)
321
- ])
315
+ }, [
316
+ h('div', {
317
+ class: `vxe-cell--valid-error-wrapper vxe-cell--valid-error-theme-${validOpts.theme || 'normal'}`
318
+ }, [
319
+ validSlot
320
+ ? $xeTable.callSlot(validSlot, validParams)
321
+ : [
322
+ h('span', {
323
+ class: 'vxe-cell--valid-error-msg'
324
+ }, errorValidItem.content)
325
+ ]
326
+ ])
327
+ ])
322
328
  )
323
329
  }
324
330
  }