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
|
@@ -22,8 +22,7 @@ const isVMScrollProcess = ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
|
|
|
22
22
|
return !!(isDragResize || (lastScrollTime && Date.now() < lastScrollTime + (delayHover as number)))
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
function renderLine (h: CreateElement,
|
|
26
|
-
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
25
|
+
function renderLine (h: CreateElement, $xeTable : VxeTableConstructor & VxeTablePrivateMethods, rowid: string, params: VxeTableDefines.CellRenderBodyParams, cellHeight: number) {
|
|
27
26
|
const tableProps = $xeTable
|
|
28
27
|
const tableInternalData = $xeTable as unknown as TableInternalData
|
|
29
28
|
|
|
@@ -68,7 +67,7 @@ function renderLine (h: CreateElement, _vm: any, rowid: string, params: VxeTable
|
|
|
68
67
|
*/
|
|
69
68
|
function renderTdColumn (
|
|
70
69
|
h: CreateElement,
|
|
71
|
-
|
|
70
|
+
$xeTable: VxeTableConstructor & VxeTablePrivateMethods,
|
|
72
71
|
seq: number | string,
|
|
73
72
|
rowid: string,
|
|
74
73
|
fixedType: 'left' | 'right' | '',
|
|
@@ -83,7 +82,6 @@ function renderTdColumn (
|
|
|
83
82
|
columns: VxeTableDefines.ColumnInfo[],
|
|
84
83
|
items: any[]
|
|
85
84
|
) {
|
|
86
|
-
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
87
85
|
const tableProps = $xeTable
|
|
88
86
|
const tableReactData = $xeTable as unknown as TableReactData
|
|
89
87
|
const tableInternalData = $xeTable as unknown as TableInternalData
|
|
@@ -313,7 +311,7 @@ function renderTdColumn (
|
|
|
313
311
|
} else {
|
|
314
312
|
// 渲染单元格
|
|
315
313
|
tdVNs.push(
|
|
316
|
-
...renderLine(h,
|
|
314
|
+
...renderLine(h, $xeTable, rowid, cellParams, cellHeight),
|
|
317
315
|
h('div', {
|
|
318
316
|
key: 'tc',
|
|
319
317
|
class: ['vxe-cell', {
|
|
@@ -448,10 +446,11 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
|
|
|
448
446
|
const tableProps = $xeTable
|
|
449
447
|
const tableReactData = $xeTable as unknown as TableReactData
|
|
450
448
|
const tableInternalData = $xeTable as unknown as TableInternalData
|
|
449
|
+
const $xeGrid = $xeTable.$xeGrid
|
|
451
450
|
|
|
452
451
|
const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, treeConfig } = tableProps
|
|
453
|
-
const { hasFixedColumn, treeExpandedFlag, isColLoading, scrollXLoad, scrollYLoad, isAllOverflow, rowExpandedFlag, expandColumn, selectRadioRow, pendingRowFlag, isDragColMove, rowExpandHeightFlag } = tableReactData
|
|
454
|
-
const { fullAllDataRowIdData, treeExpandedMaps, pendingRowMaps, rowExpandedMaps } = tableInternalData
|
|
452
|
+
const { hasFixedColumn, treeExpandedFlag, isColLoading, scrollXLoad, scrollYLoad, isAllOverflow, rowExpandedFlag, expandColumn, selectRadioRow, pendingRowFlag, isDragColMove, rowExpandHeightFlag, isRowGroupStatus } = tableReactData
|
|
453
|
+
const { fullAllDataRowIdData, fullColumnIdData, treeExpandedMaps, pendingRowMaps, rowExpandedMaps } = tableInternalData
|
|
455
454
|
const checkboxOpts = $xeTable.computeCheckboxOpts
|
|
456
455
|
const radioOpts = $xeTable.computeRadioOpts
|
|
457
456
|
const treeOpts = $xeTable.computeTreeOpts
|
|
@@ -463,6 +462,7 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
|
|
|
463
462
|
const childrenField = treeOpts.children || treeOpts.childrenField
|
|
464
463
|
const rows: any[] = []
|
|
465
464
|
const { handleGetRowId } = createHandleGetRowId($xeTable)
|
|
465
|
+
const isDeepRow = treeConfig || isRowGroupStatus
|
|
466
466
|
tableData.forEach((row, $rowIndex) => {
|
|
467
467
|
const trOn: Record<string, any> = {}
|
|
468
468
|
const rowid = handleGetRowId(row)
|
|
@@ -471,6 +471,7 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
|
|
|
471
471
|
let rowLevel = 0
|
|
472
472
|
let seq: string | number = -1
|
|
473
473
|
let _rowIndex = -1
|
|
474
|
+
const hasRowGroupAggregate = isRowGroupStatus && row.isAggregate
|
|
474
475
|
// 当前行事件
|
|
475
476
|
if (rowOpts.isHover || highlightHoverRow) {
|
|
476
477
|
trOn.mouseenter = (evnt: MouseEvent) => {
|
|
@@ -488,7 +489,7 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
|
|
|
488
489
|
}
|
|
489
490
|
if (rowRest) {
|
|
490
491
|
rowLevel = rowRest.level
|
|
491
|
-
if (treeConfig && transform && seqMode === 'increasing') {
|
|
492
|
+
if (hasRowGroupAggregate || (treeConfig && transform && seqMode === 'increasing')) {
|
|
492
493
|
seq = rowRest._index + 1
|
|
493
494
|
} else {
|
|
494
495
|
seq = rowRest.seq
|
|
@@ -512,14 +513,14 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
|
|
|
512
513
|
isExpandTree = !!treeExpandedFlag && rowChildren && rowChildren.length > 0 && !!treeExpandedMaps[rowid]
|
|
513
514
|
}
|
|
514
515
|
// 拖拽行事件
|
|
515
|
-
if (rowOpts.drag && (!treeConfig || transform)) {
|
|
516
|
+
if (rowOpts.drag && !isRowGroupStatus && (!treeConfig || transform)) {
|
|
516
517
|
trOn.dragstart = $xeTable.handleRowDragDragstartEvent
|
|
517
518
|
trOn.dragend = $xeTable.handleRowDragDragendEvent
|
|
518
519
|
trOn.dragover = $xeTable.handleRowDragDragoverEvent
|
|
519
520
|
}
|
|
520
521
|
const trClass = [
|
|
521
522
|
'vxe-body--row',
|
|
522
|
-
|
|
523
|
+
isDeepRow ? `row--level-${rowLevel}` : '',
|
|
523
524
|
{
|
|
524
525
|
'row--stripe': stripe && (_rowIndex + 1) % 2 === 0,
|
|
525
526
|
'is--new': isNewRow,
|
|
@@ -528,12 +529,13 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
|
|
|
528
529
|
'row--new': isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
|
|
529
530
|
'row--radio': radioOpts.highlight && selectRadioRow === row,
|
|
530
531
|
'row--checked': checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
|
|
531
|
-
'row--pending': !!pendingRowFlag && !!pendingRowMaps[rowid]
|
|
532
|
+
'row--pending': !!pendingRowFlag && !!pendingRowMaps[rowid],
|
|
533
|
+
'row--group': hasRowGroupAggregate
|
|
532
534
|
},
|
|
533
535
|
rowClassName ? (XEUtils.isFunction(rowClassName) ? rowClassName(params) : rowClassName) : ''
|
|
534
536
|
]
|
|
535
|
-
const tdVNs = tableColumn.map((column
|
|
536
|
-
return renderTdColumn(h,
|
|
537
|
+
const tdVNs = tableColumn.map((column, $columnIndex) => {
|
|
538
|
+
return renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData)
|
|
537
539
|
})
|
|
538
540
|
rows.push(
|
|
539
541
|
!isColLoading && (columnOpts.drag && columnDragOpts.animation)
|
|
@@ -547,7 +549,7 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
|
|
|
547
549
|
rowid
|
|
548
550
|
},
|
|
549
551
|
style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) as VxeComponentStyleType : undefined,
|
|
550
|
-
key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || treeConfig ? rowid : $rowIndex,
|
|
552
|
+
key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex,
|
|
551
553
|
nativeOn: trOn
|
|
552
554
|
}, tdVNs)
|
|
553
555
|
: h('tr', {
|
|
@@ -556,7 +558,7 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
|
|
|
556
558
|
rowid
|
|
557
559
|
},
|
|
558
560
|
style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) as VxeComponentStyleType : undefined,
|
|
559
|
-
key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || treeConfig ? rowid : $rowIndex,
|
|
561
|
+
key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex,
|
|
560
562
|
on: trOn
|
|
561
563
|
}, tdVNs)
|
|
562
564
|
)
|
|
@@ -592,9 +594,40 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
|
|
|
592
594
|
if (treeConfig) {
|
|
593
595
|
cellStyle.paddingLeft = `${(rowLevel * treeOpts.indent) + 30}px`
|
|
594
596
|
}
|
|
595
|
-
const { showOverflow } = expandColumn
|
|
597
|
+
const { showOverflow } = expandColumn || {}
|
|
598
|
+
const colid = expandColumn.id
|
|
599
|
+
const colRest = fullColumnIdData[colid] || {}
|
|
596
600
|
const hasEllipsis = (XEUtils.isUndefined(showOverflow) || XEUtils.isNull(showOverflow)) ? isAllOverflow : showOverflow
|
|
597
|
-
|
|
601
|
+
let columnIndex = -1
|
|
602
|
+
let $columnIndex = -1
|
|
603
|
+
let _columnIndex = -1
|
|
604
|
+
if (colRest) {
|
|
605
|
+
columnIndex = colRest.index
|
|
606
|
+
$columnIndex = colRest.$index
|
|
607
|
+
_columnIndex = colRest._index
|
|
608
|
+
}
|
|
609
|
+
const expandParams: VxeTableDefines.CellRenderDataParams = {
|
|
610
|
+
$grid: $xeGrid,
|
|
611
|
+
$table: $xeTable,
|
|
612
|
+
seq,
|
|
613
|
+
column: expandColumn as VxeTableDefines.ColumnInfo,
|
|
614
|
+
columnIndex,
|
|
615
|
+
$columnIndex,
|
|
616
|
+
_columnIndex,
|
|
617
|
+
fixed: fixedType,
|
|
618
|
+
type: renderType,
|
|
619
|
+
level: rowLevel,
|
|
620
|
+
row,
|
|
621
|
+
rowid,
|
|
622
|
+
rowIndex,
|
|
623
|
+
$rowIndex,
|
|
624
|
+
_rowIndex,
|
|
625
|
+
isHidden: false,
|
|
626
|
+
isEdit: false,
|
|
627
|
+
visibleData: [],
|
|
628
|
+
data: [],
|
|
629
|
+
items: []
|
|
630
|
+
}
|
|
598
631
|
rows.push(
|
|
599
632
|
h('tr', {
|
|
600
633
|
class: ['vxe-body--expanded-row', {
|
|
@@ -92,7 +92,7 @@ function renderCellBaseVNs (h: CreateElement, params: VxeTableDefines.CellRender
|
|
|
92
92
|
const treeOpts = $table.computeTreeOpts
|
|
93
93
|
const { showIcon, isPeerDrag, isCrossDrag, visibleMethod } = rowDragOpts
|
|
94
94
|
const rVisibleMethod = visibleMethod || (dragConfig ? dragConfig.rowVisibleMethod : null)
|
|
95
|
-
const vns:
|
|
95
|
+
const vns: VxeComponentSlotType[] = []
|
|
96
96
|
if (dragSort && rowOpts.drag && ((showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params)))) {
|
|
97
97
|
if (treeConfig) {
|
|
98
98
|
if (treeOpts.transform && (isPeerDrag || isCrossDrag || !level)) {
|
|
@@ -106,7 +106,7 @@ function renderCellBaseVNs (h: CreateElement, params: VxeTableDefines.CellRender
|
|
|
106
106
|
)
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
return vns
|
|
109
|
+
return vns.concat(XEUtils.isArray(content) ? content : [content])
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
function renderHeaderCellDragIcon (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
@@ -259,25 +259,26 @@ function renderCellHandle (h: CreateElement, params: VxeTableDefines.CellRenderB
|
|
|
259
259
|
const { column, $table } = params
|
|
260
260
|
const tableProps = $table
|
|
261
261
|
const { editConfig } = tableProps
|
|
262
|
-
const { type, treeNode, editRender } = column
|
|
262
|
+
const { type, treeNode, rowGroupNode, editRender } = column
|
|
263
263
|
const checkboxOpts = $table.computeCheckboxOpts
|
|
264
264
|
const editOpts = $table.computeEditOpts
|
|
265
|
+
const isDeepCell = treeNode || rowGroupNode
|
|
265
266
|
switch (type) {
|
|
266
267
|
case 'seq':
|
|
267
|
-
return
|
|
268
|
+
return isDeepCell ? Cell.renderDeepIndexCell(h, params) : Cell.renderSeqCell(h, params)
|
|
268
269
|
case 'radio':
|
|
269
|
-
return
|
|
270
|
+
return isDeepCell ? Cell.renderDeepRadioCell(h, params) : Cell.renderRadioCell(h, params)
|
|
270
271
|
case 'checkbox':
|
|
271
|
-
return checkboxOpts.checkField ? (
|
|
272
|
+
return checkboxOpts.checkField ? (isDeepCell ? Cell.renderDeepSelectionCellByProp(h, params) : Cell.renderCheckboxCellByProp(h, params)) : (isDeepCell ? Cell.renderDeepSelectionCell(h, params) : Cell.renderCheckboxCell(h, params))
|
|
272
273
|
case 'expand':
|
|
273
274
|
return Cell.renderExpandCell(h, params)
|
|
274
275
|
case 'html':
|
|
275
|
-
return
|
|
276
|
+
return isDeepCell ? Cell.renderDeepHTMLCell(h, params) : Cell.renderHTMLCell(h, params)
|
|
276
277
|
}
|
|
277
278
|
if (isEnableConf(editConfig) && editRender) {
|
|
278
|
-
return editOpts.mode === 'cell' ? (
|
|
279
|
+
return editOpts.mode === 'cell' ? (isDeepCell ? Cell.renderDeepCellEdit(h, params) : Cell.renderCellEdit(h, params)) : (isDeepCell ? Cell.renderDeepRowEdit(h, params) : Cell.renderRowEdit(h, params))
|
|
279
280
|
}
|
|
280
|
-
return
|
|
281
|
+
return isDeepCell ? Cell.renderDeepCell(h, params) : Cell.renderDefaultCell(h, params)
|
|
281
282
|
}
|
|
282
283
|
|
|
283
284
|
function renderHeaderHandle (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & {
|
|
@@ -359,7 +360,10 @@ export const Cell = {
|
|
|
359
360
|
},
|
|
360
361
|
renderDefaultCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
361
362
|
const { $table, row, column } = params
|
|
362
|
-
const
|
|
363
|
+
const tableReactData = $table as unknown as TableReactData
|
|
364
|
+
const tableInternalData = $table as unknown as TableInternalData
|
|
365
|
+
const { isRowGroupStatus } = tableReactData
|
|
366
|
+
const { slots, editRender, cellRender, rowGroupNode } = column
|
|
363
367
|
const renderOpts = editRender || cellRender
|
|
364
368
|
if (slots && slots.default) {
|
|
365
369
|
return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h))
|
|
@@ -373,7 +377,34 @@ export const Cell = {
|
|
|
373
377
|
return renderCellBaseVNs(h, params, getSlotVNs(renderFn.call($table, h, renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params))))
|
|
374
378
|
}
|
|
375
379
|
}
|
|
376
|
-
|
|
380
|
+
let cellValue: string | number | null = ''
|
|
381
|
+
if (isRowGroupStatus && rowGroupNode && row.isAggregate) {
|
|
382
|
+
const { fullColumnFieldData } = tableInternalData
|
|
383
|
+
const rowGroupOpts = $table.computeRowGroupOpts
|
|
384
|
+
const { showTotal, totalMethod, contentMethod, mapChildrenField } = rowGroupOpts
|
|
385
|
+
const groupField = row.groupField
|
|
386
|
+
cellValue = row.groupContent
|
|
387
|
+
const childList = mapChildrenField ? (row[mapChildrenField] || []) : []
|
|
388
|
+
const totalValue = childList.length
|
|
389
|
+
const colRest = fullColumnFieldData[groupField] || {}
|
|
390
|
+
const params = {
|
|
391
|
+
$table,
|
|
392
|
+
groupField,
|
|
393
|
+
groupColumn: (colRest ? colRest.column : null) as VxeTableDefines.ColumnInfo,
|
|
394
|
+
column,
|
|
395
|
+
groupValue: cellValue,
|
|
396
|
+
children: childList,
|
|
397
|
+
totalValue: totalValue
|
|
398
|
+
}
|
|
399
|
+
if (contentMethod) {
|
|
400
|
+
cellValue = `${contentMethod(params)}`
|
|
401
|
+
}
|
|
402
|
+
if (showTotal) {
|
|
403
|
+
cellValue = getI18n('vxe.table.rowGroupContentTotal', [cellValue, totalMethod ? totalMethod(params) : totalValue, totalValue])
|
|
404
|
+
}
|
|
405
|
+
} else if (!(isRowGroupStatus && row.isAggregate)) {
|
|
406
|
+
cellValue = $table.getCellLabel(row, column)
|
|
407
|
+
}
|
|
377
408
|
const cellPlaceholder = editRender ? editRender.placeholder : ''
|
|
378
409
|
return renderCellBaseVNs(h, params, [
|
|
379
410
|
h('span', {
|
|
@@ -388,17 +419,58 @@ export const Cell = {
|
|
|
388
419
|
])
|
|
389
420
|
])
|
|
390
421
|
},
|
|
391
|
-
|
|
392
|
-
return Cell.
|
|
422
|
+
renderDeepCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
423
|
+
return Cell.renderDeepNodeBtn(h, params, Cell.renderDefaultCell.call(this, h, params))
|
|
393
424
|
},
|
|
394
425
|
renderDefaultFooter (h: CreateElement, params: VxeTableDefines.CellRenderFooterParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
395
426
|
return getFooterContent(h, params)
|
|
396
427
|
},
|
|
397
428
|
|
|
398
429
|
/**
|
|
399
|
-
*
|
|
430
|
+
* 行分组
|
|
431
|
+
*/
|
|
432
|
+
renderRowGroupBtn (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }, cellVNodes: VxeComponentSlotType[]) {
|
|
433
|
+
const { $table } = params
|
|
434
|
+
const tableReactData = $table as unknown as TableReactData
|
|
435
|
+
const tableInternalData = $table as unknown as TableInternalData
|
|
436
|
+
const { row, level } = params
|
|
437
|
+
const { rowGroupExpandedFlag } = tableReactData
|
|
438
|
+
const { rowGroupExpandedMaps } = tableInternalData
|
|
439
|
+
const rowGroupOpts = $table.computeRowGroupOpts
|
|
440
|
+
const { padding, indent } = rowGroupOpts
|
|
441
|
+
const rowid = getRowid($table, row)
|
|
442
|
+
const isExpand = !!rowGroupExpandedFlag && !!rowGroupExpandedMaps[rowid]
|
|
443
|
+
return h('div', {
|
|
444
|
+
class: ['vxe-row-group--tree-node', {
|
|
445
|
+
'is--expanded': isExpand
|
|
446
|
+
}],
|
|
447
|
+
style: padding && indent
|
|
448
|
+
? {
|
|
449
|
+
paddingLeft: `${level * indent}px`
|
|
450
|
+
}
|
|
451
|
+
: undefined
|
|
452
|
+
}, [
|
|
453
|
+
h('span', {
|
|
454
|
+
class: 'vxe-row-group--node-btn',
|
|
455
|
+
on: {
|
|
456
|
+
click (evnt: MouseEvent) {
|
|
457
|
+
$table.triggerRowGroupExpandEvent(evnt, params)
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}, [
|
|
461
|
+
h('i', {
|
|
462
|
+
class: isExpand ? getIcon().TABLE_ROW_GROUP_OPEN : getIcon().TABLE_ROW_GROUP_CLOSE
|
|
463
|
+
})
|
|
464
|
+
]),
|
|
465
|
+
h('div', {
|
|
466
|
+
class: 'vxe-row-group-cell'
|
|
467
|
+
}, cellVNodes)
|
|
468
|
+
])
|
|
469
|
+
},
|
|
470
|
+
/**
|
|
471
|
+
* 树
|
|
400
472
|
*/
|
|
401
|
-
|
|
473
|
+
renderTreeNodeBtn (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }, cellVNodes: VxeComponentSlotType[]) {
|
|
402
474
|
const { $table, isHidden } = params
|
|
403
475
|
const tableReactData = $table as unknown as TableReactData
|
|
404
476
|
const tableInternalData = $table as unknown as TableInternalData
|
|
@@ -407,7 +479,7 @@ export const Cell = {
|
|
|
407
479
|
const treeOpts = $table.computeTreeOpts
|
|
408
480
|
const { row, column, level } = params
|
|
409
481
|
const { slots } = column
|
|
410
|
-
const { indent, lazy, trigger, iconLoaded, showIcon, iconOpen, iconClose } = treeOpts
|
|
482
|
+
const { padding, indent, lazy, trigger, iconLoaded, showIcon, iconOpen, iconClose } = treeOpts
|
|
411
483
|
const childrenField = treeOpts.children || treeOpts.childrenField
|
|
412
484
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField
|
|
413
485
|
const rowChilds = row[childrenField]
|
|
@@ -441,18 +513,20 @@ export const Cell = {
|
|
|
441
513
|
class: ['vxe-cell--tree-node', {
|
|
442
514
|
'is--active': isActive
|
|
443
515
|
}],
|
|
444
|
-
style:
|
|
445
|
-
|
|
446
|
-
|
|
516
|
+
style: padding && indent
|
|
517
|
+
? {
|
|
518
|
+
paddingLeft: `${level * indent}px`
|
|
519
|
+
}
|
|
520
|
+
: undefined
|
|
447
521
|
}, [
|
|
448
522
|
showIcon && (lazy ? (isLazyLoaded ? hasChild : (hasChild || hasLazyChilds)) : hasChild)
|
|
449
523
|
? [
|
|
450
524
|
h('div', {
|
|
451
|
-
class: 'vxe-tree
|
|
525
|
+
class: 'vxe-cell--tree-btn',
|
|
452
526
|
on: ons
|
|
453
527
|
}, [
|
|
454
528
|
h('i', {
|
|
455
|
-
class:
|
|
529
|
+
class: isLazyLoading ? (iconLoaded || getIcon().TABLE_TREE_LOADED) : (isActive ? (iconOpen || getIcon().TABLE_TREE_OPEN) : (iconClose || getIcon().TABLE_TREE_CLOSE))
|
|
456
530
|
})
|
|
457
531
|
])
|
|
458
532
|
]
|
|
@@ -463,6 +537,18 @@ export const Cell = {
|
|
|
463
537
|
])
|
|
464
538
|
]
|
|
465
539
|
},
|
|
540
|
+
/**
|
|
541
|
+
* 层级节点。
|
|
542
|
+
* 行分组、树结构
|
|
543
|
+
*/
|
|
544
|
+
renderDeepNodeBtn (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }, cellVNodes: VxeComponentSlotType[]) {
|
|
545
|
+
const { row, column } = params
|
|
546
|
+
const { rowGroupNode } = column
|
|
547
|
+
if (rowGroupNode && row.isAggregate) {
|
|
548
|
+
return [Cell.renderRowGroupBtn(h, params, cellVNodes)]
|
|
549
|
+
}
|
|
550
|
+
return [Cell.renderTreeNodeBtn(h, params, cellVNodes)]
|
|
551
|
+
},
|
|
466
552
|
|
|
467
553
|
/**
|
|
468
554
|
* 序号
|
|
@@ -487,8 +573,8 @@ export const Cell = {
|
|
|
487
573
|
h('span', `${formatText(seqMethod ? seqMethod(params) : treeConfig ? seq : (seqOpts.startIndex || 0) + (seq as number), 1)}`)
|
|
488
574
|
])
|
|
489
575
|
},
|
|
490
|
-
|
|
491
|
-
return Cell.
|
|
576
|
+
renderDeepIndexCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
577
|
+
return Cell.renderDeepNodeBtn(h, params, Cell.renderSeqCell(h, params))
|
|
492
578
|
},
|
|
493
579
|
|
|
494
580
|
/**
|
|
@@ -520,7 +606,7 @@ export const Cell = {
|
|
|
520
606
|
const defaultSlot = slots ? slots.default : null
|
|
521
607
|
const radioSlot = slots ? slots.radio : null
|
|
522
608
|
const isChecked = row === selectRadioRow
|
|
523
|
-
const isVisible = !visibleMethod || visibleMethod({ row })
|
|
609
|
+
const isVisible = !visibleMethod || visibleMethod({ $table, row })
|
|
524
610
|
let isDisabled = !!checkMethod
|
|
525
611
|
let on: any
|
|
526
612
|
if (!isHidden) {
|
|
@@ -532,7 +618,7 @@ export const Cell = {
|
|
|
532
618
|
}
|
|
533
619
|
}
|
|
534
620
|
if (checkMethod) {
|
|
535
|
-
isDisabled = !checkMethod({ row })
|
|
621
|
+
isDisabled = !checkMethod({ $table, row })
|
|
536
622
|
}
|
|
537
623
|
}
|
|
538
624
|
const radioParams = { ...params, checked: isChecked, disabled: isDisabled, visible: isVisible }
|
|
@@ -564,8 +650,8 @@ export const Cell = {
|
|
|
564
650
|
}, radioVNs)
|
|
565
651
|
])
|
|
566
652
|
},
|
|
567
|
-
|
|
568
|
-
return Cell.
|
|
653
|
+
renderDeepRadioCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
654
|
+
return Cell.renderDeepNodeBtn(h, params, Cell.renderRadioCell(h, params))
|
|
569
655
|
},
|
|
570
656
|
|
|
571
657
|
/**
|
|
@@ -633,7 +719,7 @@ export const Cell = {
|
|
|
633
719
|
const tableReactData = $table as unknown as TableReactData
|
|
634
720
|
const tableInternalData = $table as unknown as TableInternalData
|
|
635
721
|
const { treeConfig } = tableProps
|
|
636
|
-
const { updateCheckboxFlag } = tableReactData
|
|
722
|
+
const { updateCheckboxFlag, isRowGroupStatus } = tableReactData
|
|
637
723
|
const { selectCheckboxMaps, treeIndeterminateRowMaps } = tableInternalData
|
|
638
724
|
const checkboxOpts = $table.computeCheckboxOpts
|
|
639
725
|
const { labelField, checkMethod, visibleMethod } = checkboxOpts
|
|
@@ -642,7 +728,7 @@ export const Cell = {
|
|
|
642
728
|
const checkboxSlot = slots ? slots.checkbox : null
|
|
643
729
|
let indeterminate = false
|
|
644
730
|
let isChecked = false
|
|
645
|
-
const isVisible = !visibleMethod || visibleMethod({ row })
|
|
731
|
+
const isVisible = !visibleMethod || visibleMethod({ $table, row })
|
|
646
732
|
let isDisabled = !!checkMethod
|
|
647
733
|
const ons: Record<string, any> = {}
|
|
648
734
|
if (!isHidden) {
|
|
@@ -654,9 +740,9 @@ export const Cell = {
|
|
|
654
740
|
}
|
|
655
741
|
}
|
|
656
742
|
if (checkMethod) {
|
|
657
|
-
isDisabled = !checkMethod({ row })
|
|
743
|
+
isDisabled = !checkMethod({ $table, row })
|
|
658
744
|
}
|
|
659
|
-
if (treeConfig) {
|
|
745
|
+
if (treeConfig || isRowGroupStatus) {
|
|
660
746
|
indeterminate = !!treeIndeterminateRowMaps[rowid]
|
|
661
747
|
}
|
|
662
748
|
}
|
|
@@ -691,8 +777,8 @@ export const Cell = {
|
|
|
691
777
|
}, checkVNs)
|
|
692
778
|
])
|
|
693
779
|
},
|
|
694
|
-
|
|
695
|
-
return Cell.
|
|
780
|
+
renderDeepSelectionCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
781
|
+
return Cell.renderDeepNodeBtn(h, params, Cell.renderCheckboxCell(h, params))
|
|
696
782
|
},
|
|
697
783
|
renderCheckboxCellByProp (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
698
784
|
const { $table, row, column, isHidden } = params
|
|
@@ -700,7 +786,7 @@ export const Cell = {
|
|
|
700
786
|
const tableReactData = $table as unknown as TableReactData
|
|
701
787
|
const tableInternalData = $table as unknown as TableInternalData
|
|
702
788
|
const { treeConfig } = tableProps
|
|
703
|
-
const { updateCheckboxFlag } = tableReactData
|
|
789
|
+
const { updateCheckboxFlag, isRowGroupStatus } = tableReactData
|
|
704
790
|
const { treeIndeterminateRowMaps } = tableInternalData
|
|
705
791
|
const checkboxOpts = $table.computeCheckboxOpts
|
|
706
792
|
const { labelField, checkField, checkMethod, visibleMethod } = checkboxOpts
|
|
@@ -710,7 +796,7 @@ export const Cell = {
|
|
|
710
796
|
const checkboxSlot = slots ? slots.checkbox : null
|
|
711
797
|
let isIndeterminate = false
|
|
712
798
|
let isChecked = false
|
|
713
|
-
const isVisible = !visibleMethod || visibleMethod({ row })
|
|
799
|
+
const isVisible = !visibleMethod || visibleMethod({ $table, row })
|
|
714
800
|
let isDisabled = !!checkMethod
|
|
715
801
|
const ons: Record<string, any> = {}
|
|
716
802
|
if (!isHidden) {
|
|
@@ -722,9 +808,9 @@ export const Cell = {
|
|
|
722
808
|
}
|
|
723
809
|
}
|
|
724
810
|
if (checkMethod) {
|
|
725
|
-
isDisabled = !checkMethod({ row })
|
|
811
|
+
isDisabled = !checkMethod({ $table, row })
|
|
726
812
|
}
|
|
727
|
-
if (treeConfig) {
|
|
813
|
+
if (treeConfig || isRowGroupStatus) {
|
|
728
814
|
isIndeterminate = !!treeIndeterminateRowMaps[rowid]
|
|
729
815
|
}
|
|
730
816
|
}
|
|
@@ -759,8 +845,8 @@ export const Cell = {
|
|
|
759
845
|
}, checkVNs)
|
|
760
846
|
])
|
|
761
847
|
},
|
|
762
|
-
|
|
763
|
-
return Cell.
|
|
848
|
+
renderDeepSelectionCellByProp (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
849
|
+
return Cell.renderDeepNodeBtn(h, params, Cell.renderCheckboxCellByProp(h, params))
|
|
764
850
|
},
|
|
765
851
|
|
|
766
852
|
/**
|
|
@@ -768,7 +854,9 @@ export const Cell = {
|
|
|
768
854
|
*/
|
|
769
855
|
renderExpandCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
770
856
|
const { $table, isHidden, row, column } = params
|
|
857
|
+
const tableReactData = $table as unknown as TableReactData
|
|
771
858
|
const tableInternalData = $table as unknown as TableInternalData
|
|
859
|
+
const { isRowGroupStatus } = tableReactData
|
|
772
860
|
const { rowExpandedMaps, rowExpandLazyLoadedMaps } = tableInternalData
|
|
773
861
|
const expandOpts = $table.computeExpandOpts
|
|
774
862
|
const { lazy, labelField, iconLoaded, showIcon, iconOpen, iconClose, visibleMethod } = expandOpts
|
|
@@ -777,6 +865,9 @@ export const Cell = {
|
|
|
777
865
|
const iconSlot = slots ? slots.icon : null
|
|
778
866
|
let isActive = false
|
|
779
867
|
let isLazyLoading = false
|
|
868
|
+
if (isRowGroupStatus && row.isAggregate) {
|
|
869
|
+
return renderCellBaseVNs(h, params, [])
|
|
870
|
+
}
|
|
780
871
|
if (iconSlot) {
|
|
781
872
|
return renderCellBaseVNs(h, params, $table.callSlot(iconSlot, params, h))
|
|
782
873
|
}
|
|
@@ -848,8 +939,8 @@ export const Cell = {
|
|
|
848
939
|
})
|
|
849
940
|
])
|
|
850
941
|
},
|
|
851
|
-
|
|
852
|
-
return Cell.
|
|
942
|
+
renderDeepHTMLCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
943
|
+
return Cell.renderDeepNodeBtn(h, params, Cell.renderHTMLCell(h, params))
|
|
853
944
|
},
|
|
854
945
|
|
|
855
946
|
/**
|
|
@@ -1004,8 +1095,8 @@ export const Cell = {
|
|
|
1004
1095
|
const { editRender } = column
|
|
1005
1096
|
return Cell.runRenderer(h, params, this, isEnableConf(editRender) && actived && actived.row === params.row)
|
|
1006
1097
|
},
|
|
1007
|
-
|
|
1008
|
-
return Cell.
|
|
1098
|
+
renderDeepRowEdit (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
1099
|
+
return Cell.renderDeepNodeBtn(h, params, Cell.renderRowEdit(h, params))
|
|
1009
1100
|
},
|
|
1010
1101
|
// 单元格编辑模式
|
|
1011
1102
|
renderCellEdit (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
@@ -1016,8 +1107,8 @@ export const Cell = {
|
|
|
1016
1107
|
const { editRender } = column
|
|
1017
1108
|
return Cell.runRenderer(h, params, this, isEnableConf(editRender) && actived && actived.row === params.row && actived.column === params.column)
|
|
1018
1109
|
},
|
|
1019
|
-
|
|
1020
|
-
return Cell.
|
|
1110
|
+
renderDeepCellEdit (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
1111
|
+
return Cell.renderDeepNodeBtn(h, params, Cell.renderCellEdit(h, params))
|
|
1021
1112
|
},
|
|
1022
1113
|
runRenderer (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }, _vm: any, isEdit: boolean) {
|
|
1023
1114
|
const { $table, column } = params
|
|
@@ -99,6 +99,8 @@ export const columnProps = {
|
|
|
99
99
|
filterRecoverMethod: Function,
|
|
100
100
|
// 筛选模板配置项
|
|
101
101
|
filterRender: Object,
|
|
102
|
+
// 设置为分组节点
|
|
103
|
+
rowGroupNode: Boolean as PropType<VxeColumnPropTypes.RowGroupNode>,
|
|
102
104
|
// 设置为树节点
|
|
103
105
|
treeNode: Boolean as PropType<VxeColumnPropTypes.TreeNode>,
|
|
104
106
|
// 设置为拖拽排序
|
|
@@ -89,6 +89,7 @@ export class ColumnInfo {
|
|
|
89
89
|
filterResetMethod: _vm.filterResetMethod,
|
|
90
90
|
filterRecoverMethod: _vm.filterRecoverMethod,
|
|
91
91
|
filterRender: _vm.filterRender,
|
|
92
|
+
rowGroupNode: _vm.rowGroupNode,
|
|
92
93
|
treeNode: _vm.treeNode,
|
|
93
94
|
dragSort: _vm.dragSort,
|
|
94
95
|
rowResize: _vm.rowResize,
|