vxe-table 3.15.38 → 3.15.40

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 (179) hide show
  1. package/es/grid/src/grid.js +73 -49
  2. package/es/{iconfont.1749796837661.ttf → iconfont.1750082820248.ttf} +0 -0
  3. package/es/iconfont.1750082820248.woff +0 -0
  4. package/es/iconfont.1750082820248.woff2 +0 -0
  5. package/es/index.css +1 -1
  6. package/es/index.min.css +1 -1
  7. package/es/locale/lang/ar-EG.js +6 -0
  8. package/es/locale/lang/de-DE.js +6 -0
  9. package/es/locale/lang/en-US.js +6 -0
  10. package/es/locale/lang/es-ES.js +6 -0
  11. package/es/locale/lang/fr-FR.js +6 -0
  12. package/es/locale/lang/hu-HU.js +6 -0
  13. package/es/locale/lang/hy-AM.js +6 -0
  14. package/es/locale/lang/id-ID.js +6 -0
  15. package/es/locale/lang/it-IT.js +6 -0
  16. package/es/locale/lang/ja-JP.js +6 -0
  17. package/es/locale/lang/ko-KR.js +6 -0
  18. package/es/locale/lang/ms-MY.js +6 -0
  19. package/es/locale/lang/nb-NO.js +6 -0
  20. package/es/locale/lang/pt-BR.js +6 -0
  21. package/es/locale/lang/ru-RU.js +6 -0
  22. package/es/locale/lang/th-TH.js +6 -0
  23. package/es/locale/lang/ug-CN.js +6 -0
  24. package/es/locale/lang/uk-UA.js +6 -0
  25. package/es/locale/lang/uz-UZ.js +6 -0
  26. package/es/locale/lang/vi-VN.js +6 -0
  27. package/es/locale/lang/zh-CHT.js +6 -0
  28. package/es/locale/lang/zh-CN.js +6 -0
  29. package/es/style.css +1 -1
  30. package/es/style.min.css +1 -1
  31. package/es/table/module/custom/mixin.js +29 -3
  32. package/es/table/module/custom/panel.js +118 -105
  33. package/es/table/src/body.js +9 -6
  34. package/es/table/src/methods.js +34 -26
  35. package/es/table/src/props.js +32 -8
  36. package/es/table/src/table.js +57 -38
  37. package/es/table/style.css +22 -3
  38. package/es/table/style.min.css +1 -1
  39. package/es/ui/index.js +4 -1
  40. package/es/ui/src/log.js +1 -1
  41. package/es/vxe-table/style.css +22 -3
  42. package/es/vxe-table/style.min.css +1 -1
  43. package/lib/grid/src/grid.js +81 -82
  44. package/lib/grid/src/grid.min.js +1 -1
  45. package/lib/{iconfont.1749796837661.ttf → iconfont.1750082820248.ttf} +0 -0
  46. package/lib/iconfont.1750082820248.woff +0 -0
  47. package/lib/iconfont.1750082820248.woff2 +0 -0
  48. package/lib/index.css +1 -1
  49. package/lib/index.min.css +1 -1
  50. package/lib/index.umd.js +285 -187
  51. package/lib/index.umd.min.js +1 -1
  52. package/lib/locale/lang/ar-EG.js +6 -0
  53. package/lib/locale/lang/ar-EG.min.js +1 -1
  54. package/lib/locale/lang/ar-EG.umd.js +6 -0
  55. package/lib/locale/lang/de-DE.js +6 -0
  56. package/lib/locale/lang/de-DE.min.js +1 -1
  57. package/lib/locale/lang/de-DE.umd.js +6 -0
  58. package/lib/locale/lang/en-US.js +6 -0
  59. package/lib/locale/lang/en-US.min.js +1 -1
  60. package/lib/locale/lang/en-US.umd.js +6 -0
  61. package/lib/locale/lang/es-ES.js +6 -0
  62. package/lib/locale/lang/es-ES.min.js +1 -1
  63. package/lib/locale/lang/es-ES.umd.js +6 -0
  64. package/lib/locale/lang/fr-FR.js +6 -0
  65. package/lib/locale/lang/fr-FR.min.js +1 -1
  66. package/lib/locale/lang/fr-FR.umd.js +6 -0
  67. package/lib/locale/lang/hu-HU.js +6 -0
  68. package/lib/locale/lang/hu-HU.min.js +1 -1
  69. package/lib/locale/lang/hu-HU.umd.js +6 -0
  70. package/lib/locale/lang/hy-AM.js +6 -0
  71. package/lib/locale/lang/hy-AM.min.js +1 -1
  72. package/lib/locale/lang/hy-AM.umd.js +6 -0
  73. package/lib/locale/lang/id-ID.js +6 -0
  74. package/lib/locale/lang/id-ID.min.js +1 -1
  75. package/lib/locale/lang/id-ID.umd.js +6 -0
  76. package/lib/locale/lang/it-IT.js +6 -0
  77. package/lib/locale/lang/it-IT.min.js +1 -1
  78. package/lib/locale/lang/it-IT.umd.js +6 -0
  79. package/lib/locale/lang/ja-JP.js +6 -0
  80. package/lib/locale/lang/ja-JP.min.js +1 -1
  81. package/lib/locale/lang/ja-JP.umd.js +6 -0
  82. package/lib/locale/lang/ko-KR.js +6 -0
  83. package/lib/locale/lang/ko-KR.min.js +1 -1
  84. package/lib/locale/lang/ko-KR.umd.js +6 -0
  85. package/lib/locale/lang/ms-MY.js +6 -0
  86. package/lib/locale/lang/ms-MY.min.js +1 -1
  87. package/lib/locale/lang/ms-MY.umd.js +6 -0
  88. package/lib/locale/lang/nb-NO.js +6 -0
  89. package/lib/locale/lang/nb-NO.min.js +1 -1
  90. package/lib/locale/lang/nb-NO.umd.js +6 -0
  91. package/lib/locale/lang/pt-BR.js +6 -0
  92. package/lib/locale/lang/pt-BR.min.js +1 -1
  93. package/lib/locale/lang/pt-BR.umd.js +6 -0
  94. package/lib/locale/lang/ru-RU.js +6 -0
  95. package/lib/locale/lang/ru-RU.min.js +1 -1
  96. package/lib/locale/lang/ru-RU.umd.js +6 -0
  97. package/lib/locale/lang/th-TH.js +6 -0
  98. package/lib/locale/lang/th-TH.min.js +1 -1
  99. package/lib/locale/lang/th-TH.umd.js +6 -0
  100. package/lib/locale/lang/ug-CN.js +6 -0
  101. package/lib/locale/lang/ug-CN.min.js +1 -1
  102. package/lib/locale/lang/ug-CN.umd.js +6 -0
  103. package/lib/locale/lang/uk-UA.js +6 -0
  104. package/lib/locale/lang/uk-UA.min.js +1 -1
  105. package/lib/locale/lang/uk-UA.umd.js +6 -0
  106. package/lib/locale/lang/uz-UZ.js +6 -0
  107. package/lib/locale/lang/uz-UZ.min.js +1 -1
  108. package/lib/locale/lang/uz-UZ.umd.js +6 -0
  109. package/lib/locale/lang/vi-VN.js +6 -0
  110. package/lib/locale/lang/vi-VN.min.js +1 -1
  111. package/lib/locale/lang/vi-VN.umd.js +6 -0
  112. package/lib/locale/lang/zh-CHT.js +6 -0
  113. package/lib/locale/lang/zh-CHT.min.js +1 -1
  114. package/lib/locale/lang/zh-CHT.umd.js +6 -0
  115. package/lib/locale/lang/zh-CN.js +6 -0
  116. package/lib/locale/lang/zh-CN.min.js +1 -1
  117. package/lib/locale/lang/zh-CN.umd.js +6 -0
  118. package/lib/style.css +1 -1
  119. package/lib/style.min.css +1 -1
  120. package/lib/table/module/custom/mixin.js +32 -5
  121. package/lib/table/module/custom/mixin.min.js +1 -1
  122. package/lib/table/module/custom/panel.js +14 -2
  123. package/lib/table/module/custom/panel.min.js +1 -1
  124. package/lib/table/src/body.js +12 -12
  125. package/lib/table/src/body.min.js +1 -1
  126. package/lib/table/src/methods.js +38 -25
  127. package/lib/table/src/methods.min.js +1 -1
  128. package/lib/table/src/props.js +32 -8
  129. package/lib/table/src/table.js +64 -50
  130. package/lib/table/src/table.min.js +1 -1
  131. package/lib/table/style/style.css +22 -3
  132. package/lib/table/style/style.min.css +1 -1
  133. package/lib/ui/index.js +4 -1
  134. package/lib/ui/index.min.js +1 -1
  135. package/lib/ui/src/log.js +1 -1
  136. package/lib/ui/src/log.min.js +1 -1
  137. package/lib/vxe-table/style/style.css +22 -3
  138. package/lib/vxe-table/style/style.min.css +1 -1
  139. package/package.json +1 -1
  140. package/packages/grid/src/grid.ts +93 -54
  141. package/packages/locale/lang/ar-EG.ts +6 -0
  142. package/packages/locale/lang/de-DE.ts +6 -0
  143. package/packages/locale/lang/en-US.ts +6 -0
  144. package/packages/locale/lang/es-ES.ts +6 -0
  145. package/packages/locale/lang/fr-FR.ts +6 -0
  146. package/packages/locale/lang/hu-HU.ts +6 -0
  147. package/packages/locale/lang/hy-AM.ts +6 -0
  148. package/packages/locale/lang/id-ID.ts +6 -0
  149. package/packages/locale/lang/it-IT.ts +6 -0
  150. package/packages/locale/lang/ja-JP.ts +6 -0
  151. package/packages/locale/lang/ko-KR.ts +6 -0
  152. package/packages/locale/lang/ms-MY.ts +6 -0
  153. package/packages/locale/lang/nb-NO.ts +6 -0
  154. package/packages/locale/lang/pt-BR.ts +6 -0
  155. package/packages/locale/lang/ru-RU.ts +6 -0
  156. package/packages/locale/lang/th-TH.ts +6 -0
  157. package/packages/locale/lang/ug-CN.ts +6 -0
  158. package/packages/locale/lang/uk-UA.ts +6 -0
  159. package/packages/locale/lang/uz-UZ.ts +6 -0
  160. package/packages/locale/lang/vi-VN.ts +6 -0
  161. package/packages/locale/lang/zh-CHT.ts +6 -0
  162. package/packages/locale/lang/zh-CN.ts +6 -0
  163. package/packages/table/module/custom/mixin.ts +27 -3
  164. package/packages/table/module/custom/panel.ts +119 -106
  165. package/packages/table/src/body.ts +14 -11
  166. package/packages/table/src/cell.ts +12 -12
  167. package/packages/table/src/methods.ts +35 -26
  168. package/packages/table/src/props.ts +32 -8
  169. package/packages/table/src/table.ts +76 -49
  170. package/packages/ui/index.ts +11 -0
  171. package/styles/components/icon.scss +13 -1
  172. package/styles/components/table-module/custom.scss +9 -2
  173. package/styles/icon/iconfont.ttf +0 -0
  174. package/styles/icon/iconfont.woff +0 -0
  175. package/styles/icon/iconfont.woff2 +0 -0
  176. package/es/iconfont.1749796837661.woff +0 -0
  177. package/es/iconfont.1749796837661.woff2 +0 -0
  178. package/lib/iconfont.1749796837661.woff +0 -0
  179. package/lib/iconfont.1749796837661.woff2 +0 -0
@@ -100,10 +100,12 @@ const renderSimplePanel = (h: CreateElement, _vm: any) => {
100
100
  const props = _vm
101
101
 
102
102
  const $xeTable = _vm.$xeTable as VxeTableConstructor & VxeTablePrivateMethods
103
+ const tableProps = $xeTable
103
104
  const reactData = $xeTable as unknown as TableReactData
104
105
  const $xeGrid = $xeTable.$xeGrid
105
106
 
106
107
  const { customStore } = props
108
+ const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps
107
109
  const { isCustomStatus, customColumnList } = reactData
108
110
  const customOpts = $xeTable.computeCustomOpts
109
111
  const { immediate } = customOpts
@@ -276,124 +278,135 @@ const renderSimplePanel = (h: CreateElement, _vm: any) => {
276
278
  : {}
277
279
  }, customStore.visible
278
280
  ? [
281
+ !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel
282
+ ? h($xeTable.getPivotTableAggregateSimplePanel(), {
283
+ props: {
284
+ customStore
285
+ }
286
+ })
287
+ : renderEmptyElement($xeTable),
279
288
  h('div', {
280
- class: 'vxe-table-custom--header'
281
- }, headerSlot
282
- ? $xeTable.callSlot(headerSlot, params, h)
283
- : [
284
- h('ul', {
285
- class: 'vxe-table-custom--panel-list'
286
- }, [
287
- h('li', {
288
- class: 'vxe-table-custom--option'
289
+ class: 'vxe-table-custom--handle-wrapper'
290
+ }, [
291
+ h('div', {
292
+ class: 'vxe-table-custom--header'
293
+ }, headerSlot
294
+ ? $xeTable.callSlot(headerSlot, params, h)
295
+ : [
296
+ h('ul', {
297
+ class: 'vxe-table-custom--panel-list'
289
298
  }, [
290
- allowVisible
291
- ? h('div', {
292
- class: ['vxe-table-custom--checkbox-option', {
293
- 'is--checked': isAllChecked,
294
- 'is--indeterminate': isAllIndeterminate
295
- }],
296
- attrs: {
297
- title: getI18n('vxe.table.allTitle')
298
- },
299
- on: {
300
- click: _vm.allOptionEvent
301
- }
302
- }, [
303
- h('span', {
304
- class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
305
- }),
306
- h('span', {
299
+ h('li', {
300
+ class: 'vxe-table-custom--option'
301
+ }, [
302
+ allowVisible
303
+ ? h('div', {
304
+ class: ['vxe-table-custom--checkbox-option', {
305
+ 'is--checked': isAllChecked,
306
+ 'is--indeterminate': isAllIndeterminate
307
+ }],
308
+ attrs: {
309
+ title: getI18n('vxe.table.allTitle')
310
+ },
311
+ on: {
312
+ click: _vm.allOptionEvent
313
+ }
314
+ }, [
315
+ h('span', {
316
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
317
+ }),
318
+ h('span', {
319
+ class: 'vxe-checkbox--label'
320
+ }, getI18n('vxe.toolbar.customAll'))
321
+ ])
322
+ : h('span', {
307
323
  class: 'vxe-checkbox--label'
308
- }, getI18n('vxe.toolbar.customAll'))
309
- ])
310
- : h('span', {
311
- class: 'vxe-checkbox--label'
312
- }, getI18n('vxe.table.customTitle'))
324
+ }, getI18n('vxe.table.customTitle'))
325
+ ])
313
326
  ])
314
- ])
315
- ]),
316
- h('div', {
317
- ref: 'bodyElemRef',
318
- class: 'vxe-table-custom--body'
319
- }, [
320
- topSlot
321
- ? h('div', {
322
- class: 'vxe-table-custom--panel-top'
323
- }, $xeTable.callSlot(topSlot, params, h))
324
- : renderEmptyElement($xeTable),
325
- defaultSlot
326
- ? h('div', {
327
- class: 'vxe-table-custom--panel-body'
328
- }, $xeTable.callSlot(defaultSlot, params, h))
329
- : h('transition-group', {
330
- class: 'vxe-table-custom--panel-list',
331
- props: {
332
- name: 'vxe-table-custom--list',
333
- tag: 'ul'
334
- },
335
- on: customWrapperOns
336
- }, colVNs),
337
- bottomSlot
327
+ ]),
328
+ h('div', {
329
+ ref: 'bodyElemRef',
330
+ class: 'vxe-table-custom--body'
331
+ }, [
332
+ topSlot
333
+ ? h('div', {
334
+ class: 'vxe-table-custom--panel-top'
335
+ }, $xeTable.callSlot(topSlot, params, h))
336
+ : renderEmptyElement($xeTable),
337
+ defaultSlot
338
+ ? h('div', {
339
+ class: 'vxe-table-custom--panel-body'
340
+ }, $xeTable.callSlot(defaultSlot, params, h))
341
+ : h('transition-group', {
342
+ class: 'vxe-table-custom--panel-list',
343
+ props: {
344
+ name: 'vxe-table-custom--list',
345
+ tag: 'ul'
346
+ },
347
+ on: customWrapperOns
348
+ }, colVNs),
349
+ bottomSlot
350
+ ? h('div', {
351
+ class: 'vxe-table-custom--panel-bottom'
352
+ }, $xeTable.callSlot(bottomSlot, params, h))
353
+ : renderEmptyElement($xeTable),
354
+ renderDragTip(h, _vm)
355
+ ]),
356
+ customOpts.showFooter
338
357
  ? h('div', {
339
- class: 'vxe-table-custom--panel-bottom'
340
- }, $xeTable.callSlot(bottomSlot, params, h))
341
- : renderEmptyElement($xeTable),
342
- renderDragTip(h, _vm)
343
- ]),
344
- customOpts.showFooter
345
- ? h('div', {
346
- class: 'vxe-table-custom--footer'
347
- }, footerSlot
348
- ? $xeTable.callSlot(footerSlot, params, h)
349
- : [
350
- h('div', {
351
- class: 'vxe-table-custom--footer-buttons'
352
- }, [
353
- h(VxeUIButtonComponent, {
354
- props: {
355
- mode: 'text',
356
- content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
357
- disabled: !isCustomStatus
358
- },
359
- on: {
360
- click: _vm.resetCustomEvent
361
- }
362
- }),
363
- immediate
364
- ? h(VxeUIButtonComponent, {
365
- props: {
366
- mode: 'text',
367
- content: customOpts.closeButtonText || getI18n('vxe.table.customClose')
368
- },
369
- on: {
370
- click: _vm.cancelCloseEvent
371
- }
372
- })
373
- : h(VxeUIButtonComponent, {
358
+ class: 'vxe-table-custom--footer'
359
+ }, footerSlot
360
+ ? $xeTable.callSlot(footerSlot, params, h)
361
+ : [
362
+ h('div', {
363
+ class: 'vxe-table-custom--footer-buttons'
364
+ }, [
365
+ h(VxeUIButtonComponent, {
374
366
  props: {
375
367
  mode: 'text',
376
- content: customOpts.resetButtonText || getI18n('vxe.table.customCancel')
368
+ content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
369
+ disabled: !isCustomStatus
377
370
  },
378
371
  on: {
379
- click: _vm.cancelCustomEvent
372
+ click: _vm.resetCustomEvent
380
373
  }
381
374
  }),
382
- immediate
383
- ? renderEmptyElement($xeTable)
384
- : h(VxeUIButtonComponent, {
385
- props: {
386
- mode: 'text',
387
- status: 'primary',
388
- content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm')
389
- },
390
- on: {
391
- click: _vm.confirmCustomEvent
392
- }
393
- })
375
+ immediate
376
+ ? h(VxeUIButtonComponent, {
377
+ props: {
378
+ mode: 'text',
379
+ content: customOpts.closeButtonText || getI18n('vxe.table.customClose')
380
+ },
381
+ on: {
382
+ click: _vm.cancelCloseEvent
383
+ }
384
+ })
385
+ : h(VxeUIButtonComponent, {
386
+ props: {
387
+ mode: 'text',
388
+ content: customOpts.resetButtonText || getI18n('vxe.table.customCancel')
389
+ },
390
+ on: {
391
+ click: _vm.cancelCustomEvent
392
+ }
393
+ }),
394
+ immediate
395
+ ? renderEmptyElement($xeTable)
396
+ : h(VxeUIButtonComponent, {
397
+ props: {
398
+ mode: 'text',
399
+ status: 'primary',
400
+ content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm')
401
+ },
402
+ on: {
403
+ click: _vm.confirmCustomEvent
404
+ }
405
+ })
406
+ ])
394
407
  ])
395
- ])
396
- : null
408
+ : null
409
+ ])
397
410
  ]
398
411
  : [])
399
412
  }
@@ -6,7 +6,7 @@ import { getOffsetSize, calcTreeLine, getRowid, createHandleGetRowId, getCellRes
6
6
  import { updateCellTitle } from '../../ui/src/dom'
7
7
  import { getSlotVNs } from '../../ui/src/vn'
8
8
 
9
- import type { VxeTableConstructor, VxeTableDefines, TableInternalData, VxeTablePrivateMethods, TableReactData, VxeComponentStyleType } from '../../../types'
9
+ import type { VxeTableConstructor, VxeTableDefines, TableInternalData, VxeTablePrivateMethods, TableReactData, VxeComponentStyleType, VxeComponentSlotType } from '../../../types'
10
10
 
11
11
  const { getI18n, renderer, renderEmptyElement } = VxeUI
12
12
 
@@ -22,7 +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, $xeTable : VxeTableConstructor & VxeTablePrivateMethods, rowid: string, params: VxeTableDefines.CellRenderBodyParams, cellHeight: number) {
25
+ function renderLine (h: CreateElement, $xeTable : VxeTableConstructor & VxeTablePrivateMethods, rowid: string, params: VxeTableDefines.CellRenderBodyParams, cellHeight: number): VxeComponentSlotType[] {
26
26
  const tableProps = $xeTable
27
27
  const tableInternalData = $xeTable as unknown as TableInternalData
28
28
 
@@ -286,7 +286,7 @@ function renderTdColumn (
286
286
  if (mEndRow) {
287
287
  const meRowRest = fullAllDataRowIdData[getRowid($xeTable, mEndRow)]
288
288
  if (meRowRest) {
289
- cellHeight += meRowRest.oTop - rowRest.oTop + getCellRestHeight(meRowRest, cellOpts, rowOpts, defaultRowHeight)
289
+ cellHeight += meRowRest.oTop + getCellRestHeight(meRowRest, cellOpts, rowOpts, defaultRowHeight) - rowRest.oTop - getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight)
290
290
  }
291
291
  }
292
292
  }
@@ -310,7 +310,7 @@ function renderTdColumn (
310
310
  tcStyle.minHeight = `${cellHeight}px`
311
311
  }
312
312
 
313
- const tdVNs = []
313
+ const tdVNs: VxeComponentSlotType[] = []
314
314
  if (fixedHiddenColumn && isAllOverflow) {
315
315
  tdVNs.push(
316
316
  h('div', {
@@ -614,7 +614,7 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
614
614
  const { showOverflow } = expandColumn || {}
615
615
  const colid = expandColumn.id
616
616
  const colRest = fullColumnIdData[colid] || {}
617
- const hasEllipsis = (XEUtils.isUndefined(showOverflow) || XEUtils.isNull(showOverflow)) ? isAllOverflow : showOverflow
617
+ const hasEllipsis = XEUtils.eqNull(showOverflow) ? isAllOverflow : showOverflow
618
618
  let columnIndex = -1
619
619
  let $columnIndex = -1
620
620
  let _columnIndex = -1
@@ -735,8 +735,9 @@ export default {
735
735
  const tableReactData = $xeTable as unknown as TableReactData
736
736
  const tableInternalData = $xeTable as unknown as TableInternalData
737
737
  const $xeGrid = $xeTable.$xeGrid
738
+ const slots = $xeTable.$scopedSlots
738
739
 
739
- const { xID, $scopedSlots } = $xeTable
740
+ const { xID } = $xeTable
740
741
  const { fixedColumn, fixedType, tableColumn } = props
741
742
 
742
743
  const { spanMethod, footerSpanMethod, mouseConfig } = tableProps
@@ -819,13 +820,15 @@ export default {
819
820
  }
820
821
 
821
822
  let emptyContent
822
- if ($scopedSlots.empty) {
823
- emptyContent = $scopedSlots.empty.call(this, { $table: $xeTable, $grid: $xeGrid })
823
+ const emptySlot = slots ? slots.empty : null
824
+ const emptyParams = { $table: $xeTable, $grid: $xeGrid }
825
+ if (emptySlot) {
826
+ emptyContent = emptySlot.call($xeTable, emptyParams)
824
827
  } else {
825
828
  const compConf = emptyOpts.name ? renderer.get(emptyOpts.name) : null
826
829
  const rtEmptyView = compConf ? (compConf.renderTableEmpty || compConf.renderTableEmptyView || compConf.renderEmpty) : null
827
830
  if (rtEmptyView) {
828
- emptyContent = getSlotVNs(rtEmptyView.call(this, h, emptyOpts, { $table: $xeTable }))
831
+ emptyContent = getSlotVNs(rtEmptyView.call($xeTable, h, emptyOpts, emptyParams))
829
832
  } else {
830
833
  emptyContent = tableProps.emptyText || getI18n('vxe.table.emptyText')
831
834
  }
@@ -875,7 +878,7 @@ export default {
875
878
  */
876
879
  h('colgroup', {
877
880
  ref: 'refBodyColgroup'
878
- }, renderColumnList.map((column: any, $columnIndex: any) => {
881
+ }, renderColumnList.map((column, $columnIndex) => {
879
882
  return h('col', {
880
883
  attrs: {
881
884
  name: column.id
@@ -915,7 +918,7 @@ export default {
915
918
  h('span', {
916
919
  class: 'vxe-table--cell-main-area-btn',
917
920
  on: {
918
- mousedown (evnt: any) {
921
+ mousedown (evnt: MouseEvent) {
919
922
  if ($xeTable.triggerCellAreaExtendMousedownEvent) {
920
923
  $xeTable.triggerCellAreaExtendMousedownEvent(evnt, { $table: $xeTable, fixed: fixedType, type: renderType })
921
924
  }
@@ -377,18 +377,6 @@ export const Cell = {
377
377
  const { isRowGroupStatus } = tableReactData
378
378
  const { field, slots, editRender, cellRender, rowGroupNode, aggFunc } = column
379
379
  const renderOpts = editRender || cellRender
380
- if (slots && slots.default) {
381
- return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h))
382
- }
383
- if (renderOpts) {
384
- const compConf = renderer.get(renderOpts.name)
385
- const rtDefault = compConf ? (compConf.renderTableDefault || compConf.renderDefault) : null
386
- const rtCell = compConf ? (compConf.renderTableCell || compConf.renderCell) : null
387
- const renderFn = editRender ? rtCell : rtDefault
388
- if (renderFn) {
389
- return renderCellBaseVNs(h, params, getSlotVNs(renderFn.call($table, h, renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params))))
390
- }
391
- }
392
380
  let cellValue: string | number | null = ''
393
381
  if (isRowGroupStatus && field && row.isAggregate) {
394
382
  const aggRow: VxeTableDefines.AggregateRowInfo = row
@@ -434,6 +422,18 @@ export const Cell = {
434
422
  }
435
423
  }
436
424
  } else {
425
+ if (slots && slots.default) {
426
+ return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h))
427
+ }
428
+ if (renderOpts) {
429
+ const compConf = renderer.get(renderOpts.name)
430
+ const rtDefault = compConf ? (compConf.renderTableDefault || compConf.renderDefault) : null
431
+ const rtCell = compConf ? (compConf.renderTableCell || compConf.renderCell) : null
432
+ const renderFn = editRender ? rtCell : rtDefault
433
+ if (renderFn) {
434
+ return renderCellBaseVNs(h, params, getSlotVNs(renderFn.call($table, h, renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params))))
435
+ }
436
+ }
437
437
  cellValue = $table.getCellLabel(row, column)
438
438
  }
439
439
  const cellPlaceholder = editRender ? editRender.placeholder : ''
@@ -30,6 +30,10 @@ function eqCellValue (row1: any, row2: any, field: any) {
30
30
  return XEUtils.isEqual(val1, val2)
31
31
  }
32
32
 
33
+ function hangleStorageDefaultValue (value: boolean | null | undefined, isAll: boolean) {
34
+ return XEUtils.isBoolean(value) ? value : isAll
35
+ }
36
+
33
37
  function getNextSortOrder ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, column: any) {
34
38
  const sortOpts = $xeTable.computeSortOpts
35
39
  const { orders = [] } = sortOpts
@@ -174,13 +178,13 @@ function restoreCustomStorage ($xeTable: VxeTableConstructor & VxeTablePrivateMe
174
178
  const { customConfig } = props
175
179
  const tableId = $xeTable.computeTableId
176
180
  const customOpts = $xeTable.computeCustomOpts
177
- const { storage, restoreStore } = customOpts
181
+ const { storage, restoreStore, storeOptions } = customOpts
178
182
  const isAllCustom = storage === true
179
- const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = isAllCustom ? {} : Object.assign({}, storage || {})
180
- const isCustomResizable = isAllCustom || storageOpts.resizable
181
- const isCustomVisible = isAllCustom || storageOpts.visible
182
- const isCustomFixed = isAllCustom || storageOpts.fixed
183
- const isCustomSort = isAllCustom || storageOpts.sort
183
+ const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = isAllCustom ? {} : Object.assign({}, storage || {}, storeOptions)
184
+ const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom)
185
+ const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom)
186
+ const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom)
187
+ const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom)
184
188
  if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
185
189
  if (!tableId) {
186
190
  errLog('vxe.error.reqProp', ['id'])
@@ -2714,13 +2718,18 @@ function handleRecalculateLayout ($xeTable: VxeTableConstructor & VxeTablePrivat
2714
2718
  const handleUpdateRowGroup = ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, groupFields?: string[]) => {
2715
2719
  const reactData = $xeTable as unknown as TableReactData
2716
2720
 
2717
- reactData.rowGroupList = groupFields
2718
- ? (XEUtils.isArray(groupFields) ? groupFields : [groupFields]).map(field => {
2719
- return {
2720
- field
2721
- }
2721
+ const aggFields: string[] = []
2722
+ const aggConfs: { field: string }[] = []
2723
+ if (groupFields) {
2724
+ (XEUtils.isArray(groupFields) ? groupFields : [groupFields]).forEach(field => {
2725
+ aggFields.push(field)
2726
+ aggConfs.push({
2727
+ field
2722
2728
  })
2723
- : []
2729
+ })
2730
+ }
2731
+ reactData.rowGroupList = aggConfs
2732
+ reactData.aggHandleFields = aggFields
2724
2733
  }
2725
2734
 
2726
2735
  function handleeGroupSummary ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, aggList: VxeTableDefines.AggregateRowInfo[]) {
@@ -2910,9 +2919,9 @@ function loadTableData ($xeTable: VxeTableConstructor & VxeTablePrivateMethods,
2910
2919
  internalData.cvCacheMaps = {}
2911
2920
  reactData.isRowLoading = true
2912
2921
  reactData.scrollVMLoading = false
2913
- internalData.treeExpandedMaps = {}
2922
+ // internalData.treeExpandedMaps = {}
2914
2923
  reactData.treeExpandedFlag++
2915
- internalData.rowExpandedMaps = {}
2924
+ // internalData.rowExpandedMaps = {}
2916
2925
  reactData.rowExpandedFlag++
2917
2926
  internalData.insertRowMaps = {}
2918
2927
  reactData.insertRowFlag++
@@ -5112,13 +5121,13 @@ const Methods = {
5112
5121
  const { customConfig } = props
5113
5122
  const tableId = $xeTable.computeTableId
5114
5123
  const customOpts = $xeTable.computeCustomOpts
5115
- const { storage, restoreStore } = customOpts
5124
+ const { storage, restoreStore, storeOptions } = customOpts
5116
5125
  const isAllCustom = storage === true
5117
- const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = isAllCustom ? {} : Object.assign({}, storage || {})
5118
- const isCustomResizable = isAllCustom || storageOpts.resizable
5119
- const isCustomVisible = isAllCustom || storageOpts.visible
5120
- const isCustomFixed = isAllCustom || storageOpts.fixed
5121
- const isCustomSort = isAllCustom || storageOpts.sort
5126
+ const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = isAllCustom ? {} : Object.assign({}, storage || {}, storeOptions)
5127
+ const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom)
5128
+ const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom)
5129
+ const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom)
5130
+ const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom)
5122
5131
  if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
5123
5132
  if (!tableId) {
5124
5133
  errLog('vxe.error.reqProp', ['id'])
@@ -5147,13 +5156,13 @@ const Methods = {
5147
5156
  const { id } = props
5148
5157
  const customOpts = $xeTable.computeCustomOpts
5149
5158
  const { collectColumn } = internalData
5150
- const { storage, checkMethod } = customOpts
5159
+ const { storage, checkMethod, storeOptions } = customOpts
5151
5160
  const isAllCustom = storage === true
5152
- const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = isAllCustom ? {} : Object.assign({}, storage || {})
5153
- const isCustomResizable = isAllCustom || storageOpts.resizable
5154
- const isCustomVisible = isAllCustom || storageOpts.visible
5155
- const isCustomFixed = isAllCustom || storageOpts.fixed
5156
- const isCustomSort = isAllCustom || storageOpts.sort
5161
+ const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = isAllCustom ? {} : Object.assign({}, storage || {}, storeOptions)
5162
+ const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom)
5163
+ const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom)
5164
+ const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom)
5165
+ const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom)
5157
5166
  const resizableData: Record<string, number> = {}
5158
5167
  const sortData: Record<string, number> = {}
5159
5168
  const visibleData: Record<string, boolean> = {}
@@ -150,11 +150,20 @@ export default {
150
150
  showFooterOverflow: { type: [Boolean, String], default: () => getConfig().table.showFooterOverflow },
151
151
 
152
152
  /** 高级属性 */
153
- // (即将废弃)columnKey 已废弃,被 column-config.useKey 替换
153
+ /**
154
+ * (即将废弃)columnKey 已废弃,被 column-config.useKey 替换
155
+ * @deprecated
156
+ */
154
157
  columnKey: Boolean,
155
- // (即将废弃)rowKey 已废弃,被 row-config.useKey 替换
158
+ /**
159
+ * (即将废弃)rowKey 已废弃,被 row-config.useKey 替换
160
+ * @deprecated
161
+ */
156
162
  rowKey: Boolean,
157
- // (即将废弃)rowId 已废弃,被 row-config.keyField 替换
163
+ /**
164
+ * (即将废弃)rowId 已废弃,被 row-config.keyField 替换
165
+ * @deprecated
166
+ */
158
167
  rowId: { type: String, default: () => getConfig().table.rowId },
159
168
  zIndex: Number,
160
169
  emptyText: { type: String, default: () => getConfig().table.emptyText },
@@ -179,11 +188,17 @@ export default {
179
188
  rowConfig: Object as PropType<VxeTablePropTypes.RowConfig>,
180
189
  // 数据聚合配置项
181
190
  aggregateConfig: Object as PropType<VxeTablePropTypes.AggregateConfig>,
182
- // 已废弃,被 aggregateConfig 替换
191
+ /**
192
+ * 已废弃,被 aggregateConfig 替换
193
+ * @deprecated
194
+ */
183
195
  rowGroupConfig: Object as PropType<VxeTablePropTypes.RowGroupConfig>,
184
196
  // 当前行配置项
185
197
  currentRowConfig: Object as PropType<VxeTablePropTypes.CurrentRowConfig>,
186
- // 已废弃,被 rowDragConfig 替换
198
+ /**
199
+ * 已废弃,被 rowDragConfig 替换
200
+ * @deprecated
201
+ */
187
202
  dragConfig: Object as PropType<VxeTablePropTypes.DragConfig>,
188
203
  // 行拖拽排序配置项
189
204
  rowDragConfig: Object as PropType<VxeTablePropTypes.RowDragConfig>,
@@ -215,7 +230,10 @@ export default {
215
230
  treeConfig: [Boolean, Object],
216
231
  // 快捷菜单配置项
217
232
  menuConfig: [Boolean, Object],
218
- // 在 v4 中废弃 contextMenu
233
+ /**
234
+ * 在 v4 中废弃 contextMenu
235
+ * @deprecated
236
+ */
219
237
  contextMenu: [Boolean, Object],
220
238
  // 鼠标配置项
221
239
  mouseConfig: Object,
@@ -239,9 +257,15 @@ export default {
239
257
  emptyRender: [Boolean, Object],
240
258
  // 自定义列配置项
241
259
  customConfig: Object as PropType<VxeTablePropTypes.CustomConfig>,
242
- // (即将废弃)横向虚拟滚动配置项
260
+ /**
261
+ * (即将废弃)横向虚拟滚动配置项
262
+ * @deprecated
263
+ */
243
264
  scrollX: Object as PropType<VxeTablePropTypes.ScrollX>,
244
- // (即将废弃)纵向虚拟滚动配置项
265
+ /**
266
+ * (即将废弃)纵向虚拟滚动配置项
267
+ * @deprecated
268
+ */
245
269
  scrollY: Object as PropType<VxeTablePropTypes.ScrollY>,
246
270
  // 横向虚拟滚动配置项
247
271
  virtualXConfig: Object as PropType<VxeTablePropTypes.VirtualXConfig>,