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.
- package/es/locale/lang/en-US.js +4 -2
- package/es/locale/lang/es-ES.js +4 -2
- package/es/locale/lang/hu-HU.js +4 -2
- package/es/locale/lang/ja-JP.js +4 -2
- package/es/locale/lang/ko-KR.js +4 -2
- package/es/locale/lang/pt-BR.js +4 -2
- package/es/locale/lang/ru-RU.js +4 -2
- package/es/locale/lang/uk-UA.js +4 -2
- package/es/locale/lang/vi-VN.js +4 -2
- package/es/locale/lang/zh-CHT.js +4 -2
- package/es/locale/lang/zh-CN.js +4 -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/module/export/export-panel.js +2 -2
- package/es/table/module/export/import-panel.js +1 -1
- package/es/table/src/body.js +43 -24
- package/es/table/src/cell.js +54 -24
- 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 +80 -3
- 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 +80 -3
- 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 +371 -78
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +4 -2
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +4 -2
- package/lib/locale/lang/es-ES.js +4 -2
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +4 -2
- package/lib/locale/lang/hu-HU.js +4 -2
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +4 -2
- package/lib/locale/lang/ja-JP.js +4 -2
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +4 -2
- package/lib/locale/lang/ko-KR.js +4 -2
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +4 -2
- package/lib/locale/lang/pt-BR.js +4 -2
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +4 -2
- package/lib/locale/lang/ru-RU.js +4 -2
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +4 -2
- package/lib/locale/lang/uk-UA.js +4 -2
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +4 -2
- package/lib/locale/lang/vi-VN.js +4 -2
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +4 -2
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +4 -2
- package/lib/locale/lang/zh-CN.js +4 -2
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +4 -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/module/export/export-panel.js +2 -2
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +1 -1
- package/lib/table/module/export/import-panel.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 +58 -24
- 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 +80 -3
- 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 +80 -3
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/en-US.ts +4 -2
- package/packages/locale/lang/es-ES.ts +4 -2
- package/packages/locale/lang/hu-HU.ts +4 -2
- package/packages/locale/lang/ja-JP.ts +4 -2
- package/packages/locale/lang/ko-KR.ts +4 -2
- package/packages/locale/lang/pt-BR.ts +4 -2
- package/packages/locale/lang/ru-RU.ts +4 -2
- package/packages/locale/lang/uk-UA.ts +4 -2
- package/packages/locale/lang/vi-VN.ts +4 -2
- package/packages/locale/lang/zh-CHT.ts +4 -2
- package/packages/locale/lang/zh-CN.ts +4 -2
- package/packages/table/module/custom/panel.ts +8 -8
- package/packages/table/module/edit/mixin.ts +10 -4
- package/packages/table/module/export/export-panel.ts +2 -2
- package/packages/table/module/export/import-panel.ts +1 -1
- package/packages/table/src/body.ts +43 -24
- package/packages/table/src/cell.ts +58 -24
- 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 +9 -3
- package/styles/components/table.scss +89 -0
- /package/es/{iconfont.1730681241769.ttf → iconfont.1730873052490.ttf} +0 -0
- /package/es/{iconfont.1730681241769.woff → iconfont.1730873052490.woff} +0 -0
- /package/es/{iconfont.1730681241769.woff2 → iconfont.1730873052490.woff2} +0 -0
- /package/lib/{iconfont.1730681241769.ttf → iconfont.1730873052490.ttf} +0 -0
- /package/lib/{iconfont.1730681241769.woff → iconfont.1730873052490.woff} +0 -0
- /package/lib/{iconfont.1730681241769.woff2 → iconfont.1730873052490.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,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
|
|
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
|
-
:
|
|
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
|
-
:
|
|
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));
|
package/es/table/src/column.js
CHANGED