vxe-table 3.15.34 → 3.15.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 (50) hide show
  1. package/es/style.css +1 -1
  2. package/es/table/src/body.js +20 -3
  3. package/es/table/src/cell.js +52 -36
  4. package/es/table/src/column.js +2 -0
  5. package/es/table/src/columnInfo.js +2 -0
  6. package/es/table/src/methods.js +117 -69
  7. package/es/table/src/props.js +3 -1
  8. package/es/table/src/table.js +19 -6
  9. package/es/table/src/util.js +5 -2
  10. package/es/ui/index.js +4 -4
  11. package/es/ui/src/log.js +1 -1
  12. package/lib/index.umd.js +227 -109
  13. package/lib/index.umd.min.js +1 -1
  14. package/lib/style.css +1 -1
  15. package/lib/table/src/body.js +19 -2
  16. package/lib/table/src/body.min.js +1 -1
  17. package/lib/table/src/cell.js +43 -28
  18. package/lib/table/src/cell.min.js +1 -1
  19. package/lib/table/src/column.js +2 -0
  20. package/lib/table/src/column.min.js +1 -1
  21. package/lib/table/src/columnInfo.js +2 -0
  22. package/lib/table/src/columnInfo.min.js +1 -1
  23. package/lib/table/src/methods.js +129 -65
  24. package/lib/table/src/methods.min.js +1 -1
  25. package/lib/table/src/props.js +3 -1
  26. package/lib/table/src/props.min.js +1 -1
  27. package/lib/table/src/table.js +19 -6
  28. package/lib/table/src/table.min.js +1 -1
  29. package/lib/table/src/util.js +7 -4
  30. package/lib/table/src/util.min.js +1 -1
  31. package/lib/ui/index.js +4 -4
  32. package/lib/ui/index.min.js +1 -1
  33. package/lib/ui/src/log.js +1 -1
  34. package/lib/ui/src/log.min.js +1 -1
  35. package/package.json +1 -1
  36. package/packages/table/src/body.ts +20 -3
  37. package/packages/table/src/cell.ts +52 -36
  38. package/packages/table/src/column.ts +2 -0
  39. package/packages/table/src/columnInfo.ts +3 -0
  40. package/packages/table/src/methods.ts +122 -68
  41. package/packages/table/src/props.ts +3 -1
  42. package/packages/table/src/table.ts +20 -6
  43. package/packages/table/src/util.ts +6 -2
  44. package/packages/ui/index.ts +3 -3
  45. /package/es/{iconfont.1749092456241.ttf → iconfont.1749202936550.ttf} +0 -0
  46. /package/es/{iconfont.1749092456241.woff → iconfont.1749202936550.woff} +0 -0
  47. /package/es/{iconfont.1749092456241.woff2 → iconfont.1749202936550.woff2} +0 -0
  48. /package/lib/{iconfont.1749092456241.ttf → iconfont.1749202936550.ttf} +0 -0
  49. /package/lib/{iconfont.1749092456241.woff → iconfont.1749202936550.woff} +0 -0
  50. /package/lib/{iconfont.1749092456241.woff2 → iconfont.1749202936550.woff2} +0 -0
@@ -881,11 +881,16 @@ export default {
881
881
 
882
882
  return Object.assign({}, getConfig().table.rowConfig, props.rowConfig)
883
883
  },
884
- computeRowGroupOpts () {
884
+ computeAggregateOpts () {
885
885
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
886
886
  const props = $xeTable
887
887
 
888
- return Object.assign({}, getConfig().table.rowGroupConfig, props.rowGroupConfig)
888
+ return Object.assign({}, getConfig().table.aggregateConfig || getConfig().table.rowGroupConfig, props.aggregateConfig || props.rowGroupConfig)
889
+ },
890
+ computeRowGroupOpts () {
891
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
892
+
893
+ return $xeTable.computeAggregateOpts
889
894
  },
890
895
  computeCurrentRowOpts () {
891
896
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
@@ -1279,8 +1284,8 @@ export default {
1279
1284
  computeRowGroupFields () {
1280
1285
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
1281
1286
 
1282
- const rowGroupOpts = $xeTable.computeRowGroupOpts
1283
- return rowGroupOpts.groupFields
1287
+ const aggregateOpts = $xeTable.computeAggregateOpts
1288
+ return aggregateOpts.groupFields
1284
1289
  },
1285
1290
  tabsResizeFlag () {
1286
1291
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
@@ -1564,8 +1569,8 @@ export default {
1564
1569
  const currentRowOpts = $xeTable.computeCurrentRowOpts
1565
1570
  const currentColumnOpts = $xeTable.computeCurrentColumnOpts
1566
1571
  const keyboardOpts = $xeTable.computeKeyboardOpts
1567
- const rowGroupOpts = $xeTable.computeRowGroupOpts
1568
- const { groupFields } = rowGroupOpts
1572
+ const aggregateOpts = $xeTable.computeAggregateOpts
1573
+ const { groupFields } = aggregateOpts
1569
1574
 
1570
1575
  if (props.rowId) {
1571
1576
  warnLog('vxe.error.delProp', ['row-id', 'row-config.keyField'])
@@ -1658,6 +1663,15 @@ export default {
1658
1663
  if (props.dragConfig) {
1659
1664
  warnLog('vxe.error.delProp', ['drag-config', 'row-drag-config'])
1660
1665
  }
1666
+ if (props.rowGroupConfig) {
1667
+ warnLog('vxe.error.delProp', ['row-group-config', 'aggregate-config'])
1668
+ }
1669
+ if (aggregateOpts.countFields) {
1670
+ warnLog('vxe.error.delProp', ['row-group-config.countFields', 'column.agg-func'])
1671
+ }
1672
+ if (aggregateOpts.countMethod) {
1673
+ warnLog('vxe.error.delProp', ['row-group-config.countMethod', 'aggregate-config.aggregateMethod'])
1674
+ }
1661
1675
  if (props.treeConfig && treeOpts.children) {
1662
1676
  warnLog('vxe.error.delProp', ['tree-config.children', 'tree-config.childrenField'])
1663
1677
  }
@@ -4,7 +4,7 @@ import { isScale, isPx, queryElement } from '../../ui/src/dom'
4
4
  import { warnLog, errLog } from '../../ui/src/log'
5
5
  import { eqEmptyValue } from '../../ui/src/utils'
6
6
 
7
- import type { VxeTableDefines, VxeTableConstructor, TableReactData, TableInternalData, VxeTablePrivateMethods } from '../../../types'
7
+ import type { VxeTableDefines, VxeTableConstructor, TableReactData, TableInternalData, VxeTablePrivateMethods, VxeTablePropTypes } from '../../../types'
8
8
 
9
9
  const getAllConvertColumns = (columns: any, parentColumn?: any) => {
10
10
  const result: any[] = []
@@ -204,7 +204,7 @@ export function handleFieldOrColumn ($xeTable: VxeTableConstructor, fieldOrColum
204
204
  return null
205
205
  }
206
206
 
207
- export const handleRowidOrRow = ($xeTable: VxeTableConstructor, rowidOrRow: any) => {
207
+ export function handleRowidOrRow ($xeTable: VxeTableConstructor, rowidOrRow: any) {
208
208
  if (rowidOrRow) {
209
209
  const rowid = XEUtils.isString(rowidOrRow) || XEUtils.isNumber(rowidOrRow) ? rowidOrRow : getRowid($xeTable, rowidOrRow)
210
210
  return $xeTable.getRowById(rowid)
@@ -212,6 +212,10 @@ export const handleRowidOrRow = ($xeTable: VxeTableConstructor, rowidOrRow: any)
212
212
  return null
213
213
  }
214
214
 
215
+ export function getCellRestHeight (rowRest: VxeTableDefines.RowCacheItem, cellOpts: VxeTablePropTypes.CellConfig, rowOpts: VxeTablePropTypes.RowConfig, defaultRowHeight: number) {
216
+ return rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight
217
+ }
218
+
215
219
  // 组装列配置
216
220
  export function assembleColumn (_vm: any) {
217
221
  const $xeTable = _vm.$xeTable as VxeTableConstructor & VxeTablePrivateMethods
@@ -133,7 +133,7 @@ VxeUI.setConfig({
133
133
  // isEvery: false,
134
134
  showIcon: true
135
135
  },
136
- rowGroupConfig: {
136
+ aggregateConfig: {
137
137
  padding: true,
138
138
  rowField: 'id',
139
139
  parentField: '_X_ROW_PARENT_KEY',
@@ -208,13 +208,13 @@ VxeUI.setConfig({
208
208
  isReplace: true
209
209
  },
210
210
  virtualXConfig: {
211
- enabled: true,
211
+ // enabled: false,
212
212
  gt: 24,
213
213
  preSize: 0,
214
214
  oSize: 0
215
215
  },
216
216
  virtualYConfig: {
217
- enabled: true,
217
+ // enabled: false,
218
218
  gt: 100,
219
219
  preSize: 1,
220
220
  oSize: 0