vxe-table 3.15.5 → 3.15.7
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/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +3 -2
- package/es/locale/lang/de-DE.js +3 -2
- package/es/locale/lang/en-US.js +2 -1
- package/es/locale/lang/es-ES.js +3 -2
- package/es/locale/lang/fr-FR.js +2 -1
- package/es/locale/lang/hu-HU.js +2 -1
- package/es/locale/lang/hy-AM.js +2 -1
- package/es/locale/lang/id-ID.js +2 -1
- package/es/locale/lang/it-IT.js +2 -1
- package/es/locale/lang/ja-JP.js +2 -1
- package/es/locale/lang/ko-KR.js +2 -1
- package/es/locale/lang/nb-NO.js +2 -1
- package/es/locale/lang/pt-BR.js +2 -1
- package/es/locale/lang/ru-RU.js +2 -1
- package/es/locale/lang/th-TH.js +2 -1
- package/es/locale/lang/ug-CN.js +2 -1
- package/es/locale/lang/uk-UA.js +2 -1
- package/es/locale/lang/vi-VN.js +2 -1
- package/es/locale/lang/zh-CHT.js +2 -1
- package/es/locale/lang/zh-CN.js +2 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +62 -37
- package/es/table/module/custom/panel.js +7 -7
- package/es/table/module/export/mixin.js +13 -12
- package/es/table/module/keyboard/mixin.js +3 -2
- package/es/table/src/body.js +49 -16
- package/es/table/src/cell.js +137 -45
- package/es/table/src/column.js +2 -0
- package/es/table/src/columnInfo.js +1 -0
- package/es/table/src/methods.js +983 -495
- package/es/table/src/props.js +9 -7
- package/es/table/src/table.js +108 -35
- package/es/table/style.css +70 -40
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +13 -1
- package/es/ui/src/dom.js +3 -0
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +70 -40
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +1735 -858
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +3 -2
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +3 -2
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -1
- 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/fr-FR.js +2 -1
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/hu-HU.js +2 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +2 -1
- package/lib/locale/lang/hy-AM.js +2 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/id-ID.js +2 -1
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/it-IT.js +2 -1
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +2 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -1
- package/lib/locale/lang/ko-KR.js +2 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +2 -1
- package/lib/locale/lang/nb-NO.js +2 -1
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +2 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -1
- package/lib/locale/lang/ru-RU.js +2 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +2 -1
- package/lib/locale/lang/th-TH.js +2 -1
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/ug-CN.js +2 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +2 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +2 -1
- package/lib/locale/lang/vi-VN.js +2 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +2 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +2 -1
- package/lib/locale/lang/zh-CN.js +2 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +74 -48
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +6 -2
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +13 -5
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +2 -1
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/src/body.js +39 -15
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +157 -36
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +2 -0
- 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 +1164 -562
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +9 -7
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +104 -34
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +70 -40
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +13 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +4 -0
- package/lib/ui/src/dom.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 +70 -40
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/ar-EG.ts +3 -2
- package/packages/locale/lang/de-DE.ts +3 -2
- package/packages/locale/lang/en-US.ts +2 -1
- package/packages/locale/lang/es-ES.ts +3 -2
- package/packages/locale/lang/fr-FR.ts +2 -1
- package/packages/locale/lang/hu-HU.ts +2 -1
- package/packages/locale/lang/hy-AM.ts +2 -1
- package/packages/locale/lang/id-ID.ts +2 -1
- package/packages/locale/lang/it-IT.ts +2 -1
- package/packages/locale/lang/ja-JP.ts +2 -1
- package/packages/locale/lang/ko-KR.ts +2 -1
- package/packages/locale/lang/nb-NO.ts +2 -1
- package/packages/locale/lang/pt-BR.ts +2 -1
- package/packages/locale/lang/ru-RU.ts +2 -1
- package/packages/locale/lang/th-TH.ts +2 -1
- package/packages/locale/lang/ug-CN.ts +2 -1
- package/packages/locale/lang/uk-UA.ts +2 -1
- package/packages/locale/lang/vi-VN.ts +2 -1
- package/packages/locale/lang/zh-CHT.ts +2 -1
- package/packages/locale/lang/zh-CN.ts +2 -1
- package/packages/table/module/custom/mixin.ts +85 -51
- package/packages/table/module/custom/panel.ts +8 -8
- package/packages/table/module/export/mixin.ts +19 -18
- package/packages/table/module/keyboard/mixin.ts +3 -2
- package/packages/table/src/body.ts +50 -17
- package/packages/table/src/cell.ts +136 -45
- package/packages/table/src/column.ts +2 -0
- package/packages/table/src/columnInfo.ts +1 -0
- package/packages/table/src/methods.ts +1016 -512
- package/packages/table/src/props.ts +9 -7
- package/packages/table/src/table.ts +122 -38
- package/packages/ui/index.ts +12 -0
- package/packages/ui/src/dom.ts +4 -0
- package/styles/components/table.scss +131 -92
- /package/es/{iconfont.1744880837792.ttf → iconfont.1745290222894.ttf} +0 -0
- /package/es/{iconfont.1744880837792.woff → iconfont.1745290222894.woff} +0 -0
- /package/es/{iconfont.1744880837792.woff2 → iconfont.1745290222894.woff2} +0 -0
- /package/lib/{iconfont.1744880837792.ttf → iconfont.1745290222894.ttf} +0 -0
- /package/lib/{iconfont.1744880837792.woff → iconfont.1745290222894.woff} +0 -0
- /package/lib/{iconfont.1744880837792.woff2 → iconfont.1745290222894.woff2} +0 -0
package/es/table/src/cell.js
CHANGED
|
@@ -84,7 +84,7 @@ function renderCellBaseVNs(h, params, content) {
|
|
|
84
84
|
const treeOpts = $table.computeTreeOpts;
|
|
85
85
|
const { showIcon, isPeerDrag, isCrossDrag, visibleMethod } = rowDragOpts;
|
|
86
86
|
const rVisibleMethod = visibleMethod || (dragConfig ? dragConfig.rowVisibleMethod : null);
|
|
87
|
-
const vns =
|
|
87
|
+
const vns = [];
|
|
88
88
|
if (dragSort && rowOpts.drag && ((showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params)))) {
|
|
89
89
|
if (treeConfig) {
|
|
90
90
|
if (treeOpts.transform && (isPeerDrag || isCrossDrag || !level)) {
|
|
@@ -95,7 +95,7 @@ function renderCellBaseVNs(h, params, content) {
|
|
|
95
95
|
vns.unshift(renderCellDragIcon(h, params));
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
return vns;
|
|
98
|
+
return vns.concat(XEUtils.isArray(content) ? content : [content]);
|
|
99
99
|
}
|
|
100
100
|
function renderHeaderCellDragIcon(h, params) {
|
|
101
101
|
const { $table, column } = params;
|
|
@@ -242,25 +242,26 @@ function renderCellHandle(h, params) {
|
|
|
242
242
|
const { column, $table } = params;
|
|
243
243
|
const tableProps = $table;
|
|
244
244
|
const { editConfig } = tableProps;
|
|
245
|
-
const { type, treeNode, editRender } = column;
|
|
245
|
+
const { type, treeNode, rowGroupNode, editRender } = column;
|
|
246
246
|
const checkboxOpts = $table.computeCheckboxOpts;
|
|
247
247
|
const editOpts = $table.computeEditOpts;
|
|
248
|
+
const isDeepCell = treeNode || rowGroupNode;
|
|
248
249
|
switch (type) {
|
|
249
250
|
case 'seq':
|
|
250
|
-
return
|
|
251
|
+
return isDeepCell ? Cell.renderDeepIndexCell(h, params) : Cell.renderSeqCell(h, params);
|
|
251
252
|
case 'radio':
|
|
252
|
-
return
|
|
253
|
+
return isDeepCell ? Cell.renderDeepRadioCell(h, params) : Cell.renderRadioCell(h, params);
|
|
253
254
|
case 'checkbox':
|
|
254
|
-
return checkboxOpts.checkField ? (
|
|
255
|
+
return checkboxOpts.checkField ? (isDeepCell ? Cell.renderDeepSelectionCellByProp(h, params) : Cell.renderCheckboxCellByProp(h, params)) : (isDeepCell ? Cell.renderDeepSelectionCell(h, params) : Cell.renderCheckboxCell(h, params));
|
|
255
256
|
case 'expand':
|
|
256
257
|
return Cell.renderExpandCell(h, params);
|
|
257
258
|
case 'html':
|
|
258
|
-
return
|
|
259
|
+
return isDeepCell ? Cell.renderDeepHTMLCell(h, params) : Cell.renderHTMLCell(h, params);
|
|
259
260
|
}
|
|
260
261
|
if (isEnableConf(editConfig) && editRender) {
|
|
261
|
-
return editOpts.mode === 'cell' ? (
|
|
262
|
+
return editOpts.mode === 'cell' ? (isDeepCell ? Cell.renderDeepCellEdit(h, params) : Cell.renderCellEdit(h, params)) : (isDeepCell ? Cell.renderDeepRowEdit(h, params) : Cell.renderRowEdit(h, params));
|
|
262
263
|
}
|
|
263
|
-
return
|
|
264
|
+
return isDeepCell ? Cell.renderDeepCell(h, params) : Cell.renderDefaultCell(h, params);
|
|
264
265
|
}
|
|
265
266
|
function renderHeaderHandle(h, params) {
|
|
266
267
|
const { column, $table } = params;
|
|
@@ -340,7 +341,10 @@ export const Cell = {
|
|
|
340
341
|
},
|
|
341
342
|
renderDefaultCell(h, params) {
|
|
342
343
|
const { $table, row, column } = params;
|
|
343
|
-
const
|
|
344
|
+
const tableReactData = $table;
|
|
345
|
+
const tableInternalData = $table;
|
|
346
|
+
const { isRowGroupStatus } = tableReactData;
|
|
347
|
+
const { slots, editRender, cellRender, rowGroupNode } = column;
|
|
344
348
|
const renderOpts = editRender || cellRender;
|
|
345
349
|
if (slots && slots.default) {
|
|
346
350
|
return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h));
|
|
@@ -354,7 +358,35 @@ export const Cell = {
|
|
|
354
358
|
return renderCellBaseVNs(h, params, getSlotVNs(renderFn.call($table, h, renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params))));
|
|
355
359
|
}
|
|
356
360
|
}
|
|
357
|
-
|
|
361
|
+
let cellValue = '';
|
|
362
|
+
if (isRowGroupStatus && rowGroupNode && row.isAggregate) {
|
|
363
|
+
const { fullColumnFieldData } = tableInternalData;
|
|
364
|
+
const rowGroupOpts = $table.computeRowGroupOpts;
|
|
365
|
+
const { showTotal, totalMethod, contentMethod, mapChildrenField } = rowGroupOpts;
|
|
366
|
+
const groupField = row.groupField;
|
|
367
|
+
cellValue = row.groupContent;
|
|
368
|
+
const childList = mapChildrenField ? (row[mapChildrenField] || []) : [];
|
|
369
|
+
const totalValue = childList.length;
|
|
370
|
+
const colRest = fullColumnFieldData[groupField] || {};
|
|
371
|
+
const params = {
|
|
372
|
+
$table,
|
|
373
|
+
groupField,
|
|
374
|
+
groupColumn: (colRest ? colRest.column : null),
|
|
375
|
+
column,
|
|
376
|
+
groupValue: cellValue,
|
|
377
|
+
children: childList,
|
|
378
|
+
totalValue: totalValue
|
|
379
|
+
};
|
|
380
|
+
if (contentMethod) {
|
|
381
|
+
cellValue = `${contentMethod(params)}`;
|
|
382
|
+
}
|
|
383
|
+
if (showTotal) {
|
|
384
|
+
cellValue = getI18n('vxe.table.rowGroupContentTotal', [cellValue, totalMethod ? totalMethod(params) : totalValue, totalValue]);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
else if (!(isRowGroupStatus && row.isAggregate)) {
|
|
388
|
+
cellValue = $table.getCellLabel(row, column);
|
|
389
|
+
}
|
|
358
390
|
const cellPlaceholder = editRender ? editRender.placeholder : '';
|
|
359
391
|
return renderCellBaseVNs(h, params, [
|
|
360
392
|
h('span', {
|
|
@@ -369,16 +401,57 @@ export const Cell = {
|
|
|
369
401
|
])
|
|
370
402
|
]);
|
|
371
403
|
},
|
|
372
|
-
|
|
373
|
-
return Cell.
|
|
404
|
+
renderDeepCell(h, params) {
|
|
405
|
+
return Cell.renderDeepNodeBtn(h, params, Cell.renderDefaultCell.call(this, h, params));
|
|
374
406
|
},
|
|
375
407
|
renderDefaultFooter(h, params) {
|
|
376
408
|
return getFooterContent(h, params);
|
|
377
409
|
},
|
|
378
410
|
/**
|
|
379
|
-
*
|
|
411
|
+
* 行分组
|
|
412
|
+
*/
|
|
413
|
+
renderRowGroupBtn(h, params, cellVNodes) {
|
|
414
|
+
const { $table } = params;
|
|
415
|
+
const tableReactData = $table;
|
|
416
|
+
const tableInternalData = $table;
|
|
417
|
+
const { row, level } = params;
|
|
418
|
+
const { rowGroupExpandedFlag } = tableReactData;
|
|
419
|
+
const { rowGroupExpandedMaps } = tableInternalData;
|
|
420
|
+
const rowGroupOpts = $table.computeRowGroupOpts;
|
|
421
|
+
const { padding, indent } = rowGroupOpts;
|
|
422
|
+
const rowid = getRowid($table, row);
|
|
423
|
+
const isExpand = !!rowGroupExpandedFlag && !!rowGroupExpandedMaps[rowid];
|
|
424
|
+
return h('div', {
|
|
425
|
+
class: ['vxe-row-group--tree-node', {
|
|
426
|
+
'is--expanded': isExpand
|
|
427
|
+
}],
|
|
428
|
+
style: padding && indent
|
|
429
|
+
? {
|
|
430
|
+
paddingLeft: `${level * indent}px`
|
|
431
|
+
}
|
|
432
|
+
: undefined
|
|
433
|
+
}, [
|
|
434
|
+
h('span', {
|
|
435
|
+
class: 'vxe-row-group--node-btn',
|
|
436
|
+
on: {
|
|
437
|
+
click(evnt) {
|
|
438
|
+
$table.triggerRowGroupExpandEvent(evnt, params);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}, [
|
|
442
|
+
h('i', {
|
|
443
|
+
class: isExpand ? getIcon().TABLE_ROW_GROUP_OPEN : getIcon().TABLE_ROW_GROUP_CLOSE
|
|
444
|
+
})
|
|
445
|
+
]),
|
|
446
|
+
h('div', {
|
|
447
|
+
class: 'vxe-row-group-cell'
|
|
448
|
+
}, cellVNodes)
|
|
449
|
+
]);
|
|
450
|
+
},
|
|
451
|
+
/**
|
|
452
|
+
* 树
|
|
380
453
|
*/
|
|
381
|
-
|
|
454
|
+
renderTreeNodeBtn(h, params, cellVNodes) {
|
|
382
455
|
const { $table, isHidden } = params;
|
|
383
456
|
const tableReactData = $table;
|
|
384
457
|
const tableInternalData = $table;
|
|
@@ -387,7 +460,7 @@ export const Cell = {
|
|
|
387
460
|
const treeOpts = $table.computeTreeOpts;
|
|
388
461
|
const { row, column, level } = params;
|
|
389
462
|
const { slots } = column;
|
|
390
|
-
const { indent, lazy, trigger, iconLoaded, showIcon, iconOpen, iconClose } = treeOpts;
|
|
463
|
+
const { padding, indent, lazy, trigger, iconLoaded, showIcon, iconOpen, iconClose } = treeOpts;
|
|
391
464
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
392
465
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
|
|
393
466
|
const rowChilds = row[childrenField];
|
|
@@ -421,18 +494,20 @@ export const Cell = {
|
|
|
421
494
|
class: ['vxe-cell--tree-node', {
|
|
422
495
|
'is--active': isActive
|
|
423
496
|
}],
|
|
424
|
-
style:
|
|
425
|
-
|
|
426
|
-
|
|
497
|
+
style: padding && indent
|
|
498
|
+
? {
|
|
499
|
+
paddingLeft: `${level * indent}px`
|
|
500
|
+
}
|
|
501
|
+
: undefined
|
|
427
502
|
}, [
|
|
428
503
|
showIcon && (lazy ? (isLazyLoaded ? hasChild : (hasChild || hasLazyChilds)) : hasChild)
|
|
429
504
|
? [
|
|
430
505
|
h('div', {
|
|
431
|
-
class: 'vxe-tree
|
|
506
|
+
class: 'vxe-cell--tree-btn',
|
|
432
507
|
on: ons
|
|
433
508
|
}, [
|
|
434
509
|
h('i', {
|
|
435
|
-
class:
|
|
510
|
+
class: isLazyLoading ? (iconLoaded || getIcon().TABLE_TREE_LOADED) : (isActive ? (iconOpen || getIcon().TABLE_TREE_OPEN) : (iconClose || getIcon().TABLE_TREE_CLOSE))
|
|
436
511
|
})
|
|
437
512
|
])
|
|
438
513
|
]
|
|
@@ -443,6 +518,18 @@ export const Cell = {
|
|
|
443
518
|
])
|
|
444
519
|
];
|
|
445
520
|
},
|
|
521
|
+
/**
|
|
522
|
+
* 层级节点。
|
|
523
|
+
* 行分组、树结构
|
|
524
|
+
*/
|
|
525
|
+
renderDeepNodeBtn(h, params, cellVNodes) {
|
|
526
|
+
const { row, column } = params;
|
|
527
|
+
const { rowGroupNode } = column;
|
|
528
|
+
if (rowGroupNode && row.isAggregate) {
|
|
529
|
+
return [Cell.renderRowGroupBtn(h, params, cellVNodes)];
|
|
530
|
+
}
|
|
531
|
+
return [Cell.renderTreeNodeBtn(h, params, cellVNodes)];
|
|
532
|
+
},
|
|
446
533
|
/**
|
|
447
534
|
* 序号
|
|
448
535
|
*/
|
|
@@ -466,8 +553,8 @@ export const Cell = {
|
|
|
466
553
|
h('span', `${formatText(seqMethod ? seqMethod(params) : treeConfig ? seq : (seqOpts.startIndex || 0) + seq, 1)}`)
|
|
467
554
|
]);
|
|
468
555
|
},
|
|
469
|
-
|
|
470
|
-
return Cell.
|
|
556
|
+
renderDeepIndexCell(h, params) {
|
|
557
|
+
return Cell.renderDeepNodeBtn(h, params, Cell.renderSeqCell(h, params));
|
|
471
558
|
},
|
|
472
559
|
/**
|
|
473
560
|
* 单选
|
|
@@ -496,7 +583,7 @@ export const Cell = {
|
|
|
496
583
|
const defaultSlot = slots ? slots.default : null;
|
|
497
584
|
const radioSlot = slots ? slots.radio : null;
|
|
498
585
|
const isChecked = row === selectRadioRow;
|
|
499
|
-
const isVisible = !visibleMethod || visibleMethod({ row });
|
|
586
|
+
const isVisible = !visibleMethod || visibleMethod({ $table, row });
|
|
500
587
|
let isDisabled = !!checkMethod;
|
|
501
588
|
let on;
|
|
502
589
|
if (!isHidden) {
|
|
@@ -508,7 +595,7 @@ export const Cell = {
|
|
|
508
595
|
}
|
|
509
596
|
};
|
|
510
597
|
if (checkMethod) {
|
|
511
|
-
isDisabled = !checkMethod({ row });
|
|
598
|
+
isDisabled = !checkMethod({ $table, row });
|
|
512
599
|
}
|
|
513
600
|
}
|
|
514
601
|
const radioParams = Object.assign(Object.assign({}, params), { checked: isChecked, disabled: isDisabled, visible: isVisible });
|
|
@@ -536,8 +623,8 @@ export const Cell = {
|
|
|
536
623
|
}, radioVNs)
|
|
537
624
|
]);
|
|
538
625
|
},
|
|
539
|
-
|
|
540
|
-
return Cell.
|
|
626
|
+
renderDeepRadioCell(h, params) {
|
|
627
|
+
return Cell.renderDeepNodeBtn(h, params, Cell.renderRadioCell(h, params));
|
|
541
628
|
},
|
|
542
629
|
/**
|
|
543
630
|
* 多选
|
|
@@ -602,7 +689,7 @@ export const Cell = {
|
|
|
602
689
|
const tableReactData = $table;
|
|
603
690
|
const tableInternalData = $table;
|
|
604
691
|
const { treeConfig } = tableProps;
|
|
605
|
-
const { updateCheckboxFlag } = tableReactData;
|
|
692
|
+
const { updateCheckboxFlag, isRowGroupStatus } = tableReactData;
|
|
606
693
|
const { selectCheckboxMaps, treeIndeterminateRowMaps } = tableInternalData;
|
|
607
694
|
const checkboxOpts = $table.computeCheckboxOpts;
|
|
608
695
|
const { labelField, checkMethod, visibleMethod } = checkboxOpts;
|
|
@@ -611,7 +698,7 @@ export const Cell = {
|
|
|
611
698
|
const checkboxSlot = slots ? slots.checkbox : null;
|
|
612
699
|
let indeterminate = false;
|
|
613
700
|
let isChecked = false;
|
|
614
|
-
const isVisible = !visibleMethod || visibleMethod({ row });
|
|
701
|
+
const isVisible = !visibleMethod || visibleMethod({ $table, row });
|
|
615
702
|
let isDisabled = !!checkMethod;
|
|
616
703
|
const ons = {};
|
|
617
704
|
if (!isHidden) {
|
|
@@ -623,9 +710,9 @@ export const Cell = {
|
|
|
623
710
|
}
|
|
624
711
|
};
|
|
625
712
|
if (checkMethod) {
|
|
626
|
-
isDisabled = !checkMethod({ row });
|
|
713
|
+
isDisabled = !checkMethod({ $table, row });
|
|
627
714
|
}
|
|
628
|
-
if (treeConfig) {
|
|
715
|
+
if (treeConfig || isRowGroupStatus) {
|
|
629
716
|
indeterminate = !!treeIndeterminateRowMaps[rowid];
|
|
630
717
|
}
|
|
631
718
|
}
|
|
@@ -656,8 +743,8 @@ export const Cell = {
|
|
|
656
743
|
}, checkVNs)
|
|
657
744
|
]);
|
|
658
745
|
},
|
|
659
|
-
|
|
660
|
-
return Cell.
|
|
746
|
+
renderDeepSelectionCell(h, params) {
|
|
747
|
+
return Cell.renderDeepNodeBtn(h, params, Cell.renderCheckboxCell(h, params));
|
|
661
748
|
},
|
|
662
749
|
renderCheckboxCellByProp(h, params) {
|
|
663
750
|
const { $table, row, column, isHidden } = params;
|
|
@@ -665,7 +752,7 @@ export const Cell = {
|
|
|
665
752
|
const tableReactData = $table;
|
|
666
753
|
const tableInternalData = $table;
|
|
667
754
|
const { treeConfig } = tableProps;
|
|
668
|
-
const { updateCheckboxFlag } = tableReactData;
|
|
755
|
+
const { updateCheckboxFlag, isRowGroupStatus } = tableReactData;
|
|
669
756
|
const { treeIndeterminateRowMaps } = tableInternalData;
|
|
670
757
|
const checkboxOpts = $table.computeCheckboxOpts;
|
|
671
758
|
const { labelField, checkField, checkMethod, visibleMethod } = checkboxOpts;
|
|
@@ -675,7 +762,7 @@ export const Cell = {
|
|
|
675
762
|
const checkboxSlot = slots ? slots.checkbox : null;
|
|
676
763
|
let isIndeterminate = false;
|
|
677
764
|
let isChecked = false;
|
|
678
|
-
const isVisible = !visibleMethod || visibleMethod({ row });
|
|
765
|
+
const isVisible = !visibleMethod || visibleMethod({ $table, row });
|
|
679
766
|
let isDisabled = !!checkMethod;
|
|
680
767
|
const ons = {};
|
|
681
768
|
if (!isHidden) {
|
|
@@ -687,9 +774,9 @@ export const Cell = {
|
|
|
687
774
|
}
|
|
688
775
|
};
|
|
689
776
|
if (checkMethod) {
|
|
690
|
-
isDisabled = !checkMethod({ row });
|
|
777
|
+
isDisabled = !checkMethod({ $table, row });
|
|
691
778
|
}
|
|
692
|
-
if (treeConfig) {
|
|
779
|
+
if (treeConfig || isRowGroupStatus) {
|
|
693
780
|
isIndeterminate = !!treeIndeterminateRowMaps[rowid];
|
|
694
781
|
}
|
|
695
782
|
}
|
|
@@ -720,15 +807,17 @@ export const Cell = {
|
|
|
720
807
|
}, checkVNs)
|
|
721
808
|
]);
|
|
722
809
|
},
|
|
723
|
-
|
|
724
|
-
return Cell.
|
|
810
|
+
renderDeepSelectionCellByProp(h, params) {
|
|
811
|
+
return Cell.renderDeepNodeBtn(h, params, Cell.renderCheckboxCellByProp(h, params));
|
|
725
812
|
},
|
|
726
813
|
/**
|
|
727
814
|
* 展开行
|
|
728
815
|
*/
|
|
729
816
|
renderExpandCell(h, params) {
|
|
730
817
|
const { $table, isHidden, row, column } = params;
|
|
818
|
+
const tableReactData = $table;
|
|
731
819
|
const tableInternalData = $table;
|
|
820
|
+
const { isRowGroupStatus } = tableReactData;
|
|
732
821
|
const { rowExpandedMaps, rowExpandLazyLoadedMaps } = tableInternalData;
|
|
733
822
|
const expandOpts = $table.computeExpandOpts;
|
|
734
823
|
const { lazy, labelField, iconLoaded, showIcon, iconOpen, iconClose, visibleMethod } = expandOpts;
|
|
@@ -737,6 +826,9 @@ export const Cell = {
|
|
|
737
826
|
const iconSlot = slots ? slots.icon : null;
|
|
738
827
|
let isActive = false;
|
|
739
828
|
let isLazyLoading = false;
|
|
829
|
+
if (isRowGroupStatus && row.isAggregate) {
|
|
830
|
+
return renderCellBaseVNs(h, params, []);
|
|
831
|
+
}
|
|
740
832
|
if (iconSlot) {
|
|
741
833
|
return renderCellBaseVNs(h, params, $table.callSlot(iconSlot, params, h));
|
|
742
834
|
}
|
|
@@ -807,8 +899,8 @@ export const Cell = {
|
|
|
807
899
|
})
|
|
808
900
|
]);
|
|
809
901
|
},
|
|
810
|
-
|
|
811
|
-
return Cell.
|
|
902
|
+
renderDeepHTMLCell(h, params) {
|
|
903
|
+
return Cell.renderDeepNodeBtn(h, params, Cell.renderHTMLCell(h, params));
|
|
812
904
|
},
|
|
813
905
|
/**
|
|
814
906
|
* 排序和筛选
|
|
@@ -949,8 +1041,8 @@ export const Cell = {
|
|
|
949
1041
|
const { editRender } = column;
|
|
950
1042
|
return Cell.runRenderer(h, params, this, isEnableConf(editRender) && actived && actived.row === params.row);
|
|
951
1043
|
},
|
|
952
|
-
|
|
953
|
-
return Cell.
|
|
1044
|
+
renderDeepRowEdit(h, params) {
|
|
1045
|
+
return Cell.renderDeepNodeBtn(h, params, Cell.renderRowEdit(h, params));
|
|
954
1046
|
},
|
|
955
1047
|
// 单元格编辑模式
|
|
956
1048
|
renderCellEdit(h, params) {
|
|
@@ -961,8 +1053,8 @@ export const Cell = {
|
|
|
961
1053
|
const { editRender } = column;
|
|
962
1054
|
return Cell.runRenderer(h, params, this, isEnableConf(editRender) && actived && actived.row === params.row && actived.column === params.column);
|
|
963
1055
|
},
|
|
964
|
-
|
|
965
|
-
return Cell.
|
|
1056
|
+
renderDeepCellEdit(h, params) {
|
|
1057
|
+
return Cell.renderDeepNodeBtn(h, params, Cell.renderCellEdit(h, params));
|
|
966
1058
|
},
|
|
967
1059
|
runRenderer(h, params, _vm, isEdit) {
|
|
968
1060
|
const { $table, column } = params;
|
package/es/table/src/column.js
CHANGED
|
@@ -83,6 +83,7 @@ export class ColumnInfo {
|
|
|
83
83
|
filterResetMethod: _vm.filterResetMethod,
|
|
84
84
|
filterRecoverMethod: _vm.filterRecoverMethod,
|
|
85
85
|
filterRender: _vm.filterRender,
|
|
86
|
+
rowGroupNode: _vm.rowGroupNode,
|
|
86
87
|
treeNode: _vm.treeNode,
|
|
87
88
|
dragSort: _vm.dragSort,
|
|
88
89
|
rowResize: _vm.rowResize,
|