vxe-table 3.10.1 → 3.10.3
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.
- package/es/locale/lang/en-US.js +3 -2
- package/es/locale/lang/es-ES.js +3 -2
- package/es/locale/lang/hu-HU.js +3 -2
- package/es/locale/lang/ja-JP.js +3 -2
- package/es/locale/lang/ko-KR.js +3 -2
- package/es/locale/lang/pt-BR.js +3 -2
- package/es/locale/lang/ru-RU.js +3 -2
- package/es/locale/lang/uk-UA.js +3 -2
- package/es/locale/lang/vi-VN.js +3 -2
- package/es/locale/lang/zh-CHT.js +3 -2
- package/es/locale/lang/zh-CN.js +3 -2
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/edit/mixin.js +9 -4
- package/es/table/src/body.js +43 -24
- package/es/table/src/cell.js +65 -27
- package/es/table/src/column.js +3 -1
- package/es/table/src/columnInfo.js +1 -0
- package/es/table/src/methods.js +211 -14
- package/es/table/src/props.js +2 -0
- package/es/table/src/table.js +16 -1
- package/es/table/style.css +77 -2
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +4 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +77 -2
- package/es/vxe-table/style.min.css +1 -1
- package/helper/vetur/attributes.json +1 -1
- package/helper/vetur/tags.json +1 -1
- package/lib/index.umd.js +387 -78
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +3 -2
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +3 -2
- package/lib/locale/lang/es-ES.js +3 -2
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +3 -2
- package/lib/locale/lang/hu-HU.js +3 -2
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +3 -2
- package/lib/locale/lang/ja-JP.js +3 -2
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +3 -2
- package/lib/locale/lang/ko-KR.js +3 -2
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +3 -2
- package/lib/locale/lang/pt-BR.js +3 -2
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +3 -2
- package/lib/locale/lang/ru-RU.js +3 -2
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +3 -2
- package/lib/locale/lang/uk-UA.js +3 -2
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +3 -2
- package/lib/locale/lang/vi-VN.js +3 -2
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +3 -2
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +3 -2
- package/lib/locale/lang/zh-CN.js +3 -2
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +3 -2
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/edit/mixin.js +9 -4
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/src/body.js +41 -22
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +78 -27
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +3 -1
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +1 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +227 -14
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +2 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +15 -2
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +77 -2
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +4 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-table/style/style.css +77 -2
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/en-US.ts +3 -2
- package/packages/locale/lang/es-ES.ts +3 -2
- package/packages/locale/lang/hu-HU.ts +3 -2
- package/packages/locale/lang/ja-JP.ts +3 -2
- package/packages/locale/lang/ko-KR.ts +3 -2
- package/packages/locale/lang/pt-BR.ts +3 -2
- package/packages/locale/lang/ru-RU.ts +3 -2
- package/packages/locale/lang/uk-UA.ts +3 -2
- package/packages/locale/lang/vi-VN.ts +3 -2
- package/packages/locale/lang/zh-CHT.ts +3 -2
- package/packages/locale/lang/zh-CN.ts +3 -2
- package/packages/table/module/custom/panel.ts +8 -8
- package/packages/table/module/edit/mixin.ts +10 -4
- package/packages/table/src/body.ts +43 -24
- package/packages/table/src/cell.ts +69 -27
- package/packages/table/src/column.ts +3 -1
- package/packages/table/src/columnInfo.ts +1 -0
- package/packages/table/src/methods.ts +227 -14
- package/packages/table/src/props.ts +2 -0
- package/packages/table/src/table.ts +16 -1
- package/packages/ui/index.ts +3 -0
- package/styles/components/table-module/custom.scss +14 -3
- package/styles/components/table.scss +80 -0
- /package/es/{iconfont.1730710763407.ttf → iconfont.1730898131844.ttf} +0 -0
- /package/es/{iconfont.1730710763407.woff → iconfont.1730898131844.woff} +0 -0
- /package/es/{iconfont.1730710763407.woff2 → iconfont.1730898131844.woff2} +0 -0
- /package/lib/{iconfont.1730710763407.ttf → iconfont.1730898131844.ttf} +0 -0
- /package/lib/{iconfont.1730710763407.woff → iconfont.1730898131844.woff} +0 -0
- /package/lib/{iconfont.1730710763407.woff2 → iconfont.1730898131844.woff2} +0 -0
package/es/table/src/body.js
CHANGED
|
@@ -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, $
|
|
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 } = $
|
|
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 = $
|
|
273
|
+
const _rowIndex = $xeTable.getVTRowIndex(row);
|
|
274
274
|
// 确保任何情况下 rowIndex 都精准指向真实 data 索引
|
|
275
|
-
rowIndex = $
|
|
276
|
-
//
|
|
275
|
+
rowIndex = $xeTable.getRowIndex(row);
|
|
276
|
+
// 当前行事件
|
|
277
277
|
if (rowOpts.isHover || highlightHoverRow) {
|
|
278
278
|
trOn.mouseenter = (evnt) => {
|
|
279
|
-
if (isVMScrollProcess($
|
|
279
|
+
if (isVMScrollProcess($xeTable)) {
|
|
280
280
|
return;
|
|
281
281
|
}
|
|
282
|
-
$
|
|
282
|
+
$xeTable.triggerHoverEvent(evnt, { row, rowIndex });
|
|
283
283
|
};
|
|
284
284
|
trOn.mouseleave = () => {
|
|
285
|
-
if (isVMScrollProcess($
|
|
285
|
+
if (isVMScrollProcess($xeTable)) {
|
|
286
286
|
return;
|
|
287
287
|
}
|
|
288
|
-
$
|
|
288
|
+
$xeTable.clearHoverRow();
|
|
289
289
|
};
|
|
290
290
|
}
|
|
291
|
-
|
|
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: $
|
|
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 = $
|
|
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 && ($
|
|
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 && $
|
|
321
|
-
'row--checked': checkboxOpts.highlight && $
|
|
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:
|
|
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, $
|
|
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: $
|
|
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, $
|
|
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
|
-
|
|
515
|
-
|
|
516
|
-
|
|
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'
|
package/es/table/src/cell.js
CHANGED
|
@@ -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,42 @@ function renderTitleSuffixIcon(h, params) {
|
|
|
43
43
|
]
|
|
44
44
|
: [];
|
|
45
45
|
}
|
|
46
|
+
function renderCellDragIcon(h, params) {
|
|
47
|
+
const { $table } = params;
|
|
48
|
+
const dragOpts = $table.computeDragOpts;
|
|
49
|
+
const { rowDisabledMethod } = dragOpts;
|
|
50
|
+
const isDisabled = rowDisabledMethod && rowDisabledMethod(params);
|
|
51
|
+
return h('span', {
|
|
52
|
+
key: 'dg',
|
|
53
|
+
class: ['vxe-cell--drag-handle', {
|
|
54
|
+
'is--disabled': isDisabled
|
|
55
|
+
}],
|
|
56
|
+
on: {
|
|
57
|
+
mousedown(evnt) {
|
|
58
|
+
if (!isDisabled) {
|
|
59
|
+
$table.handleCellDragMousedownEvent(evnt, params);
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
mouseup: $table.handleCellDragMouseupEvent
|
|
63
|
+
}
|
|
64
|
+
}, [
|
|
65
|
+
h('i', {
|
|
66
|
+
class: 'vxe-table-icon-drag-handle'
|
|
67
|
+
})
|
|
68
|
+
]);
|
|
69
|
+
}
|
|
70
|
+
function renderCellBaseVNs(h, params, content) {
|
|
71
|
+
const { $table, column, row } = params;
|
|
72
|
+
const { dragSort } = column;
|
|
73
|
+
const vns = XEUtils.isArray(content) ? content : [content];
|
|
74
|
+
const rowOpts = $table.computeRowOpts;
|
|
75
|
+
const dragOpts = $table.computeDragOpts;
|
|
76
|
+
const { showRowIcon, rowVisibleMethod } = dragOpts;
|
|
77
|
+
if (dragSort && rowOpts.drag && (showRowIcon && (!rowVisibleMethod || rowVisibleMethod({ row, column })))) {
|
|
78
|
+
vns.unshift(renderCellDragIcon(h, params));
|
|
79
|
+
}
|
|
80
|
+
return vns;
|
|
81
|
+
}
|
|
46
82
|
function renderTitleContent(h, params, content) {
|
|
47
83
|
const { $table, column } = params;
|
|
48
84
|
const { type, showHeaderOverflow } = column;
|
|
@@ -231,7 +267,7 @@ export const Cell = {
|
|
|
231
267
|
const { slots, editRender, cellRender } = column;
|
|
232
268
|
const renderOpts = editRender || cellRender;
|
|
233
269
|
if (slots && slots.default) {
|
|
234
|
-
return $table.callSlot(slots.default, params, h);
|
|
270
|
+
return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h));
|
|
235
271
|
}
|
|
236
272
|
if (renderOpts) {
|
|
237
273
|
const compConf = renderer.get(renderOpts.name);
|
|
@@ -239,12 +275,12 @@ export const Cell = {
|
|
|
239
275
|
const rtCell = compConf ? (compConf.renderTableCell || compConf.renderCell) : null;
|
|
240
276
|
const renderFn = editRender ? rtCell : rtDefault;
|
|
241
277
|
if (renderFn) {
|
|
242
|
-
return getSlotVNs(renderFn.call($table, h, renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params)));
|
|
278
|
+
return renderCellBaseVNs(h, params, getSlotVNs(renderFn.call($table, h, renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params))));
|
|
243
279
|
}
|
|
244
280
|
}
|
|
245
281
|
const cellValue = $table.getCellLabel(row, column);
|
|
246
282
|
const cellPlaceholder = editRender ? editRender.placeholder : '';
|
|
247
|
-
return [
|
|
283
|
+
return renderCellBaseVNs(h, params, [
|
|
248
284
|
h('span', {
|
|
249
285
|
class: 'vxe-cell--label'
|
|
250
286
|
}, [
|
|
@@ -255,7 +291,7 @@ export const Cell = {
|
|
|
255
291
|
}, formatText(getFuncText(cellPlaceholder), 1))
|
|
256
292
|
: h('span', formatText(cellValue, 1))
|
|
257
293
|
])
|
|
258
|
-
];
|
|
294
|
+
]);
|
|
259
295
|
},
|
|
260
296
|
renderTreeCell(h, params) {
|
|
261
297
|
return Cell.renderTreeIcon(h, params, Cell.renderDefaultCell.call(this, h, params));
|
|
@@ -343,11 +379,13 @@ export const Cell = {
|
|
|
343
379
|
const { treeConfig, seqOpts } = $table;
|
|
344
380
|
const { slots } = column;
|
|
345
381
|
if (slots && slots.default) {
|
|
346
|
-
return $table.callSlot(slots.default, params, h);
|
|
382
|
+
return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h));
|
|
347
383
|
}
|
|
348
384
|
const { seq } = params;
|
|
349
385
|
const seqMethod = seqOpts.seqMethod;
|
|
350
|
-
return
|
|
386
|
+
return renderCellBaseVNs(h, params, [
|
|
387
|
+
h('span', `${formatText(seqMethod ? seqMethod(params) : treeConfig ? seq : (seqOpts.startIndex || 0) + seq, 1)}`)
|
|
388
|
+
]);
|
|
351
389
|
},
|
|
352
390
|
renderTreeIndexCell(h, params) {
|
|
353
391
|
return Cell.renderTreeIcon(h, params, Cell.renderSeqCell(h, params));
|
|
@@ -394,7 +432,7 @@ export const Cell = {
|
|
|
394
432
|
}
|
|
395
433
|
const radioParams = Object.assign(Object.assign({}, params), { checked: isChecked, disabled: isDisabled, visible: isVisible });
|
|
396
434
|
if (radioSlot) {
|
|
397
|
-
return $table.callSlot(radioSlot, radioParams, h);
|
|
435
|
+
return renderCellBaseVNs(h, params, $table.callSlot(radioSlot, radioParams, h));
|
|
398
436
|
}
|
|
399
437
|
const radioVNs = [];
|
|
400
438
|
if (isVisible) {
|
|
@@ -407,7 +445,7 @@ export const Cell = {
|
|
|
407
445
|
class: 'vxe-radio--label'
|
|
408
446
|
}, defaultSlot ? $table.callSlot(defaultSlot, radioParams, h) : XEUtils.get(row, labelField)));
|
|
409
447
|
}
|
|
410
|
-
return [
|
|
448
|
+
return renderCellBaseVNs(h, params, [
|
|
411
449
|
h('span', {
|
|
412
450
|
class: ['vxe-cell--radio', {
|
|
413
451
|
'is--checked': isChecked,
|
|
@@ -415,7 +453,7 @@ export const Cell = {
|
|
|
415
453
|
}],
|
|
416
454
|
on
|
|
417
455
|
}, radioVNs)
|
|
418
|
-
];
|
|
456
|
+
]);
|
|
419
457
|
},
|
|
420
458
|
renderTreeRadioCell(h, params) {
|
|
421
459
|
return Cell.renderTreeIcon(h, params, Cell.renderRadioCell(h, params));
|
|
@@ -507,7 +545,7 @@ export const Cell = {
|
|
|
507
545
|
}
|
|
508
546
|
const checkboxParams = Object.assign(Object.assign({}, params), { checked: isChecked, disabled: isDisabled, visible: isVisible, indeterminate });
|
|
509
547
|
if (checkboxSlot) {
|
|
510
|
-
return $table.callSlot(checkboxSlot, checkboxParams, h);
|
|
548
|
+
return renderCellBaseVNs(h, params, $table.callSlot(checkboxSlot, checkboxParams, h));
|
|
511
549
|
}
|
|
512
550
|
const checkVNs = [];
|
|
513
551
|
if (isVisible) {
|
|
@@ -520,7 +558,7 @@ export const Cell = {
|
|
|
520
558
|
class: 'vxe-checkbox--label'
|
|
521
559
|
}, defaultSlot ? $table.callSlot(defaultSlot, checkboxParams, h) : XEUtils.get(row, labelField)));
|
|
522
560
|
}
|
|
523
|
-
return [
|
|
561
|
+
return renderCellBaseVNs(h, params, [
|
|
524
562
|
h('span', {
|
|
525
563
|
class: ['vxe-cell--checkbox', {
|
|
526
564
|
'is--checked': isChecked,
|
|
@@ -530,7 +568,7 @@ export const Cell = {
|
|
|
530
568
|
}],
|
|
531
569
|
on
|
|
532
570
|
}, checkVNs)
|
|
533
|
-
];
|
|
571
|
+
]);
|
|
534
572
|
},
|
|
535
573
|
renderTreeSelectionCell(h, params) {
|
|
536
574
|
return Cell.renderTreeIcon(h, params, Cell.renderCheckboxCell(h, params));
|
|
@@ -567,7 +605,7 @@ export const Cell = {
|
|
|
567
605
|
}
|
|
568
606
|
const checkboxParams = Object.assign(Object.assign({}, params), { checked: isChecked, disabled: isDisabled, visible: isVisible, indeterminate: isIndeterminate });
|
|
569
607
|
if (checkboxSlot) {
|
|
570
|
-
return $table.callSlot(checkboxSlot, checkboxParams, h);
|
|
608
|
+
return renderCellBaseVNs(h, params, $table.callSlot(checkboxSlot, checkboxParams, h));
|
|
571
609
|
}
|
|
572
610
|
const checkVNs = [];
|
|
573
611
|
if (isVisible) {
|
|
@@ -580,7 +618,7 @@ export const Cell = {
|
|
|
580
618
|
class: 'vxe-checkbox--label'
|
|
581
619
|
}, defaultSlot ? $table.callSlot(defaultSlot, checkboxParams, h) : XEUtils.get(row, labelField)));
|
|
582
620
|
}
|
|
583
|
-
return [
|
|
621
|
+
return renderCellBaseVNs(h, params, [
|
|
584
622
|
h('span', {
|
|
585
623
|
class: ['vxe-cell--checkbox', {
|
|
586
624
|
'is--checked': isChecked,
|
|
@@ -590,7 +628,7 @@ export const Cell = {
|
|
|
590
628
|
}],
|
|
591
629
|
on
|
|
592
630
|
}, checkVNs)
|
|
593
|
-
];
|
|
631
|
+
]);
|
|
594
632
|
},
|
|
595
633
|
renderTreeSelectionCellByProp(h, params) {
|
|
596
634
|
return Cell.renderTreeIcon(h, params, Cell.renderCheckboxCellByProp(h, params));
|
|
@@ -607,7 +645,7 @@ export const Cell = {
|
|
|
607
645
|
let isAceived = false;
|
|
608
646
|
let isLazyLoading = false;
|
|
609
647
|
if (slots && slots.icon) {
|
|
610
|
-
return $table.callSlot(slots.icon, params, h);
|
|
648
|
+
return renderCellBaseVNs(h, params, $table.callSlot(slots.icon, params, h));
|
|
611
649
|
}
|
|
612
650
|
if (!isHidden) {
|
|
613
651
|
const rowid = getRowid($table, row);
|
|
@@ -616,7 +654,7 @@ export const Cell = {
|
|
|
616
654
|
isLazyLoading = !!rowExpandLazyLoadedMaps[rowid];
|
|
617
655
|
}
|
|
618
656
|
}
|
|
619
|
-
return [
|
|
657
|
+
return renderCellBaseVNs(h, params, [
|
|
620
658
|
showIcon && (!visibleMethod || visibleMethod(params))
|
|
621
659
|
? h('span', {
|
|
622
660
|
class: ['vxe-table--expanded', {
|
|
@@ -632,13 +670,13 @@ export const Cell = {
|
|
|
632
670
|
class: ['vxe-table--expand-btn', isLazyLoading ? (iconLoaded || getIcon().TABLE_EXPAND_LOADED) : (isAceived ? (iconOpen || getIcon().TABLE_EXPAND_OPEN) : (iconClose || getIcon().TABLE_EXPAND_CLOSE))]
|
|
633
671
|
})
|
|
634
672
|
])
|
|
635
|
-
:
|
|
673
|
+
: renderEmptyElement($table),
|
|
636
674
|
defaultSlot || labelField
|
|
637
675
|
? h('span', {
|
|
638
676
|
class: 'vxe-table--expand-label'
|
|
639
677
|
}, defaultSlot ? $table.callSlot(defaultSlot, params, h) : XEUtils.get(row, labelField))
|
|
640
|
-
:
|
|
641
|
-
];
|
|
678
|
+
: renderEmptyElement($table)
|
|
679
|
+
]);
|
|
642
680
|
},
|
|
643
681
|
renderExpandData(h, params) {
|
|
644
682
|
const { $table, column } = params;
|
|
@@ -662,16 +700,16 @@ export const Cell = {
|
|
|
662
700
|
const { $table, column } = params;
|
|
663
701
|
const { slots } = column;
|
|
664
702
|
if (slots && slots.default) {
|
|
665
|
-
return $table.callSlot(slots.default, params, h);
|
|
703
|
+
return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h));
|
|
666
704
|
}
|
|
667
|
-
return [
|
|
705
|
+
return renderCellBaseVNs(h, params, [
|
|
668
706
|
h('span', {
|
|
669
707
|
class: 'vxe-cell--html',
|
|
670
708
|
domProps: {
|
|
671
709
|
innerHTML: getDefaultCellLabel(params)
|
|
672
710
|
}
|
|
673
711
|
})
|
|
674
|
-
];
|
|
712
|
+
]);
|
|
675
713
|
},
|
|
676
714
|
renderTreeHTMLCell(h, params) {
|
|
677
715
|
return Cell.renderTreeIcon(h, params, Cell.renderHTMLCell(h, params));
|
|
@@ -831,14 +869,14 @@ export const Cell = {
|
|
|
831
869
|
return [];
|
|
832
870
|
}
|
|
833
871
|
if (slots && slots.default) {
|
|
834
|
-
return $table.callSlot(slots.default, cellParams, h);
|
|
872
|
+
return renderCellBaseVNs(h, params, $table.callSlot(slots.default, cellParams, h));
|
|
835
873
|
}
|
|
836
874
|
if (formatter) {
|
|
837
|
-
return [
|
|
875
|
+
return renderCellBaseVNs(h, params, [
|
|
838
876
|
h('span', {
|
|
839
877
|
class: 'vxe-cell--label'
|
|
840
878
|
}, [getDefaultCellLabel(cellParams)])
|
|
841
|
-
];
|
|
879
|
+
]);
|
|
842
880
|
}
|
|
843
881
|
return Cell.renderDefaultCell.call(_vm, h, cellParams);
|
|
844
882
|
}
|
package/es/table/src/column.js
CHANGED