vxe-table 3.15.39 → 3.15.41

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 (186) hide show
  1. package/es/grid/src/grid.js +73 -49
  2. package/es/{iconfont.1749800510225.ttf → iconfont.1750153781820.ttf} +0 -0
  3. package/es/iconfont.1750153781820.woff +0 -0
  4. package/es/iconfont.1750153781820.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 +8 -5
  34. package/es/table/src/cell.js +12 -12
  35. package/es/table/src/methods.js +34 -26
  36. package/es/table/src/props.js +32 -8
  37. package/es/table/src/table.js +57 -38
  38. package/es/table/style.css +22 -3
  39. package/es/table/style.min.css +1 -1
  40. package/es/toolbar/src/toolbar.js +163 -63
  41. package/es/ui/index.js +12 -1
  42. package/es/ui/src/log.js +1 -1
  43. package/es/vxe-table/style.css +22 -3
  44. package/es/vxe-table/style.min.css +1 -1
  45. package/lib/grid/src/grid.js +81 -82
  46. package/lib/grid/src/grid.min.js +1 -1
  47. package/lib/{iconfont.1749800510225.ttf → iconfont.1750153781820.ttf} +0 -0
  48. package/lib/iconfont.1750153781820.woff +0 -0
  49. package/lib/iconfont.1750153781820.woff2 +0 -0
  50. package/lib/index.css +1 -1
  51. package/lib/index.min.css +1 -1
  52. package/lib/index.umd.js +495 -288
  53. package/lib/index.umd.min.js +1 -1
  54. package/lib/locale/lang/ar-EG.js +6 -0
  55. package/lib/locale/lang/ar-EG.min.js +1 -1
  56. package/lib/locale/lang/ar-EG.umd.js +6 -0
  57. package/lib/locale/lang/de-DE.js +6 -0
  58. package/lib/locale/lang/de-DE.min.js +1 -1
  59. package/lib/locale/lang/de-DE.umd.js +6 -0
  60. package/lib/locale/lang/en-US.js +6 -0
  61. package/lib/locale/lang/en-US.min.js +1 -1
  62. package/lib/locale/lang/en-US.umd.js +6 -0
  63. package/lib/locale/lang/es-ES.js +6 -0
  64. package/lib/locale/lang/es-ES.min.js +1 -1
  65. package/lib/locale/lang/es-ES.umd.js +6 -0
  66. package/lib/locale/lang/fr-FR.js +6 -0
  67. package/lib/locale/lang/fr-FR.min.js +1 -1
  68. package/lib/locale/lang/fr-FR.umd.js +6 -0
  69. package/lib/locale/lang/hu-HU.js +6 -0
  70. package/lib/locale/lang/hu-HU.min.js +1 -1
  71. package/lib/locale/lang/hu-HU.umd.js +6 -0
  72. package/lib/locale/lang/hy-AM.js +6 -0
  73. package/lib/locale/lang/hy-AM.min.js +1 -1
  74. package/lib/locale/lang/hy-AM.umd.js +6 -0
  75. package/lib/locale/lang/id-ID.js +6 -0
  76. package/lib/locale/lang/id-ID.min.js +1 -1
  77. package/lib/locale/lang/id-ID.umd.js +6 -0
  78. package/lib/locale/lang/it-IT.js +6 -0
  79. package/lib/locale/lang/it-IT.min.js +1 -1
  80. package/lib/locale/lang/it-IT.umd.js +6 -0
  81. package/lib/locale/lang/ja-JP.js +6 -0
  82. package/lib/locale/lang/ja-JP.min.js +1 -1
  83. package/lib/locale/lang/ja-JP.umd.js +6 -0
  84. package/lib/locale/lang/ko-KR.js +6 -0
  85. package/lib/locale/lang/ko-KR.min.js +1 -1
  86. package/lib/locale/lang/ko-KR.umd.js +6 -0
  87. package/lib/locale/lang/ms-MY.js +6 -0
  88. package/lib/locale/lang/ms-MY.min.js +1 -1
  89. package/lib/locale/lang/ms-MY.umd.js +6 -0
  90. package/lib/locale/lang/nb-NO.js +6 -0
  91. package/lib/locale/lang/nb-NO.min.js +1 -1
  92. package/lib/locale/lang/nb-NO.umd.js +6 -0
  93. package/lib/locale/lang/pt-BR.js +6 -0
  94. package/lib/locale/lang/pt-BR.min.js +1 -1
  95. package/lib/locale/lang/pt-BR.umd.js +6 -0
  96. package/lib/locale/lang/ru-RU.js +6 -0
  97. package/lib/locale/lang/ru-RU.min.js +1 -1
  98. package/lib/locale/lang/ru-RU.umd.js +6 -0
  99. package/lib/locale/lang/th-TH.js +6 -0
  100. package/lib/locale/lang/th-TH.min.js +1 -1
  101. package/lib/locale/lang/th-TH.umd.js +6 -0
  102. package/lib/locale/lang/ug-CN.js +6 -0
  103. package/lib/locale/lang/ug-CN.min.js +1 -1
  104. package/lib/locale/lang/ug-CN.umd.js +6 -0
  105. package/lib/locale/lang/uk-UA.js +6 -0
  106. package/lib/locale/lang/uk-UA.min.js +1 -1
  107. package/lib/locale/lang/uk-UA.umd.js +6 -0
  108. package/lib/locale/lang/uz-UZ.js +6 -0
  109. package/lib/locale/lang/uz-UZ.min.js +1 -1
  110. package/lib/locale/lang/uz-UZ.umd.js +6 -0
  111. package/lib/locale/lang/vi-VN.js +6 -0
  112. package/lib/locale/lang/vi-VN.min.js +1 -1
  113. package/lib/locale/lang/vi-VN.umd.js +6 -0
  114. package/lib/locale/lang/zh-CHT.js +6 -0
  115. package/lib/locale/lang/zh-CHT.min.js +1 -1
  116. package/lib/locale/lang/zh-CHT.umd.js +6 -0
  117. package/lib/locale/lang/zh-CN.js +6 -0
  118. package/lib/locale/lang/zh-CN.min.js +1 -1
  119. package/lib/locale/lang/zh-CN.umd.js +6 -0
  120. package/lib/style.css +1 -1
  121. package/lib/style.min.css +1 -1
  122. package/lib/table/module/custom/mixin.js +32 -5
  123. package/lib/table/module/custom/mixin.min.js +1 -1
  124. package/lib/table/module/custom/panel.js +14 -2
  125. package/lib/table/module/custom/panel.min.js +1 -1
  126. package/lib/table/src/body.js +11 -11
  127. package/lib/table/src/body.min.js +1 -1
  128. package/lib/table/src/cell.js +14 -14
  129. package/lib/table/src/cell.min.js +1 -1
  130. package/lib/table/src/methods.js +38 -25
  131. package/lib/table/src/methods.min.js +1 -1
  132. package/lib/table/src/props.js +32 -8
  133. package/lib/table/src/table.js +64 -50
  134. package/lib/table/src/table.min.js +1 -1
  135. package/lib/table/style/style.css +22 -3
  136. package/lib/table/style/style.min.css +1 -1
  137. package/lib/toolbar/src/toolbar.js +189 -88
  138. package/lib/toolbar/src/toolbar.min.js +1 -1
  139. package/lib/ui/index.js +12 -1
  140. package/lib/ui/index.min.js +1 -1
  141. package/lib/ui/src/log.js +1 -1
  142. package/lib/ui/src/log.min.js +1 -1
  143. package/lib/vxe-table/style/style.css +22 -3
  144. package/lib/vxe-table/style/style.min.css +1 -1
  145. package/package.json +1 -1
  146. package/packages/grid/src/grid.ts +93 -54
  147. package/packages/locale/lang/ar-EG.ts +6 -0
  148. package/packages/locale/lang/de-DE.ts +6 -0
  149. package/packages/locale/lang/en-US.ts +6 -0
  150. package/packages/locale/lang/es-ES.ts +6 -0
  151. package/packages/locale/lang/fr-FR.ts +6 -0
  152. package/packages/locale/lang/hu-HU.ts +6 -0
  153. package/packages/locale/lang/hy-AM.ts +6 -0
  154. package/packages/locale/lang/id-ID.ts +6 -0
  155. package/packages/locale/lang/it-IT.ts +6 -0
  156. package/packages/locale/lang/ja-JP.ts +6 -0
  157. package/packages/locale/lang/ko-KR.ts +6 -0
  158. package/packages/locale/lang/ms-MY.ts +6 -0
  159. package/packages/locale/lang/nb-NO.ts +6 -0
  160. package/packages/locale/lang/pt-BR.ts +6 -0
  161. package/packages/locale/lang/ru-RU.ts +6 -0
  162. package/packages/locale/lang/th-TH.ts +6 -0
  163. package/packages/locale/lang/ug-CN.ts +6 -0
  164. package/packages/locale/lang/uk-UA.ts +6 -0
  165. package/packages/locale/lang/uz-UZ.ts +6 -0
  166. package/packages/locale/lang/vi-VN.ts +6 -0
  167. package/packages/locale/lang/zh-CHT.ts +6 -0
  168. package/packages/locale/lang/zh-CN.ts +6 -0
  169. package/packages/table/module/custom/mixin.ts +27 -3
  170. package/packages/table/module/custom/panel.ts +119 -106
  171. package/packages/table/src/body.ts +13 -10
  172. package/packages/table/src/cell.ts +12 -12
  173. package/packages/table/src/methods.ts +35 -26
  174. package/packages/table/src/props.ts +32 -8
  175. package/packages/table/src/table.ts +76 -49
  176. package/packages/toolbar/src/toolbar.ts +167 -62
  177. package/packages/ui/index.ts +11 -0
  178. package/styles/components/icon.scss +13 -1
  179. package/styles/components/table-module/custom.scss +9 -2
  180. package/styles/icon/iconfont.ttf +0 -0
  181. package/styles/icon/iconfont.woff +0 -0
  182. package/styles/icon/iconfont.woff2 +0 -0
  183. package/es/iconfont.1749800510225.woff +0 -0
  184. package/es/iconfont.1749800510225.woff2 +0 -0
  185. package/lib/iconfont.1749800510225.woff +0 -0
  186. package/lib/iconfont.1749800510225.woff2 +0 -0
@@ -44,7 +44,8 @@ export default {
44
44
  _saveCustom() {
45
45
  const $xeTable = this;
46
46
  const reactData = $xeTable;
47
- const { customOpts, customColumnList } = this;
47
+ const { customColumnList, aggHandleFields, rowGroupList } = reactData;
48
+ const customOpts = $xeTable.computeCustomOpts;
48
49
  const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts;
49
50
  XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
50
51
  if (parentColumn) {
@@ -77,7 +78,19 @@ export default {
77
78
  setTimeout(() => {
78
79
  reactData.isDragColMove = false;
79
80
  }, 1000);
80
- return $xeTable.saveCustomStore('confirm');
81
+ return $xeTable.saveCustomStore('confirm').then(() => {
82
+ if ($xeTable.handlePivotTableAggregateData) {
83
+ if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
84
+ // 改动聚合分组
85
+ if (aggHandleFields.length) {
86
+ $xeTable.setRowGroups(aggHandleFields);
87
+ }
88
+ else {
89
+ $xeTable.clearRowGroups();
90
+ }
91
+ }
92
+ }
93
+ });
81
94
  },
82
95
  _cancelCustom() {
83
96
  const $xeTable = this;
@@ -111,6 +124,7 @@ export default {
111
124
  const $xeTable = this;
112
125
  const reactData = $xeTable;
113
126
  const internalData = $xeTable;
127
+ const { rowGroupList } = reactData;
114
128
  const { collectColumn } = internalData;
115
129
  const customOpts = $xeTable.computeCustomOpts;
116
130
  const { checkMethod } = customOpts;
@@ -137,7 +151,19 @@ export default {
137
151
  });
138
152
  reactData.isCustomStatus = false;
139
153
  $xeTable.saveCustomStore('reset');
140
- return $xeTable.handleCustom();
154
+ return $xeTable.handleCustom().then(() => {
155
+ if ($xeTable.handlePivotTableAggregateData) {
156
+ const rowGroupFields = $xeTable.computeRowGroupFields;
157
+ if (rowGroupFields ? rowGroupFields.length : rowGroupList.length) {
158
+ if (rowGroupFields && rowGroupFields.length) {
159
+ $xeTable.setRowGroups(rowGroupFields);
160
+ }
161
+ else {
162
+ $xeTable.clearRowGroups();
163
+ }
164
+ }
165
+ }
166
+ });
141
167
  },
142
168
  _toggleCustomAllCheckbox() {
143
169
  const { customStore } = this;
@@ -88,9 +88,11 @@ const renderSimplePanel = (h, _vm) => {
88
88
  const VxeUIButtonComponent = VxeUI.getComponent('VxeButton');
89
89
  const props = _vm;
90
90
  const $xeTable = _vm.$xeTable;
91
+ const tableProps = $xeTable;
91
92
  const reactData = $xeTable;
92
93
  const $xeGrid = $xeTable.$xeGrid;
93
94
  const { customStore } = props;
95
+ const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
94
96
  const { isCustomStatus, customColumnList } = reactData;
95
97
  const customOpts = $xeTable.computeCustomOpts;
96
98
  const { immediate } = customOpts;
@@ -261,124 +263,135 @@ const renderSimplePanel = (h, _vm) => {
261
263
  : {}
262
264
  }, customStore.visible
263
265
  ? [
266
+ !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel
267
+ ? h($xeTable.getPivotTableAggregateSimplePanel(), {
268
+ props: {
269
+ customStore
270
+ }
271
+ })
272
+ : renderEmptyElement($xeTable),
264
273
  h('div', {
265
- class: 'vxe-table-custom--header'
266
- }, headerSlot
267
- ? $xeTable.callSlot(headerSlot, params, h)
268
- : [
269
- h('ul', {
270
- class: 'vxe-table-custom--panel-list'
271
- }, [
272
- h('li', {
273
- class: 'vxe-table-custom--option'
274
+ class: 'vxe-table-custom--handle-wrapper'
275
+ }, [
276
+ h('div', {
277
+ class: 'vxe-table-custom--header'
278
+ }, headerSlot
279
+ ? $xeTable.callSlot(headerSlot, params, h)
280
+ : [
281
+ h('ul', {
282
+ class: 'vxe-table-custom--panel-list'
274
283
  }, [
275
- allowVisible
276
- ? h('div', {
277
- class: ['vxe-table-custom--checkbox-option', {
278
- 'is--checked': isAllChecked,
279
- 'is--indeterminate': isAllIndeterminate
280
- }],
281
- attrs: {
282
- title: getI18n('vxe.table.allTitle')
283
- },
284
- on: {
285
- click: _vm.allOptionEvent
286
- }
287
- }, [
288
- h('span', {
289
- class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
290
- }),
291
- h('span', {
284
+ h('li', {
285
+ class: 'vxe-table-custom--option'
286
+ }, [
287
+ allowVisible
288
+ ? h('div', {
289
+ class: ['vxe-table-custom--checkbox-option', {
290
+ 'is--checked': isAllChecked,
291
+ 'is--indeterminate': isAllIndeterminate
292
+ }],
293
+ attrs: {
294
+ title: getI18n('vxe.table.allTitle')
295
+ },
296
+ on: {
297
+ click: _vm.allOptionEvent
298
+ }
299
+ }, [
300
+ h('span', {
301
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
302
+ }),
303
+ h('span', {
304
+ class: 'vxe-checkbox--label'
305
+ }, getI18n('vxe.toolbar.customAll'))
306
+ ])
307
+ : h('span', {
292
308
  class: 'vxe-checkbox--label'
293
- }, getI18n('vxe.toolbar.customAll'))
294
- ])
295
- : h('span', {
296
- class: 'vxe-checkbox--label'
297
- }, getI18n('vxe.table.customTitle'))
309
+ }, getI18n('vxe.table.customTitle'))
310
+ ])
298
311
  ])
299
- ])
312
+ ]),
313
+ h('div', {
314
+ ref: 'bodyElemRef',
315
+ class: 'vxe-table-custom--body'
316
+ }, [
317
+ topSlot
318
+ ? h('div', {
319
+ class: 'vxe-table-custom--panel-top'
320
+ }, $xeTable.callSlot(topSlot, params, h))
321
+ : renderEmptyElement($xeTable),
322
+ defaultSlot
323
+ ? h('div', {
324
+ class: 'vxe-table-custom--panel-body'
325
+ }, $xeTable.callSlot(defaultSlot, params, h))
326
+ : h('transition-group', {
327
+ class: 'vxe-table-custom--panel-list',
328
+ props: {
329
+ name: 'vxe-table-custom--list',
330
+ tag: 'ul'
331
+ },
332
+ on: customWrapperOns
333
+ }, colVNs),
334
+ bottomSlot
335
+ ? h('div', {
336
+ class: 'vxe-table-custom--panel-bottom'
337
+ }, $xeTable.callSlot(bottomSlot, params, h))
338
+ : renderEmptyElement($xeTable),
339
+ renderDragTip(h, _vm)
300
340
  ]),
301
- h('div', {
302
- ref: 'bodyElemRef',
303
- class: 'vxe-table-custom--body'
304
- }, [
305
- topSlot
306
- ? h('div', {
307
- class: 'vxe-table-custom--panel-top'
308
- }, $xeTable.callSlot(topSlot, params, h))
309
- : renderEmptyElement($xeTable),
310
- defaultSlot
341
+ customOpts.showFooter
311
342
  ? h('div', {
312
- class: 'vxe-table-custom--panel-body'
313
- }, $xeTable.callSlot(defaultSlot, params, h))
314
- : h('transition-group', {
315
- class: 'vxe-table-custom--panel-list',
316
- props: {
317
- name: 'vxe-table-custom--list',
318
- tag: 'ul'
319
- },
320
- on: customWrapperOns
321
- }, colVNs),
322
- bottomSlot
323
- ? h('div', {
324
- class: 'vxe-table-custom--panel-bottom'
325
- }, $xeTable.callSlot(bottomSlot, params, h))
326
- : renderEmptyElement($xeTable),
327
- renderDragTip(h, _vm)
328
- ]),
329
- customOpts.showFooter
330
- ? h('div', {
331
- class: 'vxe-table-custom--footer'
332
- }, footerSlot
333
- ? $xeTable.callSlot(footerSlot, params, h)
334
- : [
335
- h('div', {
336
- class: 'vxe-table-custom--footer-buttons'
337
- }, [
338
- h(VxeUIButtonComponent, {
339
- props: {
340
- mode: 'text',
341
- content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
342
- disabled: !isCustomStatus
343
- },
344
- on: {
345
- click: _vm.resetCustomEvent
346
- }
347
- }),
348
- immediate
349
- ? h(VxeUIButtonComponent, {
350
- props: {
351
- mode: 'text',
352
- content: customOpts.closeButtonText || getI18n('vxe.table.customClose')
353
- },
354
- on: {
355
- click: _vm.cancelCloseEvent
356
- }
357
- })
358
- : h(VxeUIButtonComponent, {
343
+ class: 'vxe-table-custom--footer'
344
+ }, footerSlot
345
+ ? $xeTable.callSlot(footerSlot, params, h)
346
+ : [
347
+ h('div', {
348
+ class: 'vxe-table-custom--footer-buttons'
349
+ }, [
350
+ h(VxeUIButtonComponent, {
359
351
  props: {
360
352
  mode: 'text',
361
- content: customOpts.resetButtonText || getI18n('vxe.table.customCancel')
353
+ content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
354
+ disabled: !isCustomStatus
362
355
  },
363
356
  on: {
364
- click: _vm.cancelCustomEvent
357
+ click: _vm.resetCustomEvent
365
358
  }
366
359
  }),
367
- immediate
368
- ? renderEmptyElement($xeTable)
369
- : h(VxeUIButtonComponent, {
370
- props: {
371
- mode: 'text',
372
- status: 'primary',
373
- content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm')
374
- },
375
- on: {
376
- click: _vm.confirmCustomEvent
377
- }
378
- })
360
+ immediate
361
+ ? h(VxeUIButtonComponent, {
362
+ props: {
363
+ mode: 'text',
364
+ content: customOpts.closeButtonText || getI18n('vxe.table.customClose')
365
+ },
366
+ on: {
367
+ click: _vm.cancelCloseEvent
368
+ }
369
+ })
370
+ : h(VxeUIButtonComponent, {
371
+ props: {
372
+ mode: 'text',
373
+ content: customOpts.resetButtonText || getI18n('vxe.table.customCancel')
374
+ },
375
+ on: {
376
+ click: _vm.cancelCustomEvent
377
+ }
378
+ }),
379
+ immediate
380
+ ? renderEmptyElement($xeTable)
381
+ : h(VxeUIButtonComponent, {
382
+ props: {
383
+ mode: 'text',
384
+ status: 'primary',
385
+ content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm')
386
+ },
387
+ on: {
388
+ click: _vm.confirmCustomEvent
389
+ }
390
+ })
391
+ ])
379
392
  ])
380
- ])
381
- : null
393
+ : null
394
+ ])
382
395
  ]
383
396
  : []);
384
397
  };
@@ -564,7 +564,7 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
564
564
  const { showOverflow } = expandColumn || {};
565
565
  const colid = expandColumn.id;
566
566
  const colRest = fullColumnIdData[colid] || {};
567
- const hasEllipsis = (XEUtils.isUndefined(showOverflow) || XEUtils.isNull(showOverflow)) ? isAllOverflow : showOverflow;
567
+ const hasEllipsis = XEUtils.eqNull(showOverflow) ? isAllOverflow : showOverflow;
568
568
  let columnIndex = -1;
569
569
  let $columnIndex = -1;
570
570
  let _columnIndex = -1;
@@ -680,7 +680,8 @@ export default {
680
680
  const tableReactData = $xeTable;
681
681
  const tableInternalData = $xeTable;
682
682
  const $xeGrid = $xeTable.$xeGrid;
683
- const { xID, $scopedSlots } = $xeTable;
683
+ const slots = $xeTable.$scopedSlots;
684
+ const { xID } = $xeTable;
684
685
  const { fixedColumn, fixedType, tableColumn } = props;
685
686
  const { spanMethod, footerSpanMethod, mouseConfig } = tableProps;
686
687
  const { isGroup, tableData, isRowLoading, isColLoading, overflowX, scrollXLoad, scrollYLoad, isAllOverflow, isDragRowMove, expandColumn, dragRow, dragCol } = tableReactData;
@@ -759,14 +760,16 @@ export default {
759
760
  }
760
761
  }
761
762
  let emptyContent;
762
- if ($scopedSlots.empty) {
763
- emptyContent = $scopedSlots.empty.call(this, { $table: $xeTable, $grid: $xeGrid });
763
+ const emptySlot = slots ? slots.empty : null;
764
+ const emptyParams = { $table: $xeTable, $grid: $xeGrid };
765
+ if (emptySlot) {
766
+ emptyContent = emptySlot.call($xeTable, emptyParams);
764
767
  }
765
768
  else {
766
769
  const compConf = emptyOpts.name ? renderer.get(emptyOpts.name) : null;
767
770
  const rtEmptyView = compConf ? (compConf.renderTableEmpty || compConf.renderTableEmptyView || compConf.renderEmpty) : null;
768
771
  if (rtEmptyView) {
769
- emptyContent = getSlotVNs(rtEmptyView.call(this, h, emptyOpts, { $table: $xeTable }));
772
+ emptyContent = getSlotVNs(rtEmptyView.call($xeTable, h, emptyOpts, emptyParams));
770
773
  }
771
774
  else {
772
775
  emptyContent = tableProps.emptyText || getI18n('vxe.table.emptyText');
@@ -358,18 +358,6 @@ export const Cell = {
358
358
  const { isRowGroupStatus } = tableReactData;
359
359
  const { field, slots, editRender, cellRender, rowGroupNode, aggFunc } = column;
360
360
  const renderOpts = editRender || cellRender;
361
- if (slots && slots.default) {
362
- return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h));
363
- }
364
- if (renderOpts) {
365
- const compConf = renderer.get(renderOpts.name);
366
- const rtDefault = compConf ? (compConf.renderTableDefault || compConf.renderDefault) : null;
367
- const rtCell = compConf ? (compConf.renderTableCell || compConf.renderCell) : null;
368
- const renderFn = editRender ? rtCell : rtDefault;
369
- if (renderFn) {
370
- return renderCellBaseVNs(h, params, getSlotVNs(renderFn.call($table, h, renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params))));
371
- }
372
- }
373
361
  let cellValue = '';
374
362
  if (isRowGroupStatus && field && row.isAggregate) {
375
363
  const aggRow = row;
@@ -417,6 +405,18 @@ export const Cell = {
417
405
  }
418
406
  }
419
407
  else {
408
+ if (slots && slots.default) {
409
+ return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h));
410
+ }
411
+ if (renderOpts) {
412
+ const compConf = renderer.get(renderOpts.name);
413
+ const rtDefault = compConf ? (compConf.renderTableDefault || compConf.renderDefault) : null;
414
+ const rtCell = compConf ? (compConf.renderTableCell || compConf.renderCell) : null;
415
+ const renderFn = editRender ? rtCell : rtDefault;
416
+ if (renderFn) {
417
+ return renderCellBaseVNs(h, params, getSlotVNs(renderFn.call($table, h, renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params))));
418
+ }
419
+ }
420
420
  cellValue = $table.getCellLabel(row, column);
421
421
  }
422
422
  const cellPlaceholder = editRender ? editRender.placeholder : '';
@@ -23,6 +23,9 @@ function eqCellValue(row1, row2, field) {
23
23
  }
24
24
  return XEUtils.isEqual(val1, val2);
25
25
  }
26
+ function hangleStorageDefaultValue(value, isAll) {
27
+ return XEUtils.isBoolean(value) ? value : isAll;
28
+ }
26
29
  function getNextSortOrder($xeTable, column) {
27
30
  const sortOpts = $xeTable.computeSortOpts;
28
31
  const { orders = [] } = sortOpts;
@@ -157,13 +160,13 @@ function restoreCustomStorage($xeTable) {
157
160
  const { customConfig } = props;
158
161
  const tableId = $xeTable.computeTableId;
159
162
  const customOpts = $xeTable.computeCustomOpts;
160
- const { storage, restoreStore } = customOpts;
163
+ const { storage, restoreStore, storeOptions } = customOpts;
161
164
  const isAllCustom = storage === true;
162
- const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
163
- const isCustomResizable = isAllCustom || storageOpts.resizable;
164
- const isCustomVisible = isAllCustom || storageOpts.visible;
165
- const isCustomFixed = isAllCustom || storageOpts.fixed;
166
- const isCustomSort = isAllCustom || storageOpts.sort;
165
+ const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {}, storeOptions);
166
+ const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
167
+ const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
168
+ const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
169
+ const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
167
170
  if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
168
171
  if (!tableId) {
169
172
  errLog('vxe.error.reqProp', ['id']);
@@ -2610,13 +2613,18 @@ function handleRecalculateLayout($xeTable, reFull) {
2610
2613
  }
2611
2614
  const handleUpdateRowGroup = ($xeTable, groupFields) => {
2612
2615
  const reactData = $xeTable;
2613
- reactData.rowGroupList = groupFields
2614
- ? (XEUtils.isArray(groupFields) ? groupFields : [groupFields]).map(field => {
2615
- return {
2616
+ const aggFields = [];
2617
+ const aggConfs = [];
2618
+ if (groupFields) {
2619
+ (XEUtils.isArray(groupFields) ? groupFields : [groupFields]).forEach(field => {
2620
+ aggFields.push(field);
2621
+ aggConfs.push({
2616
2622
  field
2617
- };
2618
- })
2619
- : [];
2623
+ });
2624
+ });
2625
+ }
2626
+ reactData.rowGroupList = aggConfs;
2627
+ reactData.aggHandleFields = aggFields;
2620
2628
  };
2621
2629
  function handleeGroupSummary($xeTable, aggList) {
2622
2630
  const aggregateOpts = $xeTable.computeAggregateOpts;
@@ -2803,9 +2811,9 @@ function loadTableData($xeTable, datas, isReset) {
2803
2811
  internalData.cvCacheMaps = {};
2804
2812
  reactData.isRowLoading = true;
2805
2813
  reactData.scrollVMLoading = false;
2806
- internalData.treeExpandedMaps = {};
2814
+ // internalData.treeExpandedMaps = {}
2807
2815
  reactData.treeExpandedFlag++;
2808
- internalData.rowExpandedMaps = {};
2816
+ // internalData.rowExpandedMaps = {}
2809
2817
  reactData.rowExpandedFlag++;
2810
2818
  internalData.insertRowMaps = {};
2811
2819
  reactData.insertRowFlag++;
@@ -4906,13 +4914,13 @@ const Methods = {
4906
4914
  const { customConfig } = props;
4907
4915
  const tableId = $xeTable.computeTableId;
4908
4916
  const customOpts = $xeTable.computeCustomOpts;
4909
- const { storage, restoreStore } = customOpts;
4917
+ const { storage, restoreStore, storeOptions } = customOpts;
4910
4918
  const isAllCustom = storage === true;
4911
- const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
4912
- const isCustomResizable = isAllCustom || storageOpts.resizable;
4913
- const isCustomVisible = isAllCustom || storageOpts.visible;
4914
- const isCustomFixed = isAllCustom || storageOpts.fixed;
4915
- const isCustomSort = isAllCustom || storageOpts.sort;
4919
+ const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {}, storeOptions);
4920
+ const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
4921
+ const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
4922
+ const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
4923
+ const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
4916
4924
  if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
4917
4925
  if (!tableId) {
4918
4926
  errLog('vxe.error.reqProp', ['id']);
@@ -4939,13 +4947,13 @@ const Methods = {
4939
4947
  const { id } = props;
4940
4948
  const customOpts = $xeTable.computeCustomOpts;
4941
4949
  const { collectColumn } = internalData;
4942
- const { storage, checkMethod } = customOpts;
4950
+ const { storage, checkMethod, storeOptions } = customOpts;
4943
4951
  const isAllCustom = storage === true;
4944
- const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
4945
- const isCustomResizable = isAllCustom || storageOpts.resizable;
4946
- const isCustomVisible = isAllCustom || storageOpts.visible;
4947
- const isCustomFixed = isAllCustom || storageOpts.fixed;
4948
- const isCustomSort = isAllCustom || storageOpts.sort;
4952
+ const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {}, storeOptions);
4953
+ const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
4954
+ const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
4955
+ const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
4956
+ const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
4949
4957
  const resizableData = {};
4950
4958
  const sortData = {};
4951
4959
  const visibleData = {};
@@ -144,11 +144,20 @@ export default {
144
144
  // 设置表尾所有内容过长时显示为省略号
145
145
  showFooterOverflow: { type: [Boolean, String], default: () => getConfig().table.showFooterOverflow },
146
146
  /** 高级属性 */
147
- // (即将废弃)columnKey 已废弃,被 column-config.useKey 替换
147
+ /**
148
+ * (即将废弃)columnKey 已废弃,被 column-config.useKey 替换
149
+ * @deprecated
150
+ */
148
151
  columnKey: Boolean,
149
- // (即将废弃)rowKey 已废弃,被 row-config.useKey 替换
152
+ /**
153
+ * (即将废弃)rowKey 已废弃,被 row-config.useKey 替换
154
+ * @deprecated
155
+ */
150
156
  rowKey: Boolean,
151
- // (即将废弃)rowId 已废弃,被 row-config.keyField 替换
157
+ /**
158
+ * (即将废弃)rowId 已废弃,被 row-config.keyField 替换
159
+ * @deprecated
160
+ */
152
161
  rowId: { type: String, default: () => getConfig().table.rowId },
153
162
  zIndex: Number,
154
163
  emptyText: { type: String, default: () => getConfig().table.emptyText },
@@ -173,11 +182,17 @@ export default {
173
182
  rowConfig: Object,
174
183
  // 数据聚合配置项
175
184
  aggregateConfig: Object,
176
- // 已废弃,被 aggregateConfig 替换
185
+ /**
186
+ * 已废弃,被 aggregateConfig 替换
187
+ * @deprecated
188
+ */
177
189
  rowGroupConfig: Object,
178
190
  // 当前行配置项
179
191
  currentRowConfig: Object,
180
- // 已废弃,被 rowDragConfig 替换
192
+ /**
193
+ * 已废弃,被 rowDragConfig 替换
194
+ * @deprecated
195
+ */
181
196
  dragConfig: Object,
182
197
  // 行拖拽排序配置项
183
198
  rowDragConfig: Object,
@@ -209,7 +224,10 @@ export default {
209
224
  treeConfig: [Boolean, Object],
210
225
  // 快捷菜单配置项
211
226
  menuConfig: [Boolean, Object],
212
- // 在 v4 中废弃 contextMenu
227
+ /**
228
+ * 在 v4 中废弃 contextMenu
229
+ * @deprecated
230
+ */
213
231
  contextMenu: [Boolean, Object],
214
232
  // 鼠标配置项
215
233
  mouseConfig: Object,
@@ -233,9 +251,15 @@ export default {
233
251
  emptyRender: [Boolean, Object],
234
252
  // 自定义列配置项
235
253
  customConfig: Object,
236
- // (即将废弃)横向虚拟滚动配置项
254
+ /**
255
+ * (即将废弃)横向虚拟滚动配置项
256
+ * @deprecated
257
+ */
237
258
  scrollX: Object,
238
- // (即将废弃)纵向虚拟滚动配置项
259
+ /**
260
+ * (即将废弃)纵向虚拟滚动配置项
261
+ * @deprecated
262
+ */
239
263
  scrollY: Object,
240
264
  // 横向虚拟滚动配置项
241
265
  virtualXConfig: Object,