vxe-table 4.8.16 → 4.9.1

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 (135) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/README.zh-TW.md +1 -1
  4. package/es/locale/lang/en-US.js +1 -0
  5. package/es/locale/lang/es-ES.js +1 -0
  6. package/es/locale/lang/hu-HU.js +1 -0
  7. package/es/locale/lang/ja-JP.js +1 -0
  8. package/es/locale/lang/ko-KR.js +1 -0
  9. package/es/locale/lang/pt-BR.js +1 -0
  10. package/es/locale/lang/ru-RU.js +1 -0
  11. package/es/locale/lang/uk-UA.js +1 -0
  12. package/es/locale/lang/vi-VN.js +1 -0
  13. package/es/locale/lang/zh-CHT.js +1 -0
  14. package/es/locale/lang/zh-CN.js +1 -0
  15. package/es/style.css +1 -1
  16. package/es/style.min.css +1 -1
  17. package/es/table/module/custom/hook.js +4 -0
  18. package/es/table/module/edit/hook.js +53 -34
  19. package/es/table/module/filter/hook.js +2 -3
  20. package/es/table/module/keyboard/hook.js +2 -2
  21. package/es/table/src/body.js +31 -24
  22. package/es/table/src/cell.js +99 -59
  23. package/es/table/src/emits.js +3 -0
  24. package/es/table/src/footer.js +177 -147
  25. package/es/table/src/header.js +144 -107
  26. package/es/table/src/props.js +5 -1
  27. package/es/table/src/table.js +346 -108
  28. package/es/table/src/util.js +9 -0
  29. package/es/table/style.css +33 -20
  30. package/es/table/style.min.css +1 -1
  31. package/es/ui/index.js +9 -4
  32. package/es/ui/src/log.js +1 -1
  33. package/es/vxe-table/style.css +33 -20
  34. package/es/vxe-table/style.min.css +1 -1
  35. package/helper/vetur/attributes.json +1 -1
  36. package/helper/vetur/tags.json +1 -1
  37. package/lib/index.umd.js +1035 -573
  38. package/lib/index.umd.min.js +1 -1
  39. package/lib/locale/lang/en-US.js +1 -0
  40. package/lib/locale/lang/en-US.min.js +1 -1
  41. package/lib/locale/lang/en-US.umd.js +1 -0
  42. package/lib/locale/lang/es-ES.js +1 -0
  43. package/lib/locale/lang/es-ES.min.js +1 -1
  44. package/lib/locale/lang/es-ES.umd.js +1 -0
  45. package/lib/locale/lang/hu-HU.js +1 -0
  46. package/lib/locale/lang/hu-HU.min.js +1 -1
  47. package/lib/locale/lang/hu-HU.umd.js +1 -0
  48. package/lib/locale/lang/ja-JP.js +1 -0
  49. package/lib/locale/lang/ja-JP.min.js +1 -1
  50. package/lib/locale/lang/ja-JP.umd.js +1 -0
  51. package/lib/locale/lang/ko-KR.js +1 -0
  52. package/lib/locale/lang/ko-KR.min.js +1 -1
  53. package/lib/locale/lang/ko-KR.umd.js +1 -0
  54. package/lib/locale/lang/pt-BR.js +1 -0
  55. package/lib/locale/lang/pt-BR.min.js +1 -1
  56. package/lib/locale/lang/pt-BR.umd.js +1 -0
  57. package/lib/locale/lang/ru-RU.js +1 -0
  58. package/lib/locale/lang/ru-RU.min.js +1 -1
  59. package/lib/locale/lang/ru-RU.umd.js +1 -0
  60. package/lib/locale/lang/uk-UA.js +1 -0
  61. package/lib/locale/lang/uk-UA.min.js +1 -1
  62. package/lib/locale/lang/uk-UA.umd.js +1 -0
  63. package/lib/locale/lang/vi-VN.js +1 -0
  64. package/lib/locale/lang/vi-VN.min.js +1 -1
  65. package/lib/locale/lang/zh-CHT.js +1 -0
  66. package/lib/locale/lang/zh-CHT.min.js +1 -1
  67. package/lib/locale/lang/zh-CN.js +1 -0
  68. package/lib/locale/lang/zh-CN.min.js +1 -1
  69. package/lib/locale/lang/zh-CN.umd.js +1 -0
  70. package/lib/style.css +1 -1
  71. package/lib/style.min.css +1 -1
  72. package/lib/table/module/custom/hook.js +4 -0
  73. package/lib/table/module/custom/hook.min.js +1 -1
  74. package/lib/table/module/edit/hook.js +63 -42
  75. package/lib/table/module/edit/hook.min.js +1 -1
  76. package/lib/table/module/filter/hook.js +1 -2
  77. package/lib/table/module/filter/hook.min.js +1 -1
  78. package/lib/table/module/keyboard/hook.js +2 -2
  79. package/lib/table/module/keyboard/hook.min.js +1 -1
  80. package/lib/table/src/body.js +34 -21
  81. package/lib/table/src/body.min.js +1 -1
  82. package/lib/table/src/cell.js +110 -51
  83. package/lib/table/src/cell.min.js +1 -1
  84. package/lib/table/src/emits.js +1 -1
  85. package/lib/table/src/emits.min.js +1 -1
  86. package/lib/table/src/footer.js +222 -183
  87. package/lib/table/src/footer.min.js +1 -1
  88. package/lib/table/src/header.js +188 -150
  89. package/lib/table/src/header.min.js +1 -1
  90. package/lib/table/src/props.js +5 -1
  91. package/lib/table/src/props.min.js +1 -1
  92. package/lib/table/src/table.js +380 -110
  93. package/lib/table/src/table.min.js +1 -1
  94. package/lib/table/src/util.js +10 -0
  95. package/lib/table/src/util.min.js +1 -1
  96. package/lib/table/style/style.css +33 -20
  97. package/lib/table/style/style.min.css +1 -1
  98. package/lib/ui/index.js +9 -4
  99. package/lib/ui/index.min.js +1 -1
  100. package/lib/ui/src/log.js +1 -1
  101. package/lib/ui/src/log.min.js +1 -1
  102. package/lib/vxe-table/style/style.css +33 -20
  103. package/lib/vxe-table/style/style.min.css +1 -1
  104. package/package.json +3 -3
  105. package/packages/locale/lang/en-US.ts +1 -0
  106. package/packages/locale/lang/es-ES.ts +1 -0
  107. package/packages/locale/lang/hu-HU.ts +1 -0
  108. package/packages/locale/lang/ja-JP.ts +1 -0
  109. package/packages/locale/lang/ko-KR.ts +1 -0
  110. package/packages/locale/lang/pt-BR.ts +1 -0
  111. package/packages/locale/lang/ru-RU.ts +1 -0
  112. package/packages/locale/lang/uk-UA.ts +1 -0
  113. package/packages/locale/lang/vi-VN.ts +1 -0
  114. package/packages/locale/lang/zh-CHT.ts +1 -0
  115. package/packages/locale/lang/zh-CN.ts +1 -0
  116. package/packages/table/module/custom/hook.ts +4 -0
  117. package/packages/table/module/edit/hook.ts +54 -34
  118. package/packages/table/module/filter/hook.ts +2 -3
  119. package/packages/table/module/keyboard/hook.ts +2 -2
  120. package/packages/table/src/body.ts +46 -31
  121. package/packages/table/src/cell.ts +140 -92
  122. package/packages/table/src/emits.ts +3 -0
  123. package/packages/table/src/footer.ts +189 -152
  124. package/packages/table/src/header.ts +157 -116
  125. package/packages/table/src/props.ts +5 -1
  126. package/packages/table/src/table.ts +358 -109
  127. package/packages/table/src/util.ts +10 -0
  128. package/packages/ui/index.ts +8 -3
  129. package/styles/components/table.scss +42 -35
  130. /package/es/{iconfont.1731633504443.ttf → iconfont.1731937248477.ttf} +0 -0
  131. /package/es/{iconfont.1731633504443.woff → iconfont.1731937248477.woff} +0 -0
  132. /package/es/{iconfont.1731633504443.woff2 → iconfont.1731937248477.woff2} +0 -0
  133. /package/lib/{iconfont.1731633504443.ttf → iconfont.1731937248477.ttf} +0 -0
  134. /package/lib/{iconfont.1731633504443.woff → iconfont.1731937248477.woff} +0 -0
  135. /package/lib/{iconfont.1731633504443.woff2 → iconfont.1731937248477.woff2} +0 -0
@@ -13,45 +13,46 @@ const { getI18n, getIcon, renderer, formats, renderEmptyElement } = VxeUI
13
13
  function renderTitlePrefixIcon (params: VxeTableDefines.CellRenderHeaderParams) {
14
14
  const { $table, column } = params
15
15
  const titlePrefix = column.titlePrefix || column.titleHelp
16
- return titlePrefix
17
- ? [
18
- h('i', {
19
- class: ['vxe-cell-title-prefix-icon', titlePrefix.icon || getIcon().TABLE_TITLE_PREFIX],
20
- onMouseenter (evnt: MouseEvent) {
21
- $table.triggerHeaderTitleEvent(evnt, titlePrefix, params)
22
- },
23
- onMouseleave (evnt: MouseEvent) {
24
- $table.handleTargetLeaveEvent(evnt)
25
- }
26
- })
27
- ]
28
- : []
16
+ if (titlePrefix) {
17
+ return h('i', {
18
+ class: ['vxe-cell-title-prefix-icon', titlePrefix.icon || getIcon().TABLE_TITLE_PREFIX],
19
+ onMouseenter (evnt: MouseEvent) {
20
+ $table.triggerHeaderTitleEvent(evnt, titlePrefix, params)
21
+ },
22
+ onMouseleave (evnt: MouseEvent) {
23
+ $table.handleTargetLeaveEvent(evnt)
24
+ }
25
+ })
26
+ }
27
+ return renderEmptyElement($table)
29
28
  }
30
29
 
31
30
  function renderTitleSuffixIcon (params: VxeTableDefines.CellRenderHeaderParams) {
32
31
  const { $table, column } = params
33
32
  const titleSuffix = column.titleSuffix
34
- return titleSuffix
35
- ? [
36
- h('i', {
37
- class: ['vxe-cell-title-suffix-icon', titleSuffix.icon || getIcon().TABLE_TITLE_SUFFIX],
38
- onMouseenter (evnt: MouseEvent) {
39
- $table.triggerHeaderTitleEvent(evnt, titleSuffix, params)
40
- },
41
- onMouseleave (evnt: MouseEvent) {
42
- $table.handleTargetLeaveEvent(evnt)
43
- }
44
- })
45
- ]
46
- : []
33
+ if (titleSuffix) {
34
+ h('i', {
35
+ class: ['vxe-cell-title-suffix-icon', titleSuffix.icon || getIcon().TABLE_TITLE_SUFFIX],
36
+ onMouseenter (evnt: MouseEvent) {
37
+ $table.triggerHeaderTitleEvent(evnt, titleSuffix, params)
38
+ },
39
+ onMouseleave (evnt: MouseEvent) {
40
+ $table.handleTargetLeaveEvent(evnt)
41
+ }
42
+ })
43
+ }
44
+ return renderEmptyElement($table)
47
45
  }
48
46
 
49
47
  function renderCellDragIcon (params: VxeTableDefines.CellRenderBodyParams) {
50
48
  const { $table } = params
51
- const { computeDragOpts } = $table.getComputeMaps()
52
- const dragOpts = computeDragOpts.value
53
- const { rowIcon, rowDisabledMethod } = dragOpts
54
- const isDisabled = rowDisabledMethod && rowDisabledMethod(params)
49
+ const tableProps = $table.props
50
+ const { dragConfig } = tableProps
51
+ const { computeRowDragOpts } = $table.getComputeMaps()
52
+ const rowDragOpts = computeRowDragOpts.value
53
+ const { icon, disabledMethod } = rowDragOpts
54
+ const rDisabledMethod = disabledMethod || (dragConfig ? dragConfig.rowDisabledMethod : null)
55
+ const isDisabled = rDisabledMethod && rDisabledMethod(params)
55
56
  return h('span', {
56
57
  key: 'dg',
57
58
  class: ['vxe-cell--drag-handle', {
@@ -65,7 +66,7 @@ function renderCellDragIcon (params: VxeTableDefines.CellRenderBodyParams) {
65
66
  onMouseup: $table.handleCellDragMouseupEvent
66
67
  }, [
67
68
  h('i', {
68
- class: rowIcon || getIcon().TABLE_DRAG_ROW
69
+ class: icon || (dragConfig ? dragConfig.rowIcon : '') || getIcon().TABLE_DRAG_ROW
69
70
  })
70
71
  ])
71
72
  }
@@ -74,13 +75,14 @@ function renderCellBaseVNs (params: VxeTableDefines.CellRenderBodyParams, conten
74
75
  const { $table, column, level } = params
75
76
  const { dragSort } = column
76
77
  const tableProps = $table.props
77
- const { treeConfig } = tableProps
78
- const { computeRowOpts, computeDragOpts } = $table.getComputeMaps()
78
+ const { treeConfig, dragConfig } = tableProps
79
+ const { computeRowOpts, computeRowDragOpts } = $table.getComputeMaps()
79
80
  const rowOpts = computeRowOpts.value
80
- const dragOpts = computeDragOpts.value
81
- const { showRowIcon, rowVisibleMethod } = dragOpts
81
+ const rowDragOpts = computeRowDragOpts.value
82
+ const { showIcon, visibleMethod } = rowDragOpts
83
+ const rVisibleMethod = visibleMethod || (dragConfig ? dragConfig.rowVisibleMethod : null)
82
84
  const vns: VxeComponentSlotType[] = XEUtils.isArray(content) ? content : [content]
83
- if (dragSort && rowOpts.drag && (showRowIcon && (!rowVisibleMethod || rowVisibleMethod(params)))) {
85
+ if (dragSort && rowOpts.drag && ((showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params)))) {
84
86
  if (!treeConfig || !level) {
85
87
  vns.unshift(
86
88
  renderCellDragIcon(params)
@@ -90,6 +92,46 @@ function renderCellBaseVNs (params: VxeTableDefines.CellRenderBodyParams, conten
90
92
  return vns
91
93
  }
92
94
 
95
+ function renderHeaderCellDragIcon (params: VxeTableDefines.CellRenderHeaderParams) {
96
+ const { $table, column } = params
97
+ const { computeColumnOpts, computeColumnDragOpts } = $table.getComputeMaps()
98
+ const columnOpts = computeColumnOpts.value
99
+ const columnDragOpts = computeColumnDragOpts.value
100
+ const { showIcon, icon, visibleMethod, disabledMethod } = columnDragOpts
101
+ const isDisabled = disabledMethod && disabledMethod(params)
102
+ if (columnOpts.drag && showIcon && (!visibleMethod || visibleMethod(params))) {
103
+ if (!(column.fixed || column.parentId)) {
104
+ return h('span', {
105
+ key: 'dg',
106
+ class: ['vxe-cell--drag-handle', {
107
+ 'is--disabled': isDisabled
108
+ }],
109
+ onMousedown (evnt) {
110
+ if (!isDisabled) {
111
+ $table.handleHeaderCellDragMousedownEvent(evnt, params)
112
+ }
113
+ },
114
+ onMouseup: $table.handleHeaderCellDragMouseupEvent
115
+ }, [
116
+ h('i', {
117
+ class: icon || getIcon().TABLE_DRAG_COLUMN
118
+ })
119
+ ])
120
+ }
121
+ }
122
+ return renderEmptyElement($table)
123
+ }
124
+
125
+ function renderHeaderCellBaseVNs (params: VxeTableDefines.CellRenderHeaderParams, content: VNode | VNode[]) {
126
+ const vns = [
127
+ renderTitlePrefixIcon(params),
128
+ renderHeaderCellDragIcon(params),
129
+ ...(XEUtils.isArray(content) ? content : [content]),
130
+ renderTitleSuffixIcon(params)
131
+ ]
132
+ return vns
133
+ }
134
+
93
135
  function renderTitleContent (params: VxeTableDefines.CellRenderHeaderParams, content: VxeComponentSlotType | VxeComponentSlotType[]) {
94
136
  const { $table, column } = params
95
137
  const { props, reactData } = $table
@@ -264,7 +306,7 @@ export const Cell = {
264
306
  return createColumn($xeTable, columnOpts, renConfs)
265
307
  },
266
308
  /**
267
- * 单元格
309
+ * 列头标题
268
310
  */
269
311
  renderHeaderTitle (params: VxeTableDefines.CellRenderHeaderParams) {
270
312
  const { $table, column } = params
@@ -286,7 +328,7 @@ export const Cell = {
286
328
  return renderTitleContent(params, formatText(column.getTitle(), 1))
287
329
  },
288
330
  renderDefaultHeader (params: VxeTableDefines.CellRenderHeaderParams) {
289
- return renderTitlePrefixIcon(params).concat(Cell.renderHeaderTitle(params)).concat(renderTitleSuffixIcon(params))
331
+ return renderHeaderCellBaseVNs(params, Cell.renderHeaderTitle(params))
290
332
  },
291
333
  renderDefaultCell (params: VxeTableDefines.CellRenderBodyParams) {
292
334
  const { $table, row, column } = params
@@ -404,13 +446,13 @@ export const Cell = {
404
446
  },
405
447
 
406
448
  /**
407
- * 索引
449
+ * 序号
408
450
  */
409
451
  renderSeqHeader (params: VxeTableDefines.CellRenderHeaderParams) {
410
452
  const { $table, column } = params
411
453
  const { slots } = column
412
454
  const headerSlot = slots ? slots.header : null
413
- return renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) : formatText(column.getTitle(), 1))
455
+ return renderHeaderCellBaseVNs(params, renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) : formatText(column.getTitle(), 1)))
414
456
  },
415
457
  renderSeqCell (params: VxeTableDefines.CellRenderBodyParams) {
416
458
  const { $table, column } = params
@@ -441,13 +483,15 @@ export const Cell = {
441
483
  const { slots } = column
442
484
  const headerSlot = slots ? slots.header : null
443
485
  const titleSlot = slots ? slots.title : null
444
- return renderTitleContent(params, headerSlot
445
- ? $table.callSlot(headerSlot, params)
446
- : [
447
- h('span', {
448
- class: 'vxe-radio--label'
449
- }, titleSlot ? $table.callSlot(titleSlot, params) : formatText(column.getTitle(), 1))
450
- ])
486
+ return renderHeaderCellBaseVNs(params,
487
+ renderTitleContent(params, headerSlot
488
+ ? $table.callSlot(headerSlot, params)
489
+ : [
490
+ h('span', {
491
+ class: 'vxe-radio--label'
492
+ }, titleSlot ? $table.callSlot(titleSlot, params) : formatText(column.getTitle(), 1))
493
+ ])
494
+ )
451
495
  },
452
496
  renderRadioCell (params: VxeTableDefines.CellRenderBodyParams) {
453
497
  const { $table, column, isHidden } = params
@@ -535,36 +579,38 @@ export const Cell = {
535
579
  }
536
580
  const checkboxParams = { ...params, checked: isAllCheckboxSelected, disabled: isAllCheckboxDisabled, indeterminate: isAllCheckboxIndeterminate }
537
581
  if (headerSlot) {
538
- return renderTitleContent(checkboxParams, $table.callSlot(headerSlot, checkboxParams))
582
+ return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, $table.callSlot(headerSlot, checkboxParams)))
539
583
  }
540
584
  if (checkboxOpts.checkStrictly ? !checkboxOpts.showHeader : checkboxOpts.showHeader === false) {
541
- return renderTitleContent(checkboxParams, [
585
+ return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, [
542
586
  h('span', {
543
587
  class: 'vxe-checkbox--label'
544
588
  }, titleSlot ? $table.callSlot(titleSlot, checkboxParams) : headerTitle)
545
- ])
589
+ ]))
546
590
  }
547
- return renderTitleContent(checkboxParams, [
548
- h('span', {
549
- class: ['vxe-cell--checkbox', {
550
- 'is--checked': isAllCheckboxSelected,
551
- 'is--disabled': isAllCheckboxDisabled,
552
- 'is--indeterminate': isAllCheckboxIndeterminate
553
- }],
554
- title: getI18n('vxe.table.allTitle'),
555
- ...ons
556
- }, [
591
+ return renderHeaderCellBaseVNs(params,
592
+ renderTitleContent(checkboxParams, [
557
593
  h('span', {
558
- class: ['vxe-checkbox--icon', isAllCheckboxIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllCheckboxSelected ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
559
- })
560
- ].concat(titleSlot || headerTitle
561
- ? [
562
- h('span', {
563
- class: 'vxe-checkbox--label'
564
- }, titleSlot ? $table.callSlot(titleSlot, checkboxParams) : headerTitle)
565
- ]
566
- : []))
567
- ])
594
+ class: ['vxe-cell--checkbox', {
595
+ 'is--checked': isAllCheckboxSelected,
596
+ 'is--disabled': isAllCheckboxDisabled,
597
+ 'is--indeterminate': isAllCheckboxIndeterminate
598
+ }],
599
+ title: getI18n('vxe.table.allTitle'),
600
+ ...ons
601
+ }, [
602
+ h('span', {
603
+ class: ['vxe-checkbox--icon', isAllCheckboxIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllCheckboxSelected ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
604
+ })
605
+ ].concat(titleSlot || headerTitle
606
+ ? [
607
+ h('span', {
608
+ class: 'vxe-checkbox--label'
609
+ }, titleSlot ? $table.callSlot(titleSlot, checkboxParams) : headerTitle)
610
+ ]
611
+ : []))
612
+ ])
613
+ )
568
614
  },
569
615
  renderCheckboxCell (params: VxeTableDefines.CellRenderBodyParams) {
570
616
  const { $table, row, column, isHidden } = params
@@ -786,23 +832,21 @@ export const Cell = {
786
832
  ])
787
833
  },
788
834
  renderTreeHTMLCell (params: VxeTableDefines.CellRenderBodyParams) {
789
- return Cell.renderTreeIcon(params, Cell.renderHTMLCell(params) as VNode[])
835
+ return Cell.renderTreeIcon(params, Cell.renderHTMLCell(params))
790
836
  },
791
837
 
792
838
  /**
793
839
  * 排序和筛选
794
840
  */
795
841
  renderSortAndFilterHeader (params: VxeTableDefines.CellRenderHeaderParams) {
796
- return Cell.renderDefaultHeader(params)
797
- .concat(Cell.renderSortIcon(params))
798
- .concat(Cell.renderFilterIcon(params))
842
+ return renderHeaderCellBaseVNs(params, Cell.renderHeaderTitle(params).concat(Cell.renderSortIcon(params).concat(Cell.renderFilterIcon(params))))
799
843
  },
800
844
 
801
845
  /**
802
846
  * 排序
803
847
  */
804
848
  renderSortHeader (params: VxeTableDefines.CellRenderHeaderParams) {
805
- return Cell.renderDefaultHeader(params).concat(Cell.renderSortIcon(params))
849
+ return renderHeaderCellBaseVNs(params, Cell.renderHeaderTitle(params).concat(Cell.renderSortIcon(params)))
806
850
  },
807
851
  renderSortIcon (params: VxeTableDefines.CellRenderHeaderParams | VxeTableDefines.CellRenderHeaderParams) {
808
852
  const { $table, column } = params
@@ -845,7 +889,7 @@ export const Cell = {
845
889
  * 筛选
846
890
  */
847
891
  renderFilterHeader (params: VxeTableDefines.CellRenderHeaderParams) {
848
- return Cell.renderDefaultHeader(params).concat(Cell.renderFilterIcon(params))
892
+ return renderHeaderCellBaseVNs(params, Cell.renderHeaderTitle(params).concat(Cell.renderFilterIcon(params)))
849
893
  },
850
894
  renderFilterIcon (params: VxeTableDefines.CellRenderHeaderParams) {
851
895
  const { $table, column, hasFilter } = params
@@ -892,22 +936,26 @@ export const Cell = {
892
936
  isRequired = columnRules.some((rule) => rule.required)
893
937
  }
894
938
  }
895
- return (isEnableConf(editConfig)
896
- ? [
897
- isRequired && editOpts.showAsterisk
898
- ? h('i', {
899
- class: 'vxe-cell--required-icon'
900
- })
901
- : null,
902
- isEnableConf(editRender) && editOpts.showIcon
903
- ? h('i', {
904
- class: ['vxe-cell--edit-icon', editOpts.icon || getIcon().TABLE_EDIT]
905
- })
906
- : null
907
- ]
908
- : []).concat(Cell.renderDefaultHeader(params))
909
- .concat(sortable ? Cell.renderSortIcon(params) : [])
910
- .concat(filters ? Cell.renderFilterIcon(params) : [])
939
+ let editIconVNs: VNode[] = []
940
+ if (isEnableConf(editConfig)) {
941
+ editIconVNs = [
942
+ isRequired && editOpts.showAsterisk
943
+ ? h('i', {
944
+ class: 'vxe-cell--required-icon'
945
+ })
946
+ : renderEmptyElement($table),
947
+ isEnableConf(editRender) && editOpts.showIcon
948
+ ? h('i', {
949
+ class: ['vxe-cell--edit-icon', editOpts.icon || getIcon().TABLE_EDIT]
950
+ })
951
+ : renderEmptyElement($table)
952
+ ]
953
+ }
954
+ return renderHeaderCellBaseVNs(params,
955
+ editIconVNs.concat(Cell.renderHeaderTitle(params))
956
+ .concat(sortable ? Cell.renderSortIcon(params) : [])
957
+ .concat(filters ? Cell.renderFilterIcon(params) : [])
958
+ )
911
959
  },
912
960
  // 行格编辑模式
913
961
  renderRowEdit (params: VxeTableDefines.CellRenderBodyParams) {
@@ -45,6 +45,9 @@ export default [
45
45
  'row-dragstart',
46
46
  'row-dragover',
47
47
  'row-dragend',
48
+ 'column-dragstart',
49
+ 'column-dragover',
50
+ 'column-dragend',
48
51
 
49
52
  'edit-actived', // 废弃
50
53