vxe-table 3.10.0 → 3.10.2

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 (127) hide show
  1. package/es/locale/lang/en-US.js +4 -2
  2. package/es/locale/lang/es-ES.js +4 -2
  3. package/es/locale/lang/hu-HU.js +4 -2
  4. package/es/locale/lang/ja-JP.js +4 -2
  5. package/es/locale/lang/ko-KR.js +4 -2
  6. package/es/locale/lang/pt-BR.js +4 -2
  7. package/es/locale/lang/ru-RU.js +4 -2
  8. package/es/locale/lang/uk-UA.js +4 -2
  9. package/es/locale/lang/vi-VN.js +4 -2
  10. package/es/locale/lang/zh-CHT.js +4 -2
  11. package/es/locale/lang/zh-CN.js +4 -2
  12. package/es/style.css +1 -1
  13. package/es/style.min.css +1 -1
  14. package/es/table/module/edit/mixin.js +9 -4
  15. package/es/table/module/export/export-panel.js +2 -2
  16. package/es/table/module/export/import-panel.js +1 -1
  17. package/es/table/src/body.js +43 -24
  18. package/es/table/src/cell.js +54 -24
  19. package/es/table/src/column.js +3 -1
  20. package/es/table/src/columnInfo.js +1 -0
  21. package/es/table/src/methods.js +211 -14
  22. package/es/table/src/props.js +2 -0
  23. package/es/table/src/table.js +16 -1
  24. package/es/table/style.css +80 -3
  25. package/es/table/style.min.css +1 -1
  26. package/es/ui/index.js +4 -1
  27. package/es/ui/src/log.js +1 -1
  28. package/es/vxe-table/style.css +80 -3
  29. package/es/vxe-table/style.min.css +1 -1
  30. package/helper/vetur/attributes.json +1 -1
  31. package/helper/vetur/tags.json +1 -1
  32. package/lib/index.umd.js +371 -78
  33. package/lib/index.umd.min.js +1 -1
  34. package/lib/locale/lang/en-US.js +4 -2
  35. package/lib/locale/lang/en-US.min.js +1 -1
  36. package/lib/locale/lang/en-US.umd.js +4 -2
  37. package/lib/locale/lang/es-ES.js +4 -2
  38. package/lib/locale/lang/es-ES.min.js +1 -1
  39. package/lib/locale/lang/es-ES.umd.js +4 -2
  40. package/lib/locale/lang/hu-HU.js +4 -2
  41. package/lib/locale/lang/hu-HU.min.js +1 -1
  42. package/lib/locale/lang/hu-HU.umd.js +4 -2
  43. package/lib/locale/lang/ja-JP.js +4 -2
  44. package/lib/locale/lang/ja-JP.min.js +1 -1
  45. package/lib/locale/lang/ja-JP.umd.js +4 -2
  46. package/lib/locale/lang/ko-KR.js +4 -2
  47. package/lib/locale/lang/ko-KR.min.js +1 -1
  48. package/lib/locale/lang/ko-KR.umd.js +4 -2
  49. package/lib/locale/lang/pt-BR.js +4 -2
  50. package/lib/locale/lang/pt-BR.min.js +1 -1
  51. package/lib/locale/lang/pt-BR.umd.js +4 -2
  52. package/lib/locale/lang/ru-RU.js +4 -2
  53. package/lib/locale/lang/ru-RU.min.js +1 -1
  54. package/lib/locale/lang/ru-RU.umd.js +4 -2
  55. package/lib/locale/lang/uk-UA.js +4 -2
  56. package/lib/locale/lang/uk-UA.min.js +1 -1
  57. package/lib/locale/lang/uk-UA.umd.js +4 -2
  58. package/lib/locale/lang/vi-VN.js +4 -2
  59. package/lib/locale/lang/vi-VN.min.js +1 -1
  60. package/lib/locale/lang/zh-CHT.js +4 -2
  61. package/lib/locale/lang/zh-CHT.min.js +1 -1
  62. package/lib/locale/lang/zh-CHT.umd.js +4 -2
  63. package/lib/locale/lang/zh-CN.js +4 -2
  64. package/lib/locale/lang/zh-CN.min.js +1 -1
  65. package/lib/locale/lang/zh-CN.umd.js +4 -2
  66. package/lib/style.css +1 -1
  67. package/lib/style.min.css +1 -1
  68. package/lib/table/module/edit/mixin.js +9 -4
  69. package/lib/table/module/edit/mixin.min.js +1 -1
  70. package/lib/table/module/export/export-panel.js +2 -2
  71. package/lib/table/module/export/export-panel.min.js +1 -1
  72. package/lib/table/module/export/import-panel.js +1 -1
  73. package/lib/table/module/export/import-panel.min.js +1 -1
  74. package/lib/table/src/body.js +41 -22
  75. package/lib/table/src/body.min.js +1 -1
  76. package/lib/table/src/cell.js +58 -24
  77. package/lib/table/src/cell.min.js +1 -1
  78. package/lib/table/src/column.js +3 -1
  79. package/lib/table/src/column.min.js +1 -1
  80. package/lib/table/src/columnInfo.js +1 -0
  81. package/lib/table/src/columnInfo.min.js +1 -1
  82. package/lib/table/src/methods.js +227 -14
  83. package/lib/table/src/methods.min.js +1 -1
  84. package/lib/table/src/props.js +2 -0
  85. package/lib/table/src/props.min.js +1 -1
  86. package/lib/table/src/table.js +15 -2
  87. package/lib/table/src/table.min.js +1 -1
  88. package/lib/table/style/style.css +80 -3
  89. package/lib/table/style/style.min.css +1 -1
  90. package/lib/ui/index.js +4 -1
  91. package/lib/ui/index.min.js +1 -1
  92. package/lib/ui/src/log.js +1 -1
  93. package/lib/ui/src/log.min.js +1 -1
  94. package/lib/vxe-table/style/style.css +80 -3
  95. package/lib/vxe-table/style/style.min.css +1 -1
  96. package/package.json +2 -2
  97. package/packages/locale/lang/en-US.ts +4 -2
  98. package/packages/locale/lang/es-ES.ts +4 -2
  99. package/packages/locale/lang/hu-HU.ts +4 -2
  100. package/packages/locale/lang/ja-JP.ts +4 -2
  101. package/packages/locale/lang/ko-KR.ts +4 -2
  102. package/packages/locale/lang/pt-BR.ts +4 -2
  103. package/packages/locale/lang/ru-RU.ts +4 -2
  104. package/packages/locale/lang/uk-UA.ts +4 -2
  105. package/packages/locale/lang/vi-VN.ts +4 -2
  106. package/packages/locale/lang/zh-CHT.ts +4 -2
  107. package/packages/locale/lang/zh-CN.ts +4 -2
  108. package/packages/table/module/custom/panel.ts +8 -8
  109. package/packages/table/module/edit/mixin.ts +10 -4
  110. package/packages/table/module/export/export-panel.ts +2 -2
  111. package/packages/table/module/export/import-panel.ts +1 -1
  112. package/packages/table/src/body.ts +43 -24
  113. package/packages/table/src/cell.ts +58 -24
  114. package/packages/table/src/column.ts +3 -1
  115. package/packages/table/src/columnInfo.ts +1 -0
  116. package/packages/table/src/methods.ts +227 -14
  117. package/packages/table/src/props.ts +2 -0
  118. package/packages/table/src/table.ts +16 -1
  119. package/packages/ui/index.ts +3 -0
  120. package/styles/components/table-module/custom.scss +9 -3
  121. package/styles/components/table.scss +89 -0
  122. /package/es/{iconfont.1730681241769.ttf → iconfont.1730873052490.ttf} +0 -0
  123. /package/es/{iconfont.1730681241769.woff → iconfont.1730873052490.woff} +0 -0
  124. /package/es/{iconfont.1730681241769.woff2 → iconfont.1730873052490.woff2} +0 -0
  125. /package/lib/{iconfont.1730681241769.ttf → iconfont.1730873052490.ttf} +0 -0
  126. /package/lib/{iconfont.1730681241769.woff → iconfont.1730873052490.woff} +0 -0
  127. /package/lib/{iconfont.1730681241769.woff2 → iconfont.1730873052490.woff2} +0 -0
@@ -255,7 +255,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
255
255
  getClass(className, params),
256
256
  getClass(allCellClassName, params)
257
257
  ],
258
- key: columnKey || columnOpts.useKey ? column.id : $columnIndex,
258
+ key: columnKey || columnOpts.useKey || rowOpts.useKey ? column.id : $columnIndex,
259
259
  attrs,
260
260
  style: Object.assign({
261
261
  height: cellHeight
@@ -263,36 +263,48 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
263
263
  on: tdOns
264
264
  }, tdVNs);
265
265
  }
266
- function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
267
- 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;
266
+ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
267
+ 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;
268
268
  const childrenField = treeOpts.children || treeOpts.childrenField;
269
269
  const rows = [];
270
270
  tableData.forEach((row, $rowIndex) => {
271
271
  const trOn = {};
272
272
  let rowIndex = $rowIndex;
273
- const _rowIndex = $xetable.getVTRowIndex(row);
273
+ const _rowIndex = $xeTable.getVTRowIndex(row);
274
274
  // 确保任何情况下 rowIndex 都精准指向真实 data 索引
275
- rowIndex = $xetable.getRowIndex(row);
276
- // 事件绑定
275
+ rowIndex = $xeTable.getRowIndex(row);
276
+ // 当前行事件
277
277
  if (rowOpts.isHover || highlightHoverRow) {
278
278
  trOn.mouseenter = (evnt) => {
279
- if (isVMScrollProcess($xetable)) {
279
+ if (isVMScrollProcess($xeTable)) {
280
280
  return;
281
281
  }
282
- $xetable.triggerHoverEvent(evnt, { row, rowIndex });
282
+ $xeTable.triggerHoverEvent(evnt, { row, rowIndex });
283
283
  };
284
284
  trOn.mouseleave = () => {
285
- if (isVMScrollProcess($xetable)) {
285
+ if (isVMScrollProcess($xeTable)) {
286
286
  return;
287
287
  }
288
- $xetable.clearHoverRow();
288
+ $xeTable.clearHoverRow();
289
289
  };
290
290
  }
291
- const rowid = getRowid($xetable, row);
291
+ // 拖拽行事件
292
+ if (rowOpts.drag) {
293
+ trOn.dragstart = (evnt) => {
294
+ $xeTable.handleRowDragDragstartEvent(evnt);
295
+ };
296
+ trOn.dragover = (evnt) => {
297
+ $xeTable.handleRowDragDragoverEvent(evnt);
298
+ };
299
+ trOn.dragend = (evnt) => {
300
+ $xeTable.handleRowDragDragendEvent(evnt);
301
+ };
302
+ }
303
+ const rowid = getRowid($xeTable, row);
292
304
  const rest = fullAllDataRowIdData[rowid];
293
305
  const rowLevel = rest ? rest.level : 0;
294
306
  const seq = rest ? rest.seq : -1;
295
- const params = { $table: $xetable, seq, rowid, fixed: fixedType, type: renderType, level: rowLevel, row, rowIndex, $rowIndex };
307
+ const params = { $table: $xeTable, seq, rowid, fixed: fixedType, type: renderType, level: rowLevel, row, rowIndex, $rowIndex };
296
308
  // 行是否被展开
297
309
  const isExpandRow = expandColumn && !!rowExpandedMaps[rowid];
298
310
  // 树节点是否被展开
@@ -301,7 +313,7 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
301
313
  // 是否新增行
302
314
  let isNewRow = false;
303
315
  if (editConfig) {
304
- isNewRow = $xetable.isInsertByRow(row);
316
+ isNewRow = $xeTable.isInsertByRow(row);
305
317
  }
306
318
  if (treeConfig && !scrollYLoad && !treeOpts.transform) {
307
319
  rowChildren = row[childrenField];
@@ -312,13 +324,13 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
312
324
  'vxe-body--row',
313
325
  treeConfig ? `row--level-${rowLevel}` : '',
314
326
  {
315
- 'row--stripe': stripe && ($xetable.getVTRowIndex(row) + 1) % 2 === 0,
327
+ 'row--stripe': stripe && ($xeTable.getVTRowIndex(row) + 1) % 2 === 0,
316
328
  'is--new': isNewRow,
317
329
  'is--expand-row': isExpandRow,
318
330
  'is--expand-tree': isExpandTree,
319
331
  'row--new': isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
320
- 'row--radio': radioOpts.highlight && $xetable.selectRadioRow === row,
321
- 'row--checked': checkboxOpts.highlight && $xetable.isCheckedByCheckboxRow(row),
332
+ 'row--radio': radioOpts.highlight && $xeTable.selectRadioRow === row,
333
+ 'row--checked': checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
322
334
  'row--pending': pendingRowList.length && !!pendingRowMaps[rowid]
323
335
  },
324
336
  rowClassName ? (XEUtils.isFunction(rowClassName) ? rowClassName(params) : rowClassName) : ''
@@ -327,10 +339,10 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
327
339
  rowid
328
340
  },
329
341
  style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null,
330
- key: (rowKey || rowOpts.useKey) || treeConfig ? rowid : $rowIndex,
342
+ key: rowKey || rowOpts.useKey || rowOpts.drag || treeConfig ? rowid : $rowIndex,
331
343
  on: trOn
332
344
  }, tableColumn.map((column, $columnIndex) => {
333
- return renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
345
+ return renderColumn(h, _vm, $xeTable, seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
334
346
  })));
335
347
  // 如果行被展开了
336
348
  if (isExpandRow) {
@@ -344,7 +356,7 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
344
356
  }
345
357
  const { showOverflow } = expandColumn;
346
358
  const hasEllipsis = (XEUtils.isUndefined(showOverflow) || XEUtils.isNull(showOverflow)) ? allColumnOverflow : showOverflow;
347
- const expandParams = { $table: $xetable, seq, column: expandColumn, fixed: fixedType, type: renderType, level: rowLevel, row, rowIndex, $rowIndex };
359
+ const expandParams = { $table: $xeTable, seq, column: expandColumn, fixed: fixedType, type: renderType, level: rowLevel, row, rowIndex, $rowIndex };
348
360
  rows.push(h('tr', {
349
361
  class: ['vxe-body--expanded-row', {
350
362
  'is--padding': padding
@@ -377,7 +389,7 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
377
389
  }
378
390
  // 如果是树形表格
379
391
  if (isExpandTree) {
380
- rows.push(...renderRows(h, _vm, $xetable, fixedType, rowChildren, tableColumn));
392
+ rows.push(...renderRows(h, _vm, $xeTable, fixedType, rowChildren, tableColumn));
381
393
  }
382
394
  });
383
395
  return rows;
@@ -428,7 +440,7 @@ export default {
428
440
  },
429
441
  render(h) {
430
442
  const { _e, $parent: $xetable, fixedColumn, fixedType } = this;
431
- let { $scopedSlots, tId, tableData, tableColumn, visibleColumn, expandColumn, showOverflow: allColumnOverflow, keyboardConfig, keyboardOpts, mergeList, spanMethod, scrollXLoad, scrollYLoad, isAllOverflow, emptyOpts, mouseConfig, mouseOpts, sYOpts } = $xetable;
443
+ let { $scopedSlots, tId, tableData, tableColumn, visibleColumn, expandColumn, showOverflow: allColumnOverflow, keyboardConfig, keyboardOpts, mergeList, spanMethod, scrollXLoad, scrollYLoad, isAllOverflow, emptyOpts, mouseConfig, mouseOpts, sYOpts, rowOpts, isDragRowMove } = $xetable;
432
444
  // 如果是使用优化模式
433
445
  if (fixedType) {
434
446
  // 如果存在展开行使用全量渲染
@@ -511,9 +523,16 @@ export default {
511
523
  /**
512
524
  * 内容
513
525
  */
514
- h('tbody', {
515
- ref: 'tbody'
516
- }, renderRows(h, this, $xetable, fixedType, tableData, tableColumn))
526
+ rowOpts.drag
527
+ ? h('transition-group', {
528
+ props: {
529
+ tag: 'tbody',
530
+ name: `vxe-body--row-list${isDragRowMove ? '' : '-disabled'}`
531
+ }
532
+ }, renderRows(h, this, $xetable, fixedType, tableData, tableColumn))
533
+ : h('tbody', {
534
+ ref: 'tbody'
535
+ }, renderRows(h, this, $xetable, fixedType, tableData, tableColumn))
517
536
  ]),
518
537
  h('div', {
519
538
  class: 'vxe-table--checkbox-range'
@@ -4,7 +4,7 @@ import { getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/sr
4
4
  import { updateCellTitle } from '../../ui/src/dom';
5
5
  import { createColumn, getRowid } from './util';
6
6
  import { getSlotVNs } from '../../ui/src/vn';
7
- const { getI18n, getIcon, renderer, formats } = VxeUI;
7
+ const { getI18n, getIcon, renderer, formats, renderEmptyElement } = VxeUI;
8
8
  function renderTitlePrefixIcon(h, params) {
9
9
  const { $table, column } = params;
10
10
  const titlePrefix = column.titlePrefix || column.titleHelp;
@@ -43,6 +43,34 @@ function renderTitleSuffixIcon(h, params) {
43
43
  ]
44
44
  : [];
45
45
  }
46
+ function renderCellDragIcon(h, params) {
47
+ const { $table } = params;
48
+ return h('span', {
49
+ key: 'dg',
50
+ class: 'vxe-cell--drag-handle',
51
+ on: {
52
+ mousedown(evnt) {
53
+ $table.handleCellDragMousedownEvent(evnt, params);
54
+ },
55
+ mouseup: $table.handleCellDragMouseupEvent
56
+ }
57
+ }, [
58
+ h('i', {
59
+ class: 'vxe-table-icon-drag-handle'
60
+ })
61
+ ]);
62
+ }
63
+ function renderCellBaseVNs(h, params, content) {
64
+ const { $table, column } = params;
65
+ const { dragSort } = column;
66
+ const vns = XEUtils.isArray(content) ? content : [content];
67
+ const rowOpts = $table.computeRowOpts;
68
+ const dragOpts = $table.computeDragOpts;
69
+ if (dragSort && rowOpts.drag && dragOpts.showIcon) {
70
+ vns.unshift(renderCellDragIcon(h, params));
71
+ }
72
+ return vns;
73
+ }
46
74
  function renderTitleContent(h, params, content) {
47
75
  const { $table, column } = params;
48
76
  const { type, showHeaderOverflow } = column;
@@ -231,7 +259,7 @@ export const Cell = {
231
259
  const { slots, editRender, cellRender } = column;
232
260
  const renderOpts = editRender || cellRender;
233
261
  if (slots && slots.default) {
234
- return $table.callSlot(slots.default, params, h);
262
+ return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h));
235
263
  }
236
264
  if (renderOpts) {
237
265
  const compConf = renderer.get(renderOpts.name);
@@ -239,12 +267,12 @@ export const Cell = {
239
267
  const rtCell = compConf ? (compConf.renderTableCell || compConf.renderCell) : null;
240
268
  const renderFn = editRender ? rtCell : rtDefault;
241
269
  if (renderFn) {
242
- return getSlotVNs(renderFn.call($table, h, renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params)));
270
+ return renderCellBaseVNs(h, params, getSlotVNs(renderFn.call($table, h, renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params))));
243
271
  }
244
272
  }
245
273
  const cellValue = $table.getCellLabel(row, column);
246
274
  const cellPlaceholder = editRender ? editRender.placeholder : '';
247
- return [
275
+ return renderCellBaseVNs(h, params, [
248
276
  h('span', {
249
277
  class: 'vxe-cell--label'
250
278
  }, [
@@ -255,7 +283,7 @@ export const Cell = {
255
283
  }, formatText(getFuncText(cellPlaceholder), 1))
256
284
  : h('span', formatText(cellValue, 1))
257
285
  ])
258
- ];
286
+ ]);
259
287
  },
260
288
  renderTreeCell(h, params) {
261
289
  return Cell.renderTreeIcon(h, params, Cell.renderDefaultCell.call(this, h, params));
@@ -343,11 +371,13 @@ export const Cell = {
343
371
  const { treeConfig, seqOpts } = $table;
344
372
  const { slots } = column;
345
373
  if (slots && slots.default) {
346
- return $table.callSlot(slots.default, params, h);
374
+ return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h));
347
375
  }
348
376
  const { seq } = params;
349
377
  const seqMethod = seqOpts.seqMethod;
350
- return [formatText(seqMethod ? seqMethod(params) : treeConfig ? seq : (seqOpts.startIndex || 0) + seq, 1)];
378
+ return renderCellBaseVNs(h, params, [
379
+ h('span', `${formatText(seqMethod ? seqMethod(params) : treeConfig ? seq : (seqOpts.startIndex || 0) + seq, 1)}`)
380
+ ]);
351
381
  },
352
382
  renderTreeIndexCell(h, params) {
353
383
  return Cell.renderTreeIcon(h, params, Cell.renderSeqCell(h, params));
@@ -394,7 +424,7 @@ export const Cell = {
394
424
  }
395
425
  const radioParams = Object.assign(Object.assign({}, params), { checked: isChecked, disabled: isDisabled, visible: isVisible });
396
426
  if (radioSlot) {
397
- return $table.callSlot(radioSlot, radioParams, h);
427
+ return renderCellBaseVNs(h, params, $table.callSlot(radioSlot, radioParams, h));
398
428
  }
399
429
  const radioVNs = [];
400
430
  if (isVisible) {
@@ -407,7 +437,7 @@ export const Cell = {
407
437
  class: 'vxe-radio--label'
408
438
  }, defaultSlot ? $table.callSlot(defaultSlot, radioParams, h) : XEUtils.get(row, labelField)));
409
439
  }
410
- return [
440
+ return renderCellBaseVNs(h, params, [
411
441
  h('span', {
412
442
  class: ['vxe-cell--radio', {
413
443
  'is--checked': isChecked,
@@ -415,7 +445,7 @@ export const Cell = {
415
445
  }],
416
446
  on
417
447
  }, radioVNs)
418
- ];
448
+ ]);
419
449
  },
420
450
  renderTreeRadioCell(h, params) {
421
451
  return Cell.renderTreeIcon(h, params, Cell.renderRadioCell(h, params));
@@ -507,7 +537,7 @@ export const Cell = {
507
537
  }
508
538
  const checkboxParams = Object.assign(Object.assign({}, params), { checked: isChecked, disabled: isDisabled, visible: isVisible, indeterminate });
509
539
  if (checkboxSlot) {
510
- return $table.callSlot(checkboxSlot, checkboxParams, h);
540
+ return renderCellBaseVNs(h, params, $table.callSlot(checkboxSlot, checkboxParams, h));
511
541
  }
512
542
  const checkVNs = [];
513
543
  if (isVisible) {
@@ -520,7 +550,7 @@ export const Cell = {
520
550
  class: 'vxe-checkbox--label'
521
551
  }, defaultSlot ? $table.callSlot(defaultSlot, checkboxParams, h) : XEUtils.get(row, labelField)));
522
552
  }
523
- return [
553
+ return renderCellBaseVNs(h, params, [
524
554
  h('span', {
525
555
  class: ['vxe-cell--checkbox', {
526
556
  'is--checked': isChecked,
@@ -530,7 +560,7 @@ export const Cell = {
530
560
  }],
531
561
  on
532
562
  }, checkVNs)
533
- ];
563
+ ]);
534
564
  },
535
565
  renderTreeSelectionCell(h, params) {
536
566
  return Cell.renderTreeIcon(h, params, Cell.renderCheckboxCell(h, params));
@@ -567,7 +597,7 @@ export const Cell = {
567
597
  }
568
598
  const checkboxParams = Object.assign(Object.assign({}, params), { checked: isChecked, disabled: isDisabled, visible: isVisible, indeterminate: isIndeterminate });
569
599
  if (checkboxSlot) {
570
- return $table.callSlot(checkboxSlot, checkboxParams, h);
600
+ return renderCellBaseVNs(h, params, $table.callSlot(checkboxSlot, checkboxParams, h));
571
601
  }
572
602
  const checkVNs = [];
573
603
  if (isVisible) {
@@ -580,7 +610,7 @@ export const Cell = {
580
610
  class: 'vxe-checkbox--label'
581
611
  }, defaultSlot ? $table.callSlot(defaultSlot, checkboxParams, h) : XEUtils.get(row, labelField)));
582
612
  }
583
- return [
613
+ return renderCellBaseVNs(h, params, [
584
614
  h('span', {
585
615
  class: ['vxe-cell--checkbox', {
586
616
  'is--checked': isChecked,
@@ -590,7 +620,7 @@ export const Cell = {
590
620
  }],
591
621
  on
592
622
  }, checkVNs)
593
- ];
623
+ ]);
594
624
  },
595
625
  renderTreeSelectionCellByProp(h, params) {
596
626
  return Cell.renderTreeIcon(h, params, Cell.renderCheckboxCellByProp(h, params));
@@ -607,7 +637,7 @@ export const Cell = {
607
637
  let isAceived = false;
608
638
  let isLazyLoading = false;
609
639
  if (slots && slots.icon) {
610
- return $table.callSlot(slots.icon, params, h);
640
+ return renderCellBaseVNs(h, params, $table.callSlot(slots.icon, params, h));
611
641
  }
612
642
  if (!isHidden) {
613
643
  const rowid = getRowid($table, row);
@@ -616,7 +646,7 @@ export const Cell = {
616
646
  isLazyLoading = !!rowExpandLazyLoadedMaps[rowid];
617
647
  }
618
648
  }
619
- return [
649
+ return renderCellBaseVNs(h, params, [
620
650
  showIcon && (!visibleMethod || visibleMethod(params))
621
651
  ? h('span', {
622
652
  class: ['vxe-table--expanded', {
@@ -632,13 +662,13 @@ export const Cell = {
632
662
  class: ['vxe-table--expand-btn', isLazyLoading ? (iconLoaded || getIcon().TABLE_EXPAND_LOADED) : (isAceived ? (iconOpen || getIcon().TABLE_EXPAND_OPEN) : (iconClose || getIcon().TABLE_EXPAND_CLOSE))]
633
663
  })
634
664
  ])
635
- : null,
665
+ : renderEmptyElement($table),
636
666
  defaultSlot || labelField
637
667
  ? h('span', {
638
668
  class: 'vxe-table--expand-label'
639
669
  }, defaultSlot ? $table.callSlot(defaultSlot, params, h) : XEUtils.get(row, labelField))
640
- : null
641
- ];
670
+ : renderEmptyElement($table)
671
+ ]);
642
672
  },
643
673
  renderExpandData(h, params) {
644
674
  const { $table, column } = params;
@@ -662,16 +692,16 @@ export const Cell = {
662
692
  const { $table, column } = params;
663
693
  const { slots } = column;
664
694
  if (slots && slots.default) {
665
- return $table.callSlot(slots.default, params, h);
695
+ return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h));
666
696
  }
667
- return [
697
+ return renderCellBaseVNs(h, params, [
668
698
  h('span', {
669
699
  class: 'vxe-cell--html',
670
700
  domProps: {
671
701
  innerHTML: getDefaultCellLabel(params)
672
702
  }
673
703
  })
674
- ];
704
+ ]);
675
705
  },
676
706
  renderTreeHTMLCell(h, params) {
677
707
  return Cell.renderTreeIcon(h, params, Cell.renderHTMLCell(h, params));
@@ -63,8 +63,10 @@ const props = {
63
63
  filterRecoverMethod: Function,
64
64
  // 筛选模板配置项
65
65
  filterRender: Object,
66
- // 指定为树节点
66
+ // 设置为树节点
67
67
  treeNode: Boolean,
68
+ // 设置为拖拽排序
69
+ dragSort: Boolean,
68
70
  // 是否可视
69
71
  visible: { type: Boolean, default: null },
70
72
  // 表头单元格数据导出方法
@@ -85,6 +85,7 @@ export class ColumnInfo {
85
85
  filterRecoverMethod: _vm.filterRecoverMethod,
86
86
  filterRender: _vm.filterRender,
87
87
  treeNode: _vm.treeNode,
88
+ dragSort: _vm.dragSort,
88
89
  cellType: _vm.cellType,
89
90
  cellRender: _vm.cellRender,
90
91
  editRender: _vm.editRender,