vxe-table 3.10.15 → 3.11.0

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 (72) hide show
  1. package/README.md +1 -1
  2. package/es/style.css +1 -1
  3. package/es/style.min.css +1 -1
  4. package/es/table/module/custom/mixin.js +5 -1
  5. package/es/table/module/edit/mixin.js +24 -15
  6. package/es/table/module/validator/mixin.js +31 -10
  7. package/es/table/src/body.js +40 -24
  8. package/es/table/src/cell.js +75 -32
  9. package/es/table/src/footer.js +159 -131
  10. package/es/table/src/header.js +128 -90
  11. package/es/table/src/methods.js +292 -66
  12. package/es/table/src/props.js +5 -1
  13. package/es/table/src/table.js +64 -20
  14. package/es/table/style.css +33 -20
  15. package/es/table/style.min.css +1 -1
  16. package/es/ui/index.js +9 -4
  17. package/es/ui/src/log.js +1 -1
  18. package/es/vxe-table/style.css +33 -20
  19. package/es/vxe-table/style.min.css +1 -1
  20. package/helper/vetur/attributes.json +1 -1
  21. package/helper/vetur/tags.json +1 -1
  22. package/lib/index.umd.js +945 -460
  23. package/lib/index.umd.min.js +1 -1
  24. package/lib/style.css +1 -1
  25. package/lib/style.min.css +1 -1
  26. package/lib/table/module/custom/mixin.js +5 -1
  27. package/lib/table/module/custom/mixin.min.js +1 -1
  28. package/lib/table/module/edit/mixin.js +24 -15
  29. package/lib/table/module/edit/mixin.min.js +1 -1
  30. package/lib/table/module/validator/mixin.js +31 -10
  31. package/lib/table/module/validator/mixin.min.js +1 -1
  32. package/lib/table/src/body.js +31 -15
  33. package/lib/table/src/body.min.js +1 -1
  34. package/lib/table/src/cell.js +82 -35
  35. package/lib/table/src/cell.min.js +1 -1
  36. package/lib/table/src/footer.js +198 -161
  37. package/lib/table/src/footer.min.js +1 -1
  38. package/lib/table/src/header.js +169 -128
  39. package/lib/table/src/header.min.js +1 -1
  40. package/lib/table/src/methods.js +321 -69
  41. package/lib/table/src/methods.min.js +1 -1
  42. package/lib/table/src/props.js +5 -1
  43. package/lib/table/src/props.min.js +1 -1
  44. package/lib/table/src/table.js +70 -20
  45. package/lib/table/src/table.min.js +1 -1
  46. package/lib/table/style/style.css +33 -20
  47. package/lib/table/style/style.min.css +1 -1
  48. package/lib/ui/index.js +9 -4
  49. package/lib/ui/index.min.js +1 -1
  50. package/lib/ui/src/log.js +1 -1
  51. package/lib/ui/src/log.min.js +1 -1
  52. package/lib/vxe-table/style/style.css +33 -20
  53. package/lib/vxe-table/style/style.min.css +1 -1
  54. package/package.json +3 -3
  55. package/packages/table/module/custom/mixin.ts +5 -1
  56. package/packages/table/module/edit/mixin.ts +24 -15
  57. package/packages/table/module/validator/mixin.ts +33 -10
  58. package/packages/table/src/body.ts +43 -25
  59. package/packages/table/src/cell.ts +120 -67
  60. package/packages/table/src/footer.ts +164 -150
  61. package/packages/table/src/header.ts +136 -90
  62. package/packages/table/src/methods.ts +304 -68
  63. package/packages/table/src/props.ts +5 -1
  64. package/packages/table/src/table.ts +71 -19
  65. package/packages/ui/index.ts +8 -3
  66. package/styles/components/table.scss +42 -35
  67. /package/es/{iconfont.1731574584971.ttf → iconfont.1731890707082.ttf} +0 -0
  68. /package/es/{iconfont.1731574584971.woff → iconfont.1731890707082.woff} +0 -0
  69. /package/es/{iconfont.1731574584971.woff2 → iconfont.1731890707082.woff2} +0 -0
  70. /package/lib/{iconfont.1731574584971.ttf → iconfont.1731890707082.ttf} +0 -0
  71. /package/lib/{iconfont.1731574584971.woff → iconfont.1731890707082.woff} +0 -0
  72. /package/lib/{iconfont.1731574584971.woff2 → iconfont.1731890707082.woff2} +0 -0
@@ -72,7 +72,7 @@ export default {
72
72
  warnLog('vxe.error.notValidators', ['fullValidate(rows, callback)', 'fullValidate(rows)']);
73
73
  }
74
74
  }
75
- return this.beginValidate(rows, cb, true);
75
+ return this.beginValidate(rows, null, cb, true);
76
76
  },
77
77
  /**
78
78
  * 快速校验,如果存在记录不通过的记录,则返回不再继续校验(异步校验除外)
@@ -83,7 +83,27 @@ export default {
83
83
  warnLog('vxe.error.notValidators', ['validate(rows, callback)', 'validate(rows)']);
84
84
  }
85
85
  }
86
- return this.beginValidate(rows, cb);
86
+ return this.beginValidate(rows, null, cb);
87
+ },
88
+ /**
89
+ * 完整校验单元格,和 validateField 的区别就是会给有效数据中的每一行进行校验
90
+ */
91
+ _fullValidateField(rows, fieldOrColumn) {
92
+ const colList = (XEUtils.isArray(fieldOrColumn) ? fieldOrColumn : (fieldOrColumn ? [fieldOrColumn] : [])).map(column => handleFieldOrColumn(this, column));
93
+ if (colList.length) {
94
+ return this.beginValidate(rows, colList, null, true);
95
+ }
96
+ return this.$nextTick();
97
+ },
98
+ /**
99
+ * 快速校验单元格,如果存在记录不通过的记录,则返回不再继续校验(异步校验除外)
100
+ */
101
+ _validateField(rows, fieldOrColumn) {
102
+ const colList = (XEUtils.isArray(fieldOrColumn) ? fieldOrColumn : (fieldOrColumn ? [fieldOrColumn] : [])).map(column => handleFieldOrColumn(this, column));
103
+ if (colList.length) {
104
+ return this.beginValidate(rows, colList, null);
105
+ }
106
+ return this.$nextTick();
87
107
  },
88
108
  /**
89
109
  * 聚焦到校验通过的单元格并弹出校验错误提示
@@ -126,7 +146,7 @@ export default {
126
146
  * 如果只传 callback 否则默认验证整个表格数据
127
147
  * 返回 Promise 对象,或者使用回调方式
128
148
  */
129
- beginValidate(rows, cb, isFull) {
149
+ beginValidate(rows, cols, cb, isFull) {
130
150
  const validRest = {};
131
151
  const { editRules, afterFullData, visibleColumn, treeConfig, treeOpts } = this;
132
152
  const childrenField = treeOpts.children || treeOpts.childrenField;
@@ -151,12 +171,13 @@ export default {
151
171
  this.clearValidate();
152
172
  const validErrMaps = {};
153
173
  if (editRules) {
154
- const columns = this.getColumns();
174
+ const columns = cols && cols.length ? cols : this.getColumns();
155
175
  const handleVaild = (row) => {
156
176
  if (isFull || !this.validRuleErr) {
157
177
  const colVailds = [];
158
178
  columns.forEach((column) => {
159
- if ((isFull || !this.validRuleErr) && XEUtils.has(editRules, column.property)) {
179
+ const field = XEUtils.isString(column) ? column : column.field;
180
+ if ((isFull || !this.validRuleErr) && XEUtils.has(editRules, field)) {
160
181
  colVailds.push(this.validCellRules('all', row, column)
161
182
  .catch(({ rule, rules }) => {
162
183
  const rest = {
@@ -166,11 +187,11 @@ export default {
166
187
  row,
167
188
  columnIndex: this.getColumnIndex(column),
168
189
  column,
169
- field: column.property,
190
+ field,
170
191
  $table: this
171
192
  };
172
- if (!validRest[column.property]) {
173
- validRest[column.property] = [];
193
+ if (!validRest[field]) {
194
+ validRest[field] = [];
174
195
  }
175
196
  validErrMaps[`${getRowid(this, row)}:${column.id}`] = {
176
197
  column,
@@ -178,7 +199,7 @@ export default {
178
199
  rule,
179
200
  content: rule.content
180
201
  };
181
- validRest[column.property].push(rest);
202
+ validRest[field].push(rest);
182
203
  if (!isFull) {
183
204
  this.validRuleErr = true;
184
205
  return Promise.reject(rest);
@@ -376,7 +397,7 @@ export default {
376
397
  const { validOpts, validErrorMaps } = this;
377
398
  const validTip = this.$refs.validTip;
378
399
  const rowList = XEUtils.isArray(rows) ? rows : (rows ? [rows] : []);
379
- const colList = (XEUtils.isArray(fieldOrColumn) ? fieldOrColumn : (fieldOrColumn ? [fieldOrColumn] : []).map(column => handleFieldOrColumn(this, column)));
400
+ const colList = (XEUtils.isArray(fieldOrColumn) ? fieldOrColumn : (fieldOrColumn ? [fieldOrColumn] : [])).map(column => handleFieldOrColumn(this, column));
380
401
  let validErrMaps = {};
381
402
  if (validTip && validTip.visible) {
382
403
  validTip.close();
@@ -270,7 +270,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
270
270
  }, tdVNs);
271
271
  }
272
272
  function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
273
- const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, showOverflow: allColumnOverflow, treeConfig, treeOpts, expandOpts, editOpts, treeExpandedMaps, scrollYLoad, rowExpandedMaps, radioOpts, checkboxOpts, expandColumn, hasFixedColumn, fullAllDataRowIdData, rowOpts, pendingRowList, pendingRowMaps } = $xeTable;
273
+ const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, showOverflow: allColumnOverflow, treeConfig, treeOpts, expandOpts, editOpts, treeExpandedMaps, scrollYLoad, rowExpandedMaps, radioOpts, checkboxOpts, expandColumn, hasFixedColumn, fullAllDataRowIdData, rowOpts, pendingRowList, pendingRowMaps, columnOpts, isDragColMove } = $xeTable;
274
274
  const childrenField = treeOpts.children || treeOpts.childrenField;
275
275
  const rows = [];
276
276
  tableData.forEach((row, $rowIndex) => {
@@ -325,31 +325,47 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
325
325
  rowChildren = row[childrenField];
326
326
  isExpandTree = rowChildren && rowChildren.length && !!treeExpandedMaps[rowid];
327
327
  }
328
- rows.push(h('tr', {
329
- class: [
330
- 'vxe-body--row',
331
- treeConfig ? `row--level-${rowLevel}` : '',
332
- {
333
- 'row--stripe': stripe && ($xeTable.getVTRowIndex(row) + 1) % 2 === 0,
334
- 'is--new': isNewRow,
335
- 'is--expand-row': isExpandRow,
336
- 'is--expand-tree': isExpandTree,
337
- 'row--new': isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
338
- 'row--radio': radioOpts.highlight && $xeTable.selectRadioRow === row,
339
- 'row--checked': checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
340
- 'row--pending': pendingRowList.length && !!pendingRowMaps[rowid]
341
- },
342
- rowClassName ? (XEUtils.isFunction(rowClassName) ? rowClassName(params) : rowClassName) : ''
343
- ],
344
- attrs: {
345
- rowid
328
+ const trClass = [
329
+ 'vxe-body--row',
330
+ treeConfig ? `row--level-${rowLevel}` : '',
331
+ {
332
+ 'row--stripe': stripe && ($xeTable.getVTRowIndex(row) + 1) % 2 === 0,
333
+ 'is--new': isNewRow,
334
+ 'is--expand-row': isExpandRow,
335
+ 'is--expand-tree': isExpandTree,
336
+ 'row--new': isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
337
+ 'row--radio': radioOpts.highlight && $xeTable.selectRadioRow === row,
338
+ 'row--checked': checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
339
+ 'row--pending': pendingRowList.length && !!pendingRowMaps[rowid]
346
340
  },
347
- style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null,
348
- key: rowKey || rowOpts.useKey || rowOpts.drag || treeConfig ? rowid : $rowIndex,
349
- on: trOn
350
- }, tableColumn.map((column, $columnIndex) => {
341
+ rowClassName ? (XEUtils.isFunction(rowClassName) ? rowClassName(params) : rowClassName) : ''
342
+ ];
343
+ const tdVNs = tableColumn.map((column, $columnIndex) => {
351
344
  return renderColumn(h, _vm, $xeTable, seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
352
- })));
345
+ });
346
+ rows.push(columnOpts.drag
347
+ ? h('transition-group', {
348
+ props: {
349
+ tag: 'tr',
350
+ name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`
351
+ },
352
+ class: trClass,
353
+ attrs: {
354
+ rowid
355
+ },
356
+ style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null,
357
+ key: rowKey || rowOpts.useKey || rowOpts.drag || treeConfig ? rowid : $rowIndex,
358
+ nativeOn: trOn
359
+ }, tdVNs)
360
+ : h('tr', {
361
+ class: trClass,
362
+ attrs: {
363
+ rowid
364
+ },
365
+ style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null,
366
+ key: rowKey || rowOpts.useKey || rowOpts.drag || treeConfig ? rowid : $rowIndex,
367
+ on: trOn
368
+ }, tdVNs));
353
369
  // 如果行被展开了
354
370
  if (isExpandRow) {
355
371
  const { height: expandHeight, padding } = expandOpts;
@@ -45,9 +45,12 @@ function renderTitleSuffixIcon(h, params) {
45
45
  }
46
46
  function renderCellDragIcon(h, params) {
47
47
  const { $table } = params;
48
- const dragOpts = $table.computeDragOpts;
49
- const { rowIcon, rowDisabledMethod } = dragOpts;
50
- const isDisabled = rowDisabledMethod && rowDisabledMethod(params);
48
+ const tableProps = $table;
49
+ const { dragConfig } = tableProps;
50
+ const rowDragOpts = $table.computeRowDragOpts;
51
+ const { icon, disabledMethod } = rowDragOpts;
52
+ const rDisabledMethod = disabledMethod || (dragConfig ? dragConfig.rowDisabledMethod : null);
53
+ const isDisabled = rDisabledMethod && rDisabledMethod(params);
51
54
  return h('span', {
52
55
  key: 'dg',
53
56
  class: ['vxe-cell--drag-handle', {
@@ -63,26 +66,66 @@ function renderCellDragIcon(h, params) {
63
66
  }
64
67
  }, [
65
68
  h('i', {
66
- class: rowIcon || getIcon().TABLE_DRAG_ROW
69
+ class: icon || (dragConfig ? dragConfig.rowIcon : '') || getIcon().TABLE_DRAG_ROW
67
70
  })
68
71
  ]);
69
72
  }
70
73
  function renderCellBaseVNs(h, params, content) {
71
- const { $table, column, row, level } = params;
74
+ const { $table, column, level } = params;
72
75
  const { dragSort } = column;
73
76
  const tableProps = $table;
74
- const { treeConfig } = tableProps;
77
+ const { treeConfig, dragConfig } = tableProps;
75
78
  const rowOpts = $table.computeRowOpts;
76
- const dragOpts = $table.computeDragOpts;
77
- const { showRowIcon, rowVisibleMethod } = dragOpts;
79
+ const rowDragOpts = $table.computeRowDragOpts;
80
+ const { showIcon, visibleMethod } = rowDragOpts;
81
+ const rVisibleMethod = visibleMethod || (dragConfig ? dragConfig.rowVisibleMethod : null);
78
82
  const vns = XEUtils.isArray(content) ? content : [content];
79
- if (dragSort && rowOpts.drag && (showRowIcon && (!rowVisibleMethod || rowVisibleMethod({ row, column })))) {
83
+ if (dragSort && rowOpts.drag && ((showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params)))) {
80
84
  if (!treeConfig || !level) {
81
85
  vns.unshift(renderCellDragIcon(h, params));
82
86
  }
83
87
  }
84
88
  return vns;
85
89
  }
90
+ function renderHeaderCellDragIcon(h, params) {
91
+ const { $table, column } = params;
92
+ const columnOpts = $table.computeColumnOpts;
93
+ const columnDragOpts = $table.computeColumnDragOpts;
94
+ const { showIcon, icon, visibleMethod, disabledMethod } = columnDragOpts;
95
+ const isDisabled = disabledMethod && disabledMethod(params);
96
+ if (columnOpts.drag && showIcon && (!visibleMethod || visibleMethod(params))) {
97
+ if (!(column.fixed || column.parentId)) {
98
+ return h('span', {
99
+ key: 'dg',
100
+ class: ['vxe-cell--drag-handle', {
101
+ 'is--disabled': isDisabled
102
+ }],
103
+ on: {
104
+ mousedown(evnt) {
105
+ if (!isDisabled) {
106
+ $table.handleHeaderCellDragMousedownEvent(evnt, params);
107
+ }
108
+ },
109
+ mouseup: $table.handleHeaderCellDragMouseupEvent
110
+ }
111
+ }, [
112
+ h('i', {
113
+ class: icon || getIcon().TABLE_DRAG_COLUMN
114
+ })
115
+ ]);
116
+ }
117
+ }
118
+ return renderEmptyElement($table);
119
+ }
120
+ function renderHeaderCellBaseVNs(h, params, content) {
121
+ const vns = [
122
+ renderTitlePrefixIcon(h, params),
123
+ renderHeaderCellDragIcon(h, params),
124
+ ...(XEUtils.isArray(content) ? content : [content]),
125
+ renderTitleSuffixIcon(h, params)
126
+ ];
127
+ return vns;
128
+ }
86
129
  function renderTitleContent(h, params, content) {
87
130
  const { $table, column } = params;
88
131
  const { type, showHeaderOverflow } = column;
@@ -245,7 +288,7 @@ export const Cell = {
245
288
  return createColumn($xetable, _vm, renMaps);
246
289
  },
247
290
  /**
248
- * 单元格
291
+ * 列头标题
249
292
  */
250
293
  renderHeaderTitle(h, params) {
251
294
  const { $table, column } = params;
@@ -264,7 +307,7 @@ export const Cell = {
264
307
  return renderTitleContent(h, params, formatText(column.getTitle(), 1));
265
308
  },
266
309
  renderDefaultHeader(h, params) {
267
- return renderTitlePrefixIcon(h, params).concat(Cell.renderHeaderTitle(h, params)).concat(renderTitleSuffixIcon(h, params));
310
+ return renderHeaderCellBaseVNs(h, params, Cell.renderHeaderTitle(h, params));
268
311
  },
269
312
  renderDefaultCell(h, params) {
270
313
  const { $table, row, column } = params;
@@ -371,12 +414,12 @@ export const Cell = {
371
414
  ];
372
415
  },
373
416
  /**
374
- * 索引
417
+ * 序号
375
418
  */
376
419
  renderSeqHeader(h, params) {
377
420
  const { $table, column } = params;
378
421
  const { slots } = column;
379
- return renderTitleContent(h, params, slots && slots.header ? $table.callSlot(slots.header, params, h) : formatText(column.getTitle(), 1));
422
+ return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, slots && slots.header ? $table.callSlot(slots.header, params, h) : formatText(column.getTitle(), 1)));
380
423
  },
381
424
  renderSeqCell(h, params) {
382
425
  const { $table, column } = params;
@@ -402,13 +445,13 @@ export const Cell = {
402
445
  const { slots } = column;
403
446
  const headerSlot = slots ? slots.header : null;
404
447
  const titleSlot = slots ? slots.title : null;
405
- return renderTitleContent(h, params, headerSlot
448
+ return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, headerSlot
406
449
  ? $table.callSlot(headerSlot, params, h)
407
450
  : [
408
451
  h('span', {
409
452
  class: 'vxe-radio--label'
410
453
  }, titleSlot ? $table.callSlot(titleSlot, params, h) : formatText(column.getTitle(), 1))
411
- ]);
454
+ ]));
412
455
  },
413
456
  renderRadioCell(h, params) {
414
457
  const { $table, column, isHidden } = params;
@@ -485,16 +528,16 @@ export const Cell = {
485
528
  }
486
529
  const checkboxParams = Object.assign(Object.assign({}, params), { checked: isAllCheckboxSelected, disabled: isAllCheckboxDisabled, indeterminate: isAllCheckboxIndeterminate });
487
530
  if (headerSlot) {
488
- return renderTitleContent(h, checkboxParams, $table.callSlot(headerSlot, checkboxParams, h));
531
+ return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, $table.callSlot(headerSlot, checkboxParams, h)));
489
532
  }
490
533
  if (checkboxOpts.checkStrictly ? !checkboxOpts.showHeader : checkboxOpts.showHeader === false) {
491
- return renderTitleContent(h, checkboxParams, [
534
+ return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, [
492
535
  h('span', {
493
536
  class: 'vxe-checkbox--label'
494
537
  }, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : headerTitle)
495
- ]);
538
+ ]));
496
539
  }
497
- return renderTitleContent(h, checkboxParams, [
540
+ return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, [
498
541
  h('span', {
499
542
  class: ['vxe-cell--checkbox', {
500
543
  'is--checked': isAllCheckboxSelected,
@@ -516,7 +559,7 @@ export const Cell = {
516
559
  }, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : headerTitle)
517
560
  ]
518
561
  : []))
519
- ]);
562
+ ]));
520
563
  },
521
564
  renderCheckboxCell(h, params) {
522
565
  const { $table, row, column, isHidden } = params;
@@ -722,15 +765,13 @@ export const Cell = {
722
765
  * 排序和筛选
723
766
  */
724
767
  renderSortAndFilterHeader(h, params) {
725
- return Cell.renderDefaultHeader(h, params)
726
- .concat(Cell.renderSortIcon(h, params))
727
- .concat(Cell.renderFilterIcon(h, params));
768
+ return renderHeaderCellBaseVNs(h, params, Cell.renderHeaderTitle(h, params).concat(Cell.renderSortIcon(h, params)));
728
769
  },
729
770
  /**
730
771
  * 排序
731
772
  */
732
773
  renderSortHeader(h, params) {
733
- return Cell.renderDefaultHeader(h, params).concat(Cell.renderSortIcon(h, params));
774
+ return renderHeaderCellBaseVNs(h, params, Cell.renderHeaderTitle(h, params).concat(Cell.renderSortIcon(h, params)));
734
775
  },
735
776
  renderSortIcon(h, params) {
736
777
  const { $table, column } = params;
@@ -776,7 +817,7 @@ export const Cell = {
776
817
  * 筛选
777
818
  */
778
819
  renderFilterHeader(h, params) {
779
- return Cell.renderDefaultHeader(h, params).concat(Cell.renderFilterIcon(h, params));
820
+ return renderHeaderCellBaseVNs(h, params, Cell.renderHeaderTitle(h, params).concat(Cell.renderFilterIcon(h, params)));
780
821
  },
781
822
  renderFilterIcon(h, params) {
782
823
  const { $table, column, hasFilter } = params;
@@ -820,22 +861,24 @@ export const Cell = {
820
861
  isRequired = columnRules.some((rule) => rule.required);
821
862
  }
822
863
  }
823
- return (isEnableConf(editConfig)
824
- ? [
864
+ let editIconVNs = [];
865
+ if (isEnableConf(editConfig)) {
866
+ editIconVNs = [
825
867
  isRequired && editOpts.showAsterisk
826
868
  ? h('i', {
827
869
  class: 'vxe-cell--required-icon'
828
870
  })
829
- : null,
871
+ : renderEmptyElement($table),
830
872
  isEnableConf(editRender) && editOpts.showIcon
831
873
  ? h('i', {
832
874
  class: ['vxe-cell--edit-icon', editOpts.icon || getIcon().TABLE_EDIT]
833
875
  })
834
- : null
835
- ]
836
- : []).concat(Cell.renderDefaultHeader(h, params))
876
+ : renderEmptyElement($table)
877
+ ];
878
+ }
879
+ return renderHeaderCellBaseVNs(h, params, editIconVNs.concat(Cell.renderHeaderTitle(h, params))
837
880
  .concat(sortable || remoteSort ? Cell.renderSortIcon(h, params) : [])
838
- .concat(filters ? Cell.renderFilterIcon(h, params) : []);
881
+ .concat(filters ? Cell.renderFilterIcon(h, params) : []));
839
882
  },
840
883
  // 行格编辑模式
841
884
  renderRowEdit(h, params) {