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
@@ -1,7 +1,7 @@
1
1
  import { createCommentVNode, defineComponent, TransitionGroup, h, ref, inject, nextTick, onBeforeUnmount, onMounted, onUnmounted } from 'vue';
2
2
  import XEUtils from 'xe-utils';
3
3
  import { VxeUI } from '../../ui';
4
- import { mergeBodyMethod, getRowid } from './util';
4
+ import { mergeBodyMethod, getRowid, getRefElem } from './util';
5
5
  import { updateCellTitle, getPropClass, setScrollTop, setScrollLeft } from '../../ui/src/dom';
6
6
  import { isEnableConf } from '../../ui/src/utils';
7
7
  import { getSlotVNs } from '../../ui/src/vn';
@@ -338,19 +338,20 @@ export default defineComponent({
338
338
  getPropClass(compCellClassName, params),
339
339
  getPropClass(className, params),
340
340
  getPropClass(allCellClassName, params)
341
- ], key: columnKey || columnOpts.useKey || rowOpts.useKey ? colid : $columnIndex }, attrs), { style: Object.assign({
341
+ ], key: columnKey || columnOpts.useKey || rowOpts.useKey || columnOpts.drag ? colid : $columnIndex }, attrs), { style: Object.assign({
342
342
  height: cellHeight
343
343
  }, XEUtils.isFunction(compCellStyle) ? compCellStyle(params) : compCellStyle, XEUtils.isFunction(cellStyle) ? cellStyle(params) : cellStyle) }), tdOns), tdVNs);
344
344
  };
345
345
  const renderRows = (fixedType, tableData, tableColumn) => {
346
346
  const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, showOverflow: allColumnOverflow, editConfig, treeConfig } = tableProps;
347
- const { hasFixedColumn, treeExpandedMaps, scrollYLoad, rowExpandedMaps, expandColumn, selectRadioRow, pendingRowMaps, pendingRowList } = tableReactData;
347
+ const { hasFixedColumn, treeExpandedMaps, scrollYLoad, rowExpandedMaps, expandColumn, selectRadioRow, pendingRowMaps, pendingRowList, isDragColMove } = tableReactData;
348
348
  const { fullAllDataRowIdData } = tableInternalData;
349
349
  const checkboxOpts = computeCheckboxOpts.value;
350
350
  const radioOpts = computeRadioOpts.value;
351
351
  const treeOpts = computeTreeOpts.value;
352
352
  const editOpts = computeEditOpts.value;
353
353
  const rowOpts = computeRowOpts.value;
354
+ const columnOpts = computeColumnOpts.value;
354
355
  const { transform } = treeOpts;
355
356
  const childrenField = treeOpts.children || treeOpts.childrenField;
356
357
  const rows = [];
@@ -405,23 +406,29 @@ export default defineComponent({
405
406
  rowChildren = row[childrenField];
406
407
  isExpandTree = rowChildren && rowChildren.length > 0 && !!treeExpandedMaps[rowid];
407
408
  }
408
- rows.push(h('tr', Object.assign({ class: [
409
- 'vxe-body--row',
410
- treeConfig ? `row--level-${rowLevel}` : '',
411
- {
412
- 'row--stripe': stripe && ($xeTable.getVTRowIndex(row) + 1) % 2 === 0,
413
- 'is--new': isNewRow,
414
- 'is--expand-row': isExpandRow,
415
- 'is--expand-tree': isExpandTree,
416
- 'row--new': isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
417
- 'row--radio': radioOpts.highlight && $xeTable.eqRow(selectRadioRow, row),
418
- 'row--checked': checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
419
- 'row--pending': pendingRowList.length && !!pendingRowMaps[rowid]
420
- },
421
- getPropClass(rowClassName, params)
422
- ], rowid: rowid, style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null, key: rowKey || rowOpts.useKey || rowOpts.drag || treeConfig ? rowid : $rowIndex }, trOn), tableColumn.map((column, $columnIndex) => {
409
+ const trClass = [
410
+ 'vxe-body--row',
411
+ treeConfig ? `row--level-${rowLevel}` : '',
412
+ {
413
+ 'row--stripe': stripe && ($xeTable.getVTRowIndex(row) + 1) % 2 === 0,
414
+ 'is--new': isNewRow,
415
+ 'is--expand-row': isExpandRow,
416
+ 'is--expand-tree': isExpandTree,
417
+ 'row--new': isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
418
+ 'row--radio': radioOpts.highlight && $xeTable.eqRow(selectRadioRow, row),
419
+ 'row--checked': checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
420
+ 'row--pending': pendingRowList.length && !!pendingRowMaps[rowid]
421
+ },
422
+ getPropClass(rowClassName, params)
423
+ ];
424
+ const tdVNs = tableColumn.map((column, $columnIndex) => {
423
425
  return renderColumn(seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
424
- })));
426
+ });
427
+ rows.push(columnOpts.drag
428
+ ? h(TransitionGroup, Object.assign({ name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`, tag: 'tr', class: trClass, rowid: rowid, style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null, key: rowKey || rowOpts.useKey || rowOpts.drag || treeConfig ? rowid : $rowIndex }, trOn), {
429
+ default: () => tdVNs
430
+ })
431
+ : h('tr', Object.assign({ class: trClass, rowid: rowid, style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null, key: rowKey || rowOpts.useKey || rowOpts.drag || treeConfig ? rowid : $rowIndex }, trOn), tdVNs));
425
432
  // 如果行被展开了
426
433
  if (isExpandRow) {
427
434
  const expandOpts = computeExpandOpts.value;
@@ -538,10 +545,8 @@ export default defineComponent({
538
545
  const leftElem = leftBody ? leftBody.$el : null;
539
546
  const rightElem = rightBody ? rightBody.$el : null;
540
547
  const bodyElem = tableBody.$el;
541
- const bodyYRef = elemStore['main-body-ySpace'];
542
- const bodyYElem = bodyYRef ? bodyYRef.value : null;
543
- const bodyXRef = elemStore['main-body-xSpace'];
544
- const bodyXElem = bodyXRef ? bodyXRef.value : null;
548
+ const bodyYElem = getRefElem(elemStore['main-body-ySpace']);
549
+ const bodyXElem = getRefElem(elemStore['main-body-xSpace']);
545
550
  const bodyHeight = scrollYLoad && bodyYElem ? bodyYElem.clientHeight : bodyElem.clientHeight;
546
551
  const bodyWidth = scrollXLoad && bodyXElem ? bodyXElem.clientWidth : bodyElem.clientWidth;
547
552
  const remainSize = isPrevWheelTop === isTopWheel ? Math.max(0, wheelYSize - wheelYTotal) : 0;
@@ -664,6 +669,7 @@ export default defineComponent({
664
669
  const emptyOpts = computeEmptyOpts.value;
665
670
  const keyboardOpts = computeKeyboardOpts.value;
666
671
  const mouseOpts = computeMouseOpts.value;
672
+ const columnOpts = computeColumnOpts.value;
667
673
  // const isMergeLeftFixedExceeded = computeIsMergeLeftFixedExceeded.value
668
674
  // const isMergeRightFixedExceeded = computeIsMergeRightFixedExceeded.value
669
675
  // 如果是使用优化模式
@@ -737,8 +743,9 @@ export default defineComponent({
737
743
  /**
738
744
  * 内容
739
745
  */
740
- rowOpts.drag
746
+ rowOpts.drag || columnOpts.drag
741
747
  ? h(TransitionGroup, {
748
+ ref: refBodyTBody,
742
749
  name: `vxe-body--row-list${isDragRowMove ? '' : '-disabled'}`,
743
750
  tag: 'tbody'
744
751
  }, {
@@ -9,43 +9,44 @@ const { getI18n, getIcon, renderer, formats, renderEmptyElement } = VxeUI;
9
9
  function renderTitlePrefixIcon(params) {
10
10
  const { $table, column } = params;
11
11
  const titlePrefix = column.titlePrefix || column.titleHelp;
12
- return titlePrefix
13
- ? [
14
- h('i', {
15
- class: ['vxe-cell-title-prefix-icon', titlePrefix.icon || getIcon().TABLE_TITLE_PREFIX],
16
- onMouseenter(evnt) {
17
- $table.triggerHeaderTitleEvent(evnt, titlePrefix, params);
18
- },
19
- onMouseleave(evnt) {
20
- $table.handleTargetLeaveEvent(evnt);
21
- }
22
- })
23
- ]
24
- : [];
12
+ if (titlePrefix) {
13
+ return h('i', {
14
+ class: ['vxe-cell-title-prefix-icon', titlePrefix.icon || getIcon().TABLE_TITLE_PREFIX],
15
+ onMouseenter(evnt) {
16
+ $table.triggerHeaderTitleEvent(evnt, titlePrefix, params);
17
+ },
18
+ onMouseleave(evnt) {
19
+ $table.handleTargetLeaveEvent(evnt);
20
+ }
21
+ });
22
+ }
23
+ return renderEmptyElement($table);
25
24
  }
26
25
  function renderTitleSuffixIcon(params) {
27
26
  const { $table, column } = params;
28
27
  const titleSuffix = column.titleSuffix;
29
- return titleSuffix
30
- ? [
31
- h('i', {
32
- class: ['vxe-cell-title-suffix-icon', titleSuffix.icon || getIcon().TABLE_TITLE_SUFFIX],
33
- onMouseenter(evnt) {
34
- $table.triggerHeaderTitleEvent(evnt, titleSuffix, params);
35
- },
36
- onMouseleave(evnt) {
37
- $table.handleTargetLeaveEvent(evnt);
38
- }
39
- })
40
- ]
41
- : [];
28
+ if (titleSuffix) {
29
+ h('i', {
30
+ class: ['vxe-cell-title-suffix-icon', titleSuffix.icon || getIcon().TABLE_TITLE_SUFFIX],
31
+ onMouseenter(evnt) {
32
+ $table.triggerHeaderTitleEvent(evnt, titleSuffix, params);
33
+ },
34
+ onMouseleave(evnt) {
35
+ $table.handleTargetLeaveEvent(evnt);
36
+ }
37
+ });
38
+ }
39
+ return renderEmptyElement($table);
42
40
  }
43
41
  function renderCellDragIcon(params) {
44
42
  const { $table } = params;
45
- const { computeDragOpts } = $table.getComputeMaps();
46
- const dragOpts = computeDragOpts.value;
47
- const { rowIcon, rowDisabledMethod } = dragOpts;
48
- const isDisabled = rowDisabledMethod && rowDisabledMethod(params);
43
+ const tableProps = $table.props;
44
+ const { dragConfig } = tableProps;
45
+ const { computeRowDragOpts } = $table.getComputeMaps();
46
+ const rowDragOpts = computeRowDragOpts.value;
47
+ const { icon, disabledMethod } = rowDragOpts;
48
+ const rDisabledMethod = disabledMethod || (dragConfig ? dragConfig.rowDisabledMethod : null);
49
+ const isDisabled = rDisabledMethod && rDisabledMethod(params);
49
50
  return h('span', {
50
51
  key: 'dg',
51
52
  class: ['vxe-cell--drag-handle', {
@@ -59,7 +60,7 @@ function renderCellDragIcon(params) {
59
60
  onMouseup: $table.handleCellDragMouseupEvent
60
61
  }, [
61
62
  h('i', {
62
- class: rowIcon || getIcon().TABLE_DRAG_ROW
63
+ class: icon || (dragConfig ? dragConfig.rowIcon : '') || getIcon().TABLE_DRAG_ROW
63
64
  })
64
65
  ]);
65
66
  }
@@ -67,19 +68,58 @@ function renderCellBaseVNs(params, content) {
67
68
  const { $table, column, level } = params;
68
69
  const { dragSort } = column;
69
70
  const tableProps = $table.props;
70
- const { treeConfig } = tableProps;
71
- const { computeRowOpts, computeDragOpts } = $table.getComputeMaps();
71
+ const { treeConfig, dragConfig } = tableProps;
72
+ const { computeRowOpts, computeRowDragOpts } = $table.getComputeMaps();
72
73
  const rowOpts = computeRowOpts.value;
73
- const dragOpts = computeDragOpts.value;
74
- const { showRowIcon, rowVisibleMethod } = dragOpts;
74
+ const rowDragOpts = computeRowDragOpts.value;
75
+ const { showIcon, visibleMethod } = rowDragOpts;
76
+ const rVisibleMethod = visibleMethod || (dragConfig ? dragConfig.rowVisibleMethod : null);
75
77
  const vns = XEUtils.isArray(content) ? content : [content];
76
- if (dragSort && rowOpts.drag && (showRowIcon && (!rowVisibleMethod || rowVisibleMethod(params)))) {
78
+ if (dragSort && rowOpts.drag && ((showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params)))) {
77
79
  if (!treeConfig || !level) {
78
80
  vns.unshift(renderCellDragIcon(params));
79
81
  }
80
82
  }
81
83
  return vns;
82
84
  }
85
+ function renderHeaderCellDragIcon(params) {
86
+ const { $table, column } = params;
87
+ const { computeColumnOpts, computeColumnDragOpts } = $table.getComputeMaps();
88
+ const columnOpts = computeColumnOpts.value;
89
+ const columnDragOpts = computeColumnDragOpts.value;
90
+ const { showIcon, icon, visibleMethod, disabledMethod } = columnDragOpts;
91
+ const isDisabled = disabledMethod && disabledMethod(params);
92
+ if (columnOpts.drag && showIcon && (!visibleMethod || visibleMethod(params))) {
93
+ if (!(column.fixed || column.parentId)) {
94
+ return h('span', {
95
+ key: 'dg',
96
+ class: ['vxe-cell--drag-handle', {
97
+ 'is--disabled': isDisabled
98
+ }],
99
+ onMousedown(evnt) {
100
+ if (!isDisabled) {
101
+ $table.handleHeaderCellDragMousedownEvent(evnt, params);
102
+ }
103
+ },
104
+ onMouseup: $table.handleHeaderCellDragMouseupEvent
105
+ }, [
106
+ h('i', {
107
+ class: icon || getIcon().TABLE_DRAG_COLUMN
108
+ })
109
+ ]);
110
+ }
111
+ }
112
+ return renderEmptyElement($table);
113
+ }
114
+ function renderHeaderCellBaseVNs(params, content) {
115
+ const vns = [
116
+ renderTitlePrefixIcon(params),
117
+ renderHeaderCellDragIcon(params),
118
+ ...(XEUtils.isArray(content) ? content : [content]),
119
+ renderTitleSuffixIcon(params)
120
+ ];
121
+ return vns;
122
+ }
83
123
  function renderTitleContent(params, content) {
84
124
  const { $table, column } = params;
85
125
  const { props, reactData } = $table;
@@ -243,7 +283,7 @@ export const Cell = {
243
283
  return createColumn($xeTable, columnOpts, renConfs);
244
284
  },
245
285
  /**
246
- * 单元格
286
+ * 列头标题
247
287
  */
248
288
  renderHeaderTitle(params) {
249
289
  const { $table, column } = params;
@@ -265,7 +305,7 @@ export const Cell = {
265
305
  return renderTitleContent(params, formatText(column.getTitle(), 1));
266
306
  },
267
307
  renderDefaultHeader(params) {
268
- return renderTitlePrefixIcon(params).concat(Cell.renderHeaderTitle(params)).concat(renderTitleSuffixIcon(params));
308
+ return renderHeaderCellBaseVNs(params, Cell.renderHeaderTitle(params));
269
309
  },
270
310
  renderDefaultCell(params) {
271
311
  const { $table, row, column } = params;
@@ -377,13 +417,13 @@ export const Cell = {
377
417
  ];
378
418
  },
379
419
  /**
380
- * 索引
420
+ * 序号
381
421
  */
382
422
  renderSeqHeader(params) {
383
423
  const { $table, column } = params;
384
424
  const { slots } = column;
385
425
  const headerSlot = slots ? slots.header : null;
386
- return renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) : formatText(column.getTitle(), 1));
426
+ return renderHeaderCellBaseVNs(params, renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) : formatText(column.getTitle(), 1)));
387
427
  },
388
428
  renderSeqCell(params) {
389
429
  const { $table, column } = params;
@@ -413,13 +453,13 @@ export const Cell = {
413
453
  const { slots } = column;
414
454
  const headerSlot = slots ? slots.header : null;
415
455
  const titleSlot = slots ? slots.title : null;
416
- return renderTitleContent(params, headerSlot
456
+ return renderHeaderCellBaseVNs(params, renderTitleContent(params, headerSlot
417
457
  ? $table.callSlot(headerSlot, params)
418
458
  : [
419
459
  h('span', {
420
460
  class: 'vxe-radio--label'
421
461
  }, titleSlot ? $table.callSlot(titleSlot, params) : formatText(column.getTitle(), 1))
422
- ]);
462
+ ]));
423
463
  },
424
464
  renderRadioCell(params) {
425
465
  const { $table, column, isHidden } = params;
@@ -499,16 +539,16 @@ export const Cell = {
499
539
  }
500
540
  const checkboxParams = Object.assign(Object.assign({}, params), { checked: isAllCheckboxSelected, disabled: isAllCheckboxDisabled, indeterminate: isAllCheckboxIndeterminate });
501
541
  if (headerSlot) {
502
- return renderTitleContent(checkboxParams, $table.callSlot(headerSlot, checkboxParams));
542
+ return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, $table.callSlot(headerSlot, checkboxParams)));
503
543
  }
504
544
  if (checkboxOpts.checkStrictly ? !checkboxOpts.showHeader : checkboxOpts.showHeader === false) {
505
- return renderTitleContent(checkboxParams, [
545
+ return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, [
506
546
  h('span', {
507
547
  class: 'vxe-checkbox--label'
508
548
  }, titleSlot ? $table.callSlot(titleSlot, checkboxParams) : headerTitle)
509
- ]);
549
+ ]));
510
550
  }
511
- return renderTitleContent(checkboxParams, [
551
+ return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, [
512
552
  h('span', Object.assign({ class: ['vxe-cell--checkbox', {
513
553
  'is--checked': isAllCheckboxSelected,
514
554
  'is--disabled': isAllCheckboxDisabled,
@@ -524,7 +564,7 @@ export const Cell = {
524
564
  }, titleSlot ? $table.callSlot(titleSlot, checkboxParams) : headerTitle)
525
565
  ]
526
566
  : []))
527
- ]);
567
+ ]));
528
568
  },
529
569
  renderCheckboxCell(params) {
530
570
  const { $table, row, column, isHidden } = params;
@@ -736,15 +776,13 @@ export const Cell = {
736
776
  * 排序和筛选
737
777
  */
738
778
  renderSortAndFilterHeader(params) {
739
- return Cell.renderDefaultHeader(params)
740
- .concat(Cell.renderSortIcon(params))
741
- .concat(Cell.renderFilterIcon(params));
779
+ return renderHeaderCellBaseVNs(params, Cell.renderHeaderTitle(params).concat(Cell.renderSortIcon(params).concat(Cell.renderFilterIcon(params))));
742
780
  },
743
781
  /**
744
782
  * 排序
745
783
  */
746
784
  renderSortHeader(params) {
747
- return Cell.renderDefaultHeader(params).concat(Cell.renderSortIcon(params));
785
+ return renderHeaderCellBaseVNs(params, Cell.renderHeaderTitle(params).concat(Cell.renderSortIcon(params)));
748
786
  },
749
787
  renderSortIcon(params) {
750
788
  const { $table, column } = params;
@@ -786,7 +824,7 @@ export const Cell = {
786
824
  * 筛选
787
825
  */
788
826
  renderFilterHeader(params) {
789
- return Cell.renderDefaultHeader(params).concat(Cell.renderFilterIcon(params));
827
+ return renderHeaderCellBaseVNs(params, Cell.renderHeaderTitle(params).concat(Cell.renderFilterIcon(params)));
790
828
  },
791
829
  renderFilterIcon(params) {
792
830
  const { $table, column, hasFilter } = params;
@@ -832,22 +870,24 @@ export const Cell = {
832
870
  isRequired = columnRules.some((rule) => rule.required);
833
871
  }
834
872
  }
835
- return (isEnableConf(editConfig)
836
- ? [
873
+ let editIconVNs = [];
874
+ if (isEnableConf(editConfig)) {
875
+ editIconVNs = [
837
876
  isRequired && editOpts.showAsterisk
838
877
  ? h('i', {
839
878
  class: 'vxe-cell--required-icon'
840
879
  })
841
- : null,
880
+ : renderEmptyElement($table),
842
881
  isEnableConf(editRender) && editOpts.showIcon
843
882
  ? h('i', {
844
883
  class: ['vxe-cell--edit-icon', editOpts.icon || getIcon().TABLE_EDIT]
845
884
  })
846
- : null
847
- ]
848
- : []).concat(Cell.renderDefaultHeader(params))
885
+ : renderEmptyElement($table)
886
+ ];
887
+ }
888
+ return renderHeaderCellBaseVNs(params, editIconVNs.concat(Cell.renderHeaderTitle(params))
849
889
  .concat(sortable ? Cell.renderSortIcon(params) : [])
850
- .concat(filters ? Cell.renderFilterIcon(params) : []);
890
+ .concat(filters ? Cell.renderFilterIcon(params) : []));
851
891
  },
852
892
  // 行格编辑模式
853
893
  renderRowEdit(params) {
@@ -42,6 +42,9 @@ export default [
42
42
  'row-dragstart',
43
43
  'row-dragover',
44
44
  'row-dragend',
45
+ 'column-dragstart',
46
+ 'column-dragover',
47
+ 'column-dragend',
45
48
  'edit-actived',
46
49
  'edit-activated',
47
50
  'edit-disabled',