vxe-table 4.13.33 → 4.13.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/es/grid/src/grid.js +1 -1
  2. package/es/index.css +1 -1
  3. package/es/index.min.css +1 -1
  4. package/es/style.css +1 -1
  5. package/es/style.min.css +1 -1
  6. package/es/table/src/body.js +20 -3
  7. package/es/table/src/cell.js +55 -39
  8. package/es/table/src/column.js +2 -0
  9. package/es/table/src/columnInfo.js +2 -0
  10. package/es/table/src/props.js +3 -1
  11. package/es/table/src/table.js +130 -74
  12. package/es/table/src/util.js +7 -4
  13. package/es/table/style.css +9 -3
  14. package/es/table/style.min.css +1 -1
  15. package/es/ui/index.js +4 -4
  16. package/es/ui/src/log.js +1 -1
  17. package/es/vxe-table/style.css +9 -3
  18. package/es/vxe-table/style.min.css +1 -1
  19. package/lib/grid/src/grid.js +1 -1
  20. package/lib/grid/src/grid.min.js +1 -1
  21. package/lib/index.css +1 -1
  22. package/lib/index.min.css +1 -1
  23. package/lib/index.umd.js +117 -76
  24. package/lib/index.umd.min.js +1 -1
  25. package/lib/style.css +1 -1
  26. package/lib/style.min.css +1 -1
  27. package/lib/table/src/body.js +19 -2
  28. package/lib/table/src/body.min.js +1 -1
  29. package/lib/table/src/cell.js +47 -32
  30. package/lib/table/src/cell.min.js +1 -1
  31. package/lib/table/src/column.js +2 -0
  32. package/lib/table/src/column.min.js +1 -1
  33. package/lib/table/src/columnInfo.js +2 -0
  34. package/lib/table/src/columnInfo.min.js +1 -1
  35. package/lib/table/src/props.js +3 -1
  36. package/lib/table/src/props.min.js +1 -1
  37. package/lib/table/src/table.js +31 -31
  38. package/lib/table/src/table.min.js +1 -1
  39. package/lib/table/src/util.js +10 -7
  40. package/lib/table/src/util.min.js +1 -1
  41. package/lib/table/style/style.css +9 -3
  42. package/lib/table/style/style.min.css +1 -1
  43. package/lib/ui/index.js +4 -4
  44. package/lib/ui/index.min.js +1 -1
  45. package/lib/ui/src/log.js +1 -1
  46. package/lib/ui/src/log.min.js +1 -1
  47. package/lib/vxe-table/style/style.css +9 -3
  48. package/lib/vxe-table/style/style.min.css +1 -1
  49. package/package.json +1 -1
  50. package/packages/grid/src/grid.ts +1 -1
  51. package/packages/table/src/body.ts +20 -3
  52. package/packages/table/src/cell.ts +55 -39
  53. package/packages/table/src/column.ts +2 -0
  54. package/packages/table/src/columnInfo.ts +3 -0
  55. package/packages/table/src/props.ts +3 -1
  56. package/packages/table/src/table.ts +132 -73
  57. package/packages/table/src/util.ts +7 -3
  58. package/packages/ui/index.ts +1 -1
  59. package/styles/components/table.scss +13 -9
  60. package/styles/theme/base.scss +0 -2
  61. package/styles/theme/dark.scss +4 -1
  62. package/styles/theme/light.scss +3 -0
  63. package/styles/variable.scss +4 -1
  64. /package/es/{iconfont.1749019395589.ttf → iconfont.1749202972772.ttf} +0 -0
  65. /package/es/{iconfont.1749019395589.woff → iconfont.1749202972772.woff} +0 -0
  66. /package/es/{iconfont.1749019395589.woff2 → iconfont.1749202972772.woff2} +0 -0
  67. /package/lib/{iconfont.1749019395589.ttf → iconfont.1749202972772.ttf} +0 -0
  68. /package/lib/{iconfont.1749019395589.woff → iconfont.1749202972772.woff} +0 -0
  69. /package/lib/{iconfont.1749019395589.woff2 → iconfont.1749202972772.woff2} +0 -0
@@ -17,7 +17,7 @@ const { getConfig, getI18n, commands, hooks, useFns, createEvent, globalEvents,
17
17
 
18
18
  const tableComponentPropKeys = Object.keys(tableComponentProps as any)
19
19
 
20
- const tableComponentMethodKeys: (keyof VxeTableMethods)[] = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'setRow', 'createData', 'createRow', 'revertData', 'clearData', 'isRemoveByRow', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getFullColumns', 'getData', 'getCheckboxRecords', 'getParentRow', 'getTreeRowChildren', 'getTreeParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'getFullData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'setRowHeightConf', 'getRowHeightConf', 'setRowHeight', 'getRowHeight', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'setCheckboxRowKey', 'isCheckedByCheckboxRow', 'isCheckedByCheckboxRowKey', 'isIndeterminateByCheckboxRow', 'isIndeterminateByCheckboxRowKey', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'isCheckedByRadioRowKey', 'setRadioRow', 'setRadioRowKey', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'hasPendingByRow', 'isPendingByRow', 'getPendingRecords', 'clearPendingRow', 'sort', 'setSort', 'clearSort', 'clearSortByEvent', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'clearFilterByEvent', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'scrollTo', 'scrollToRow', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'getCustomStoreData', 'setRowGroupExpand', 'setAllRowGroupExpand', 'clearRowGroupExpand', 'isRowGroupExpandByRow', 'isRowGroupRecord', 'setRowGroups', 'clearRowGroups', 'openTooltip', 'moveColumnTo', 'moveRowTo', 'getCellLabel', 'getCellElement', 'focus', 'blur', 'connect']
20
+ const tableComponentMethodKeys: (keyof VxeTableMethods)[] = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'setRow', 'createData', 'createRow', 'revertData', 'clearData', 'isRemoveByRow', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getFullColumns', 'getData', 'getCheckboxRecords', 'getParentRow', 'getTreeRowChildren', 'getTreeParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'getFullData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'setRowHeightConf', 'getRowHeightConf', 'setRowHeight', 'getRowHeight', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'setCheckboxRowKey', 'isCheckedByCheckboxRow', 'isCheckedByCheckboxRowKey', 'isIndeterminateByCheckboxRow', 'isIndeterminateByCheckboxRowKey', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'isCheckedByRadioRowKey', 'setRadioRow', 'setRadioRowKey', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'hasPendingByRow', 'isPendingByRow', 'getPendingRecords', 'clearPendingRow', 'sort', 'setSort', 'clearSort', 'clearSortByEvent', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'clearFilterByEvent', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'scrollTo', 'scrollToRow', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'getCustomStoreData', 'setRowGroupExpand', 'setAllRowGroupExpand', 'clearRowGroupExpand', 'isRowGroupExpandByRow', 'isRowGroupRecord', 'isAggregateRecord', 'isAggregateExpandByRow', 'setRowGroups', 'clearRowGroups', 'openTooltip', 'moveColumnTo', 'moveRowTo', 'getCellLabel', 'getCellElement', 'focus', 'blur', 'connect']
21
21
 
22
22
  const gridComponentEmits: VxeGridEmits = [
23
23
  ...tableComponentEmits,
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, TransitionGroup, h, ref, Ref, PropType, inject, nextTick, onMounted, onUnmounted } from 'vue'
2
2
  import XEUtils from 'xe-utils'
3
3
  import { VxeUI } from '../../ui'
4
- import { getOffsetSize, calcTreeLine, getRowid, createHandleGetRowId } from './util'
4
+ import { getOffsetSize, calcTreeLine, getRowid, createHandleGetRowId, getCellRestHeight } from './util'
5
5
  import { updateCellTitle, getPropClass } from '../../ui/src/dom'
6
6
  import { isEnableConf } from '../../ui/src/utils'
7
7
  import { getSlotVNs } from '../../ui/src/vn'
@@ -234,6 +234,7 @@ export default defineComponent({
234
234
  $xeTable.triggerCellDblclickEvent(evnt, cellParams)
235
235
  }
236
236
  let isMergeCell = false
237
+ let mergeRowspan = 1
237
238
  // 合并行或列
238
239
  if (mergeBodyFlag && mergeBodyList.length) {
239
240
  const spanRest = mergeBodyCellMaps[`${_rowIndex}:${_columnIndex}`]
@@ -244,6 +245,7 @@ export default defineComponent({
244
245
  }
245
246
  if (rowspan > 1) {
246
247
  isMergeCell = true
248
+ mergeRowspan = rowspan
247
249
  tdAttrs.rowspan = rowspan
248
250
  }
249
251
  if (colspan > 1) {
@@ -258,9 +260,12 @@ export default defineComponent({
258
260
  return null
259
261
  }
260
262
  if (rowspan > 1) {
263
+ isMergeCell = true
264
+ mergeRowspan = rowspan
261
265
  tdAttrs.rowspan = rowspan
262
266
  }
263
267
  if (colspan > 1) {
268
+ isMergeCell = true
264
269
  tdAttrs.colspan = colspan
265
270
  }
266
271
  }
@@ -276,7 +281,7 @@ export default defineComponent({
276
281
  }
277
282
 
278
283
  const isVNAutoHeight = scrollYLoad && !hasEllipsis
279
- const cellHeight = rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight
284
+ let cellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight)
280
285
 
281
286
  const isLastColumn = $columnIndex === columns.length - 1
282
287
  const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto')
@@ -292,6 +297,16 @@ export default defineComponent({
292
297
  }
293
298
  }
294
299
 
300
+ if (mergeRowspan > 1) {
301
+ const mEndRow = afterFullData[_rowIndex + mergeRowspan - 1]
302
+ if (mEndRow) {
303
+ const meRowRest = fullAllDataRowIdData[getRowid($xeTable, mEndRow)]
304
+ if (meRowRest) {
305
+ cellHeight += meRowRest.oTop - rowRest.oTop + getCellRestHeight(meRowRest, cellOpts, rowOpts, defaultRowHeight)
306
+ }
307
+ }
308
+ }
309
+
295
310
  const tcStyle: Record<string, string> = {}
296
311
  if (hasEllipsis && resizeWidthFlag) {
297
312
  let tsColspan = tdAttrs.colspan || 0
@@ -326,8 +341,10 @@ export default defineComponent({
326
341
  )
327
342
  } else {
328
343
  // 渲染单元格
344
+ if (treeConfig) {
345
+ tdVNs.push(...renderLine(rowid, cellParams, cellHeight))
346
+ }
329
347
  tdVNs.push(
330
- ...renderLine(rowid, cellParams, cellHeight),
331
348
  h('div', {
332
349
  key: 'tc',
333
350
  class: ['vxe-cell', {
@@ -288,12 +288,12 @@ function renderCellHandle (params: VxeTableDefines.CellRenderBodyParams & {
288
288
  const { isRowGroupStatus } = tableReactData
289
289
  const { editConfig } = tableProps
290
290
  const { type, treeNode, rowGroupNode, editRender } = column
291
- const { computeEditOpts, computeCheckboxOpts, computeRowGroupOpts } = $table.getComputeMaps()
292
- const rowGroupOpts = computeRowGroupOpts.value
293
- const { mode } = rowGroupOpts
291
+ const { computeEditOpts, computeCheckboxOpts, computeAggregateOpts } = $table.getComputeMaps()
292
+ const aggregateOpts = computeAggregateOpts.value
293
+ const { mode } = aggregateOpts
294
294
  const checkboxOpts = computeCheckboxOpts.value
295
295
  const editOpts = computeEditOpts.value
296
- const isDeepCell = treeNode || (isRowGroupStatus && row.isAggregate && (mode === 'column' ? column.field === row.groupField : rowGroupNode))
296
+ const isDeepCell = treeNode || (isRowGroupStatus && (mode === 'column' ? column.field === row.groupField : rowGroupNode))
297
297
  switch (type) {
298
298
  case 'seq':
299
299
  return isDeepCell ? Cell.renderDeepIndexCell(params) : Cell.renderSeqCell(params)
@@ -397,7 +397,7 @@ export const Cell = {
397
397
  const tableReactData = $table.reactData
398
398
  const tableInternalData = $table.internalData
399
399
  const { isRowGroupStatus } = tableReactData
400
- const { field, slots, editRender, cellRender, rowGroupNode } = column
400
+ const { field, slots, editRender, cellRender, rowGroupNode, aggFunc } = column
401
401
  const renderOpts = editRender || cellRender
402
402
  const defaultSlot = slots ? slots.default : null
403
403
  if (defaultSlot) {
@@ -415,39 +415,51 @@ export const Cell = {
415
415
  }
416
416
  }
417
417
  let cellValue: string | number | null = ''
418
- if (isRowGroupStatus && row.isAggregate) {
418
+ if (isRowGroupStatus && field && row.isAggregate) {
419
+ const aggRow: VxeTableDefines.AggregateRowInfo = row
419
420
  const { fullColumnFieldData } = tableInternalData
420
- const { computeRowGroupOpts } = $table.getComputeMaps()
421
- const rowGroupOpts = computeRowGroupOpts.value
422
- const { mode, showTotal, totalMethod, countFields, countMethod, contentMethod, mapChildrenField } = rowGroupOpts
423
- const groupField = row.groupField
424
- const groupContent = row.groupContent
425
- const childList = mapChildrenField ? (row[mapChildrenField] || []) : []
426
- const totalValue = row.childCount
421
+ const { computeAggregateOpts } = $table.getComputeMaps()
422
+ const aggregateOpts = computeAggregateOpts.value
423
+ const { mode, showTotal, totalMethod, countFields, contentMethod, mapChildrenField } = aggregateOpts
424
+ const aggMethod = aggregateOpts.aggregateMethod || aggregateOpts.countMethod
425
+ const groupField = aggRow.groupField
426
+ const groupContent = aggRow.groupContent
427
+ const childList = mapChildrenField ? (aggRow[mapChildrenField] || []) : []
428
+ const childCount = aggRow.childCount
427
429
  const colRest = fullColumnFieldData[groupField] || {}
428
- const params = {
430
+ const ctParams = {
429
431
  $table,
430
432
  groupField,
431
433
  groupColumn: (colRest ? colRest.column : null) as VxeTableDefines.ColumnInfo,
432
434
  column,
433
435
  groupValue: groupContent,
434
436
  children: childList,
435
- totalValue: totalValue
437
+ childCount,
438
+ aggValue: null as any,
439
+
440
+ /**
441
+ * 已废弃
442
+ * @deprecated
443
+ */
444
+ totalValue: childCount
436
445
  }
437
- if (mode === 'column' ? column.field === row.groupField : rowGroupNode) {
446
+ if (mode === 'column' ? field === aggRow.groupField : rowGroupNode) {
438
447
  cellValue = groupContent
439
448
  if (contentMethod) {
440
- cellValue = `${contentMethod(params)}`
449
+ cellValue = `${contentMethod(ctParams)}`
441
450
  }
442
451
  if (showTotal) {
443
- cellValue = getI18n('vxe.table.rowGroupContentTotal', [cellValue, totalMethod ? totalMethod(params) : totalValue, totalValue])
452
+ cellValue = getI18n('vxe.table.rowGroupContentTotal', [cellValue, totalMethod ? totalMethod(ctParams) : childCount, childCount])
444
453
  }
445
- } else if (countFields && countFields.includes(field)) {
446
- if (countMethod) {
447
- cellValue = `${countMethod(params)}`
454
+ } else if ($table.getPivotTableAggregateCellAggValue) {
455
+ cellValue = $table.getPivotTableAggregateCellAggValue(params)
456
+ } else if (aggFunc === true || (countFields && countFields.includes(field))) {
457
+ if (aggMethod) {
458
+ ctParams.aggValue = childCount
459
+ cellValue = `${aggMethod(ctParams)}`
448
460
  }
449
461
  }
450
- } else if (!(isRowGroupStatus && row.isAggregate)) {
462
+ } else {
451
463
  cellValue = $table.getCellLabel(row, column)
452
464
  }
453
465
  const cellPlaceholder = editRender ? editRender.placeholder : ''
@@ -480,11 +492,11 @@ export const Cell = {
480
492
  const tableReactData = $table.reactData
481
493
  const tableInternalData = $table.internalData
482
494
  const { row, level } = params
483
- const { computeRowGroupOpts } = $table.getComputeMaps()
495
+ const { computeAggregateOpts } = $table.getComputeMaps()
484
496
  const { rowGroupExpandedFlag } = tableReactData
485
497
  const { rowGroupExpandedMaps } = tableInternalData
486
- const rowGroupOpts = computeRowGroupOpts.value
487
- const { padding, indent } = rowGroupOpts
498
+ const aggregateOpts = computeAggregateOpts.value
499
+ const { padding, indent } = aggregateOpts
488
500
  const rowid = getRowid($table, row)
489
501
  const isExpand = !!rowGroupExpandedFlag && !!rowGroupExpandedMaps[rowid]
490
502
  return h('div', {
@@ -497,16 +509,18 @@ export const Cell = {
497
509
  }
498
510
  : undefined
499
511
  }, [
500
- h('span', {
501
- class: 'vxe-row-group--node-btn',
502
- onClick (evnt: MouseEvent) {
503
- $table.triggerRowGroupExpandEvent(evnt, params)
504
- }
505
- }, [
506
- h('i', {
507
- class: isExpand ? getIcon().TABLE_ROW_GROUP_OPEN : getIcon().TABLE_ROW_GROUP_CLOSE
508
- })
509
- ]),
512
+ row.isAggregate
513
+ ? h('span', {
514
+ class: 'vxe-row-group--node-btn',
515
+ onClick (evnt: MouseEvent) {
516
+ $table.triggerRowGroupExpandEvent(evnt, params)
517
+ }
518
+ }, [
519
+ h('i', {
520
+ class: isExpand ? getIcon().TABLE_ROW_GROUP_OPEN : getIcon().TABLE_ROW_GROUP_CLOSE
521
+ })
522
+ ])
523
+ : renderEmptyElement($table),
510
524
  h('div', {
511
525
  class: 'vxe-row-group-cell'
512
526
  }, cellVNodes)
@@ -588,10 +602,12 @@ export const Cell = {
588
602
  renderDeepNodeBtn (params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }, cellVNodes: VxeComponentSlotType[]) {
589
603
  const { $table, row, column } = params
590
604
  const { rowGroupNode } = column
591
- if (row.isAggregate) {
592
- const { computeRowGroupOpts } = $table.getComputeMaps()
593
- const rowGroupOpts = computeRowGroupOpts.value
594
- const { mode } = rowGroupOpts
605
+ const tableReactData = $table.reactData
606
+ const { rowGroupList } = tableReactData
607
+ if (rowGroupList.length) {
608
+ const { computeAggregateOpts } = $table.getComputeMaps()
609
+ const aggregateOpts = computeAggregateOpts.value
610
+ const { mode } = aggregateOpts
595
611
  if (mode === 'column' ? column.field === row.groupField : rowGroupNode) {
596
612
  return [Cell.renderRowGroupBtn(params, cellVNodes)]
597
613
  }
@@ -124,6 +124,8 @@ export const columnProps = {
124
124
  editRender: Object as PropType<VxeColumnPropTypes.EditRender>,
125
125
  // 内容渲染配置项
126
126
  contentRender: Object as PropType<VxeColumnPropTypes.ContentRender>,
127
+ // 聚合函数
128
+ aggFunc: [String, Boolean] as PropType<VxeColumnPropTypes.AggFunc>,
127
129
  // 额外的参数
128
130
  params: Object as PropType<VxeColumnPropTypes.Params>
129
131
  }
@@ -95,6 +95,7 @@ export class ColumnInfo {
95
95
  titleHelp: _vm.titleHelp,
96
96
  titlePrefix: _vm.titlePrefix,
97
97
  titleSuffix: _vm.titleSuffix,
98
+ aggFunc: _vm.aggFunc,
98
99
  // 自定义参数
99
100
  params: _vm.params,
100
101
  // 渲染属性
@@ -124,6 +125,8 @@ export class ColumnInfo {
124
125
  sortNumber: 0, // 用于记录自定义列顺序
125
126
  renderSortNumber: 0, // 用于记录自定义列顺序
126
127
 
128
+ renderAggFn: '',
129
+
127
130
  renderFixed: '',
128
131
  renderVisible: false,
129
132
 
@@ -198,7 +198,9 @@ export default {
198
198
  footerCellConfig: Object as PropType<VxeTablePropTypes.FooterCellConfig>,
199
199
  // 行配置项
200
200
  rowConfig: Object as PropType<VxeTablePropTypes.RowConfig>,
201
- // 行分组配置项
201
+ // 数据聚合配置项
202
+ aggregateConfig: Object as PropType<VxeTablePropTypes.AggregateConfig>,
203
+ // 已废弃,被 aggregateConfig 替换
202
204
  rowGroupConfig: Object as PropType<VxeTablePropTypes.RowGroupConfig>,
203
205
  // 当前行配置项
204
206
  currentRowConfig: Object as PropType<VxeTablePropTypes.CurrentRowConfig>,