vxe-table 4.19.2 → 4.19.3

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 (165) hide show
  1. package/dist/all.esm.js +278 -97
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/index.css +1 -1
  5. package/es/index.min.css +1 -1
  6. package/es/locale/lang/ar-EG.js +4 -0
  7. package/es/locale/lang/de-DE.js +4 -0
  8. package/es/locale/lang/en-US.js +4 -0
  9. package/es/locale/lang/es-ES.js +4 -0
  10. package/es/locale/lang/fr-FR.js +4 -0
  11. package/es/locale/lang/hu-HU.js +4 -0
  12. package/es/locale/lang/hy-AM.js +4 -0
  13. package/es/locale/lang/id-ID.js +4 -0
  14. package/es/locale/lang/it-IT.js +4 -0
  15. package/es/locale/lang/ja-JP.js +4 -0
  16. package/es/locale/lang/ko-KR.js +4 -0
  17. package/es/locale/lang/ms-MY.js +4 -0
  18. package/es/locale/lang/nb-NO.js +4 -0
  19. package/es/locale/lang/pt-BR.js +4 -0
  20. package/es/locale/lang/ru-RU.js +4 -0
  21. package/es/locale/lang/th-TH.js +4 -0
  22. package/es/locale/lang/ug-CN.js +4 -0
  23. package/es/locale/lang/uk-UA.js +4 -0
  24. package/es/locale/lang/uz-UZ.js +4 -0
  25. package/es/locale/lang/vi-VN.js +4 -0
  26. package/es/locale/lang/zh-CHT.js +4 -0
  27. package/es/locale/lang/zh-CN.js +4 -0
  28. package/es/style.css +1 -1
  29. package/es/style.min.css +1 -1
  30. package/es/table/module/custom/panel.js +28 -20
  31. package/es/table/module/export/export-panel.js +27 -16
  32. package/es/table/module/export/hook.js +120 -27
  33. package/es/table/src/table.js +94 -31
  34. package/es/table/src/util.js +3 -1
  35. package/es/table/style.css +1 -1
  36. package/es/table/style.min.css +1 -1
  37. package/es/ui/index.js +1 -1
  38. package/es/ui/src/log.js +1 -1
  39. package/es/vxe-table/style.css +1 -1
  40. package/es/vxe-table/style.min.css +1 -1
  41. package/lib/index.css +1 -1
  42. package/lib/index.min.css +1 -1
  43. package/lib/index.umd.js +204 -67
  44. package/lib/index.umd.min.js +1 -1
  45. package/lib/locale/lang/ar-EG.js +4 -0
  46. package/lib/locale/lang/ar-EG.min.js +1 -1
  47. package/lib/locale/lang/ar-EG.umd.js +4 -0
  48. package/lib/locale/lang/de-DE.js +4 -0
  49. package/lib/locale/lang/de-DE.min.js +1 -1
  50. package/lib/locale/lang/de-DE.umd.js +4 -0
  51. package/lib/locale/lang/en-US.js +4 -0
  52. package/lib/locale/lang/en-US.min.js +1 -1
  53. package/lib/locale/lang/en-US.umd.js +4 -0
  54. package/lib/locale/lang/es-ES.js +4 -0
  55. package/lib/locale/lang/es-ES.min.js +1 -1
  56. package/lib/locale/lang/es-ES.umd.js +4 -0
  57. package/lib/locale/lang/fr-FR.js +4 -0
  58. package/lib/locale/lang/fr-FR.min.js +1 -1
  59. package/lib/locale/lang/fr-FR.umd.js +4 -0
  60. package/lib/locale/lang/hu-HU.js +4 -0
  61. package/lib/locale/lang/hu-HU.min.js +1 -1
  62. package/lib/locale/lang/hu-HU.umd.js +4 -0
  63. package/lib/locale/lang/hy-AM.js +4 -0
  64. package/lib/locale/lang/hy-AM.min.js +1 -1
  65. package/lib/locale/lang/hy-AM.umd.js +4 -0
  66. package/lib/locale/lang/id-ID.js +4 -0
  67. package/lib/locale/lang/id-ID.min.js +1 -1
  68. package/lib/locale/lang/id-ID.umd.js +4 -0
  69. package/lib/locale/lang/it-IT.js +4 -0
  70. package/lib/locale/lang/it-IT.min.js +1 -1
  71. package/lib/locale/lang/it-IT.umd.js +4 -0
  72. package/lib/locale/lang/ja-JP.js +4 -0
  73. package/lib/locale/lang/ja-JP.min.js +1 -1
  74. package/lib/locale/lang/ja-JP.umd.js +4 -0
  75. package/lib/locale/lang/ko-KR.js +4 -0
  76. package/lib/locale/lang/ko-KR.min.js +1 -1
  77. package/lib/locale/lang/ko-KR.umd.js +4 -0
  78. package/lib/locale/lang/ms-MY.js +4 -0
  79. package/lib/locale/lang/ms-MY.min.js +1 -1
  80. package/lib/locale/lang/ms-MY.umd.js +4 -0
  81. package/lib/locale/lang/nb-NO.js +4 -0
  82. package/lib/locale/lang/nb-NO.min.js +1 -1
  83. package/lib/locale/lang/nb-NO.umd.js +4 -0
  84. package/lib/locale/lang/pt-BR.js +4 -0
  85. package/lib/locale/lang/pt-BR.min.js +1 -1
  86. package/lib/locale/lang/pt-BR.umd.js +4 -0
  87. package/lib/locale/lang/ru-RU.js +4 -0
  88. package/lib/locale/lang/ru-RU.min.js +1 -1
  89. package/lib/locale/lang/ru-RU.umd.js +4 -0
  90. package/lib/locale/lang/th-TH.js +4 -0
  91. package/lib/locale/lang/th-TH.min.js +1 -1
  92. package/lib/locale/lang/th-TH.umd.js +4 -0
  93. package/lib/locale/lang/ug-CN.js +4 -0
  94. package/lib/locale/lang/ug-CN.min.js +1 -1
  95. package/lib/locale/lang/ug-CN.umd.js +4 -0
  96. package/lib/locale/lang/uk-UA.js +4 -0
  97. package/lib/locale/lang/uk-UA.min.js +1 -1
  98. package/lib/locale/lang/uk-UA.umd.js +4 -0
  99. package/lib/locale/lang/uz-UZ.js +4 -0
  100. package/lib/locale/lang/uz-UZ.min.js +1 -1
  101. package/lib/locale/lang/uz-UZ.umd.js +4 -0
  102. package/lib/locale/lang/vi-VN.js +4 -0
  103. package/lib/locale/lang/vi-VN.min.js +1 -1
  104. package/lib/locale/lang/vi-VN.umd.js +4 -0
  105. package/lib/locale/lang/zh-CHT.js +4 -0
  106. package/lib/locale/lang/zh-CHT.min.js +1 -1
  107. package/lib/locale/lang/zh-CHT.umd.js +4 -0
  108. package/lib/locale/lang/zh-CN.js +4 -0
  109. package/lib/locale/lang/zh-CN.min.js +1 -1
  110. package/lib/locale/lang/zh-CN.umd.js +4 -0
  111. package/lib/style.css +1 -1
  112. package/lib/style.min.css +1 -1
  113. package/lib/table/module/custom/panel.js +29 -18
  114. package/lib/table/module/custom/panel.min.js +1 -1
  115. package/lib/table/module/export/export-panel.js +22 -13
  116. package/lib/table/module/export/export-panel.min.js +1 -1
  117. package/lib/table/module/export/hook.js +139 -28
  118. package/lib/table/module/export/hook.min.js +1 -1
  119. package/lib/table/src/table.js +5 -5
  120. package/lib/table/src/table.min.js +1 -1
  121. package/lib/table/src/util.js +3 -1
  122. package/lib/table/src/util.min.js +1 -1
  123. package/lib/table/style/style.css +1 -1
  124. package/lib/table/style/style.min.css +1 -1
  125. package/lib/ui/index.js +1 -1
  126. package/lib/ui/index.min.js +1 -1
  127. package/lib/ui/src/log.js +1 -1
  128. package/lib/ui/src/log.min.js +1 -1
  129. package/lib/vxe-table/style/style.css +1 -1
  130. package/lib/vxe-table/style/style.min.css +1 -1
  131. package/package.json +2 -2
  132. package/packages/locale/lang/ar-EG.ts +4 -0
  133. package/packages/locale/lang/de-DE.ts +4 -0
  134. package/packages/locale/lang/en-US.ts +4 -0
  135. package/packages/locale/lang/es-ES.ts +4 -0
  136. package/packages/locale/lang/fr-FR.ts +4 -0
  137. package/packages/locale/lang/hu-HU.ts +4 -0
  138. package/packages/locale/lang/hy-AM.ts +4 -0
  139. package/packages/locale/lang/id-ID.ts +4 -0
  140. package/packages/locale/lang/it-IT.ts +4 -0
  141. package/packages/locale/lang/ja-JP.ts +4 -0
  142. package/packages/locale/lang/ko-KR.ts +4 -0
  143. package/packages/locale/lang/ms-MY.ts +4 -0
  144. package/packages/locale/lang/nb-NO.ts +4 -0
  145. package/packages/locale/lang/pt-BR.ts +4 -0
  146. package/packages/locale/lang/ru-RU.ts +4 -0
  147. package/packages/locale/lang/th-TH.ts +4 -0
  148. package/packages/locale/lang/ug-CN.ts +4 -0
  149. package/packages/locale/lang/uk-UA.ts +4 -0
  150. package/packages/locale/lang/uz-UZ.ts +4 -0
  151. package/packages/locale/lang/vi-VN.ts +4 -0
  152. package/packages/locale/lang/zh-CHT.ts +4 -0
  153. package/packages/locale/lang/zh-CN.ts +4 -0
  154. package/packages/table/module/custom/panel.ts +29 -21
  155. package/packages/table/module/export/export-panel.ts +27 -16
  156. package/packages/table/module/export/hook.ts +121 -28
  157. package/packages/table/src/table.ts +96 -31
  158. package/packages/table/src/util.ts +3 -1
  159. package/styles/components/table-module/export.scss +1 -1
  160. /package/es/{iconfont.1779778422561.ttf → iconfont.1779843543280.ttf} +0 -0
  161. /package/es/{iconfont.1779778422561.woff → iconfont.1779843543280.woff} +0 -0
  162. /package/es/{iconfont.1779778422561.woff2 → iconfont.1779843543280.woff2} +0 -0
  163. /package/lib/{iconfont.1779778422561.ttf → iconfont.1779843543280.ttf} +0 -0
  164. /package/lib/{iconfont.1779778422561.woff → iconfont.1779843543280.woff} +0 -0
  165. /package/lib/{iconfont.1779778422561.woff2 → iconfont.1779843543280.woff2} +0 -0
package/dist/all.esm.js CHANGED
@@ -44,7 +44,7 @@ function eqEmptyValue(cellValue) {
44
44
  return cellValue === '' || XEUtils.eqNull(cellValue);
45
45
  }
46
46
 
47
- const version$1 = "4.19.2";
47
+ const version$1 = "4.19.3";
48
48
  VxeUI.version = version$1;
49
49
  VxeUI.tableVersion = version$1;
50
50
  VxeUI.setConfig({
@@ -556,7 +556,7 @@ const modal = {
556
556
  const defineVxeComponent = defineComponent;
557
557
 
558
558
  const { log } = VxeUI;
559
- const version = `table v${"4.19.2"}`;
559
+ const version = `table v${"4.19.3"}`;
560
560
  const warnLog = log.create('warn', version);
561
561
  const errLog = log.create('error', version);
562
562
 
@@ -1262,6 +1262,7 @@ function createReactData$2() {
1262
1262
  hasFooter: false,
1263
1263
  hasMerge: false,
1264
1264
  hasTree: false,
1265
+ hasRowGroup: false,
1265
1266
  hasColgroup: false,
1266
1267
  visible: false
1267
1268
  },
@@ -1272,7 +1273,8 @@ function createReactData$2() {
1272
1273
  type: '',
1273
1274
  isColgroup: false,
1274
1275
  isMerge: false,
1275
- isAllExpand: false,
1276
+ isTreeAllExpanded: false,
1277
+ isRowGroupAllExpanded: false,
1276
1278
  useStyle: false,
1277
1279
  original: false,
1278
1280
  message: true,
@@ -5916,7 +5918,7 @@ var TableCustomPanelComponent = defineVxeComponent({
5916
5918
  const { immediate } = customOpts;
5917
5919
  const trEl = evnt.currentTarget;
5918
5920
  const columnDragOpts = computeColumnDragOpts.value;
5919
- const { isCrossDrag, isSelfToChildDrag, isToChildDrag, dragEndMethod } = columnDragOpts;
5921
+ const { isCrossDrag, isPeerDrag, isSelfToChildDrag, isToChildDrag, dragEndMethod } = columnDragOpts;
5920
5922
  const { dragCol } = customPanelReactData;
5921
5923
  const { prevDragCol, prevDragGroupField, prevDragAggFnColid, prevDragPos, prevDragToChild } = customPanelInternalData;
5922
5924
  const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
@@ -5954,20 +5956,28 @@ var TableCustomPanelComponent = defineVxeComponent({
5954
5956
  if (immediate) {
5955
5957
  if (dragColumn.parentId && newColumn.parentId) {
5956
5958
  // 子到子
5957
- if (!isCrossDrag) {
5958
- return;
5959
+ if (isPeerDrag && !isCrossDrag) {
5960
+ if (dragColumn.parentId !== newColumn.parentId) {
5961
+ // 非同级
5962
+ return;
5963
+ }
5959
5964
  }
5960
- if (oldAllMaps[newColumn.id]) {
5961
- isSelfToChildStatus = true;
5962
- if (!(isCrossDrag && isSelfToChildDrag)) {
5963
- if (VxeUI.modal) {
5964
- VxeUI.modal.message({
5965
- status: 'error',
5966
- content: getI18n$a('vxe.error.treeDragChild')
5967
- });
5968
- }
5965
+ else {
5966
+ if (!isCrossDrag) {
5969
5967
  return;
5970
5968
  }
5969
+ if (oldAllMaps[newColumn.id]) {
5970
+ isSelfToChildStatus = true;
5971
+ if (!(isCrossDrag && isSelfToChildDrag)) {
5972
+ if (VxeUI.modal) {
5973
+ VxeUI.modal.message({
5974
+ status: 'error',
5975
+ content: getI18n$a('vxe.error.treeDragChild')
5976
+ });
5977
+ }
5978
+ return;
5979
+ }
5980
+ }
5971
5981
  }
5972
5982
  }
5973
5983
  else if (dragColumn.parentId) {
@@ -6092,7 +6102,7 @@ var TableCustomPanelComponent = defineVxeComponent({
6092
6102
  const customOpts = computeCustomOpts.value;
6093
6103
  const { showSortDragButton, allowSort, immediate } = customOpts;
6094
6104
  const columnDragOpts = computeColumnDragOpts.value;
6095
- const { isCrossDrag, isToChildDrag } = columnDragOpts;
6105
+ const { isCrossDrag, isPeerDrag, isToChildDrag } = columnDragOpts;
6096
6106
  const optEl = evnt.currentTarget;
6097
6107
  const isControlKey = hasControlKey(evnt);
6098
6108
  const colid = optEl.getAttribute('colid');
@@ -6101,16 +6111,16 @@ var TableCustomPanelComponent = defineVxeComponent({
6101
6111
  customPanelInternalData.prevDragGroupField = null;
6102
6112
  customPanelInternalData.prevDragAggFnColid = null;
6103
6113
  // 是否移入有效列
6104
- if (column && (isCrossDrag || column.level === 1)) {
6114
+ if (column && (isCrossDrag || isPeerDrag || column.level === 1)) {
6105
6115
  evnt.preventDefault();
6106
6116
  const offsetY = evnt.clientY - optEl.getBoundingClientRect().y;
6107
6117
  const dragPos = offsetY < optEl.clientHeight / 2 ? 'top' : 'bottom';
6108
6118
  if (!dragCol ||
6109
6119
  !(showSortDragButton && allowSort) ||
6110
6120
  (dragCol && dragCol.id === column.id) ||
6111
- (!isCrossDrag && column.level > 1) ||
6121
+ (!isCrossDrag && (isPeerDrag ? dragCol.parentId !== column.parentId : column.level > 1)) ||
6112
6122
  (!immediate && column.level > 1) ||
6113
- (!isCrossDrag && dragCol.level > 1) ||
6123
+ (!isCrossDrag && (isPeerDrag ? dragCol.parentId !== column.parentId : dragCol.level > 1)) ||
6114
6124
  (!immediate && dragCol.level > 1)) {
6115
6125
  showDropTip(evnt, optEl, false, dragPos);
6116
6126
  return;
@@ -6245,7 +6255,7 @@ var TableCustomPanelComponent = defineVxeComponent({
6245
6255
  const { immediate, checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, allowGroup, allowValues, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts;
6246
6256
  const isMaxFixedColumn = computeIsMaxFixedColumn.value;
6247
6257
  const vSize = computeSize.value;
6248
- const { isCrossDrag } = columnDragOpts;
6258
+ const { isCrossDrag, isPeerDrag } = columnDragOpts;
6249
6259
  const slots = customOpts.slots || {};
6250
6260
  const headerSlot = slots.header;
6251
6261
  const topSlot = slots.top;
@@ -6279,7 +6289,7 @@ var TableCustomPanelComponent = defineVxeComponent({
6279
6289
  const colTitle = formatText(column.getTitle(), 1);
6280
6290
  const isDisabled = checkMethod ? !checkMethod({ $table: $xeTable, column }) : false;
6281
6291
  const isHidden = !isChecked;
6282
- const showSortBtn = ((isCrossDrag ? immediate : false) || column.level === 1);
6292
+ const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1;
6283
6293
  colVNs.push(h('li', {
6284
6294
  key: column.id,
6285
6295
  colid: column.id,
@@ -6575,7 +6585,7 @@ var TableCustomPanelComponent = defineVxeComponent({
6575
6585
  const modalOpts = Object.assign({}, modalOptions);
6576
6586
  const drawerOpts = Object.assign({}, drawerOptions);
6577
6587
  const isMaxFixedColumn = computeIsMaxFixedColumn.value;
6578
- const { isCrossDrag } = columnDragOpts;
6588
+ const { isCrossDrag, isPeerDrag } = columnDragOpts;
6579
6589
  const slots = customOpts.slots || {};
6580
6590
  const headerSlot = slots.header;
6581
6591
  const topSlot = slots.top;
@@ -6622,7 +6632,7 @@ var TableCustomPanelComponent = defineVxeComponent({
6622
6632
  const isColGroup = column.children && column.children.length;
6623
6633
  const isDisabled = checkMethod ? !checkMethod({ $table: $xeTable, column }) : false;
6624
6634
  const isHidden = !isChecked;
6625
- const showSortBtn = ((isCrossDrag ? immediate : false) || column.level === 1);
6635
+ const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1;
6626
6636
  trVNs.push(h('tr', {
6627
6637
  key: column.id,
6628
6638
  colid: column.id,
@@ -7692,7 +7702,7 @@ var TableExportPanelComponent = defineVxeComponent({
7692
7702
  const $xeGantt = $xeTable.xeGantt;
7693
7703
  const { defaultOptions, storeData } = props;
7694
7704
  const { isAll: isAllChecked, isIndeterminate: isAllIndeterminate } = reactData;
7695
- const { hasTree, hasMerge, isPrint, hasColgroup, columns } = storeData;
7705
+ const { hasTree, hasRowGroup, hasMerge, isPrint, hasColgroup, columns } = storeData;
7696
7706
  const { isHeader } = defaultOptions;
7697
7707
  const colVNs = [];
7698
7708
  const checkedAll = computeCheckedAll.value;
@@ -7922,6 +7932,17 @@ var TableExportPanelComponent = defineVxeComponent({
7922
7932
  }
7923
7933
  })
7924
7934
  : renderEmptyElement$3($xeTable),
7935
+ VxeUICheckboxComponent
7936
+ ? h(VxeUICheckboxComponent, {
7937
+ modelValue: defaultOptions.isFooter,
7938
+ disabled: !storeData.hasFooter,
7939
+ title: getI18n$7('vxe.export.expFooterTitle'),
7940
+ content: getI18n$7('vxe.export.expOptFooter'),
7941
+ 'onUpdate:modelValue'(value) {
7942
+ defaultOptions.isFooter = value;
7943
+ }
7944
+ })
7945
+ : renderEmptyElement$3($xeTable),
7925
7946
  VxeUICheckboxComponent
7926
7947
  ? h(VxeUICheckboxComponent, {
7927
7948
  modelValue: isHeader ? defaultOptions.isTitle : false,
@@ -7980,30 +8001,30 @@ var TableExportPanelComponent = defineVxeComponent({
7980
8001
  'onUpdate:modelValue'(value) {
7981
8002
  defaultOptions.useStyle = value;
7982
8003
  }
7983
- }),
8004
+ })
8005
+ ]),
8006
+ h('div', {
8007
+ class: 'vxe-table-export--panel-option-row'
8008
+ }, [
7984
8009
  VxeUICheckboxComponent
7985
8010
  ? h(VxeUICheckboxComponent, {
7986
- modelValue: hasTree ? defaultOptions.isAllExpand : false,
8011
+ modelValue: hasTree ? defaultOptions.isTreeAllExpanded : false,
7987
8012
  disabled: hasEmptyData || !hasTree,
7988
- title: getI18n$7('vxe.export.expAllExpandTitle'),
7989
- content: getI18n$7('vxe.export.expOptAllExpand'),
8013
+ title: getI18n$7('vxe.export.expTreeAllExpandTitle'),
8014
+ content: getI18n$7('vxe.export.expOptTreeAllExpand'),
7990
8015
  'onUpdate:modelValue'(value) {
7991
- defaultOptions.isAllExpand = value;
8016
+ defaultOptions.isTreeAllExpanded = value;
7992
8017
  }
7993
8018
  })
7994
- : renderEmptyElement$3($xeTable)
7995
- ]),
7996
- h('div', {
7997
- class: 'vxe-table-export--panel-option-row'
7998
- }, [
8019
+ : renderEmptyElement$3($xeTable),
7999
8020
  VxeUICheckboxComponent
8000
8021
  ? h(VxeUICheckboxComponent, {
8001
- modelValue: defaultOptions.isFooter,
8002
- disabled: !storeData.hasFooter,
8003
- title: getI18n$7('vxe.export.expFooterTitle'),
8004
- content: getI18n$7('vxe.export.expOptFooter'),
8022
+ modelValue: hasRowGroup ? defaultOptions.isRowGroupAllExpanded : false,
8023
+ disabled: hasEmptyData || !hasRowGroup,
8024
+ title: getI18n$7('vxe.export.expRowGroupAllExpandTitle'),
8025
+ content: getI18n$7('vxe.export.expOptRowGroupAllExpand'),
8005
8026
  'onUpdate:modelValue'(value) {
8006
- defaultOptions.isFooter = value;
8027
+ defaultOptions.isRowGroupAllExpanded = value;
8007
8028
  }
8008
8029
  })
8009
8030
  : renderEmptyElement$3($xeTable)
@@ -10366,12 +10387,7 @@ const tableExportMethodKeys = ['exportData', 'importByFile', 'importData', 'save
10366
10387
  hooks$4.add('tableExportModule', {
10367
10388
  setupTable($xeTable) {
10368
10389
  const { props, reactData, internalData } = $xeTable;
10369
- const { computeTreeOpts, computePrintOpts, computeExportOpts, computeImportOpts, computeCustomOpts, computeSeqOpts, computeRadioOpts, computeCheckboxOpts, computeColumnOpts } = $xeTable.getComputeMaps();
10370
- const hasTreeChildren = (row) => {
10371
- const treeOpts = computeTreeOpts.value;
10372
- const childrenField = treeOpts.children || treeOpts.childrenField;
10373
- return row[childrenField] && row[childrenField].length;
10374
- };
10390
+ const { computeTreeOpts, computePrintOpts, computeExportOpts, computeImportOpts, computeCustomOpts, computeSeqOpts, computeRadioOpts, computeCheckboxOpts, computeColumnOpts, computeAggregateOpts } = $xeTable.getComputeMaps();
10375
10391
  const getSeq = (cellValue, row, $rowIndex, column, $columnIndex) => {
10376
10392
  const seqOpts = computeSeqOpts.value;
10377
10393
  const seqMd = seqOpts.seqMethod || column.seqMethod;
@@ -10402,32 +10418,119 @@ hooks$4.add('tableExportModule', {
10402
10418
  return eqEmptyValue(cellValue) ? '' : `${cellValue}`;
10403
10419
  };
10404
10420
  const getBodyLabelData = (opts, columns, datas) => {
10405
- const { isAllExpand, mode } = opts;
10421
+ const { isTreeAllExpanded, isRowGroupAllExpanded, mode } = opts;
10406
10422
  const { treeConfig } = props;
10423
+ const { isRowGroupStatus } = reactData;
10407
10424
  const radioOpts = computeRadioOpts.value;
10408
10425
  const checkboxOpts = computeCheckboxOpts.value;
10409
10426
  const treeOpts = computeTreeOpts.value;
10410
10427
  const columnOpts = computeColumnOpts.value;
10428
+ const aggregateOpts = computeAggregateOpts.value;
10411
10429
  if (!htmlCellElem) {
10412
10430
  htmlCellElem = document.createElement('div');
10413
10431
  }
10432
+ const { handleGetRowId } = createHandleGetRowId($xeTable);
10433
+ if (isRowGroupStatus) {
10434
+ // 如果是数据分组
10435
+ const { mapChildrenField } = aggregateOpts;
10436
+ const rest = [];
10437
+ const expandMaps = {};
10438
+ const useMaps = {};
10439
+ XEUtils.eachTree(datas, (item, $rowIndex, items, path, parentItem, nodes) => {
10440
+ const row = item._row || item;
10441
+ const rowid = handleGetRowId(row);
10442
+ if (useMaps[rowid]) {
10443
+ return;
10444
+ }
10445
+ const parentRow = parentItem && parentItem._row ? parentItem._row : parentItem;
10446
+ const pRowid = parentRow ? handleGetRowId(parentRow) : '';
10447
+ if ((isRowGroupAllExpanded || !parentRow || (expandMaps[pRowid] && $xeTable.isRowExpandByRow(parentRow)))) {
10448
+ const hasRowChild = mapChildrenField && row[mapChildrenField] && row[mapChildrenField].length;
10449
+ const item = {
10450
+ _row: row,
10451
+ _level: nodes.length - 1,
10452
+ _hasChild: hasRowChild,
10453
+ _expand: hasRowChild && $xeTable.isRowExpandByRow(row)
10454
+ };
10455
+ columns.forEach((column, $columnIndex) => {
10456
+ let cellValue = '';
10457
+ const renderOpts = column.editRender || column.cellRender;
10458
+ let bodyExportMethod = column.exportMethod || columnOpts.exportMethod;
10459
+ if (!bodyExportMethod && renderOpts && renderOpts.name) {
10460
+ const compConf = renderer$3.get(renderOpts.name);
10461
+ if (compConf) {
10462
+ bodyExportMethod = compConf.tableExportMethod || compConf.exportMethod;
10463
+ }
10464
+ }
10465
+ if (!bodyExportMethod) {
10466
+ bodyExportMethod = columnOpts.exportMethod;
10467
+ }
10468
+ if (bodyExportMethod) {
10469
+ cellValue = bodyExportMethod({ $table: $xeTable, row, column, options: opts });
10470
+ }
10471
+ else {
10472
+ switch (column.type) {
10473
+ case 'seq': {
10474
+ const seqVal = path.map((num, i) => i % 2 === 0 ? (Number(num) + 1) : '.').join('');
10475
+ cellValue = mode === 'all' ? seqVal : getSeq(seqVal, row, $rowIndex, column, $columnIndex);
10476
+ break;
10477
+ }
10478
+ case 'checkbox':
10479
+ cellValue = toBooleanValue($xeTable.isCheckedByCheckboxRow(row));
10480
+ item._checkboxLabel = checkboxOpts.labelField ? XEUtils.get(row, checkboxOpts.labelField) : '';
10481
+ item._checkboxDisabled = checkboxOpts.checkMethod && !checkboxOpts.checkMethod({ $table: $xeTable, row });
10482
+ break;
10483
+ case 'radio':
10484
+ cellValue = toBooleanValue($xeTable.isCheckedByRadioRow(row));
10485
+ item._radioLabel = radioOpts.labelField ? XEUtils.get(row, radioOpts.labelField) : '';
10486
+ item._radioDisabled = radioOpts.checkMethod && !radioOpts.checkMethod({ $table: $xeTable, row });
10487
+ break;
10488
+ default:
10489
+ if (opts.original) {
10490
+ cellValue = getCellValue(row, column);
10491
+ }
10492
+ else {
10493
+ cellValue = $xeTable.getCellLabel(row, column);
10494
+ if (column.type === 'html') {
10495
+ htmlCellElem.innerHTML = cellValue;
10496
+ cellValue = htmlCellElem.innerText.trim();
10497
+ }
10498
+ else {
10499
+ const cell = $xeTable.getCellElement(row, column);
10500
+ if (cell && !hasClass(cell, 'is--progress')) {
10501
+ cellValue = cell.innerText.trim();
10502
+ }
10503
+ }
10504
+ }
10505
+ }
10506
+ }
10507
+ item[column.id] = toStringValue(cellValue);
10508
+ });
10509
+ useMaps[rowid] = true;
10510
+ if (pRowid) {
10511
+ expandMaps[pRowid] = true;
10512
+ }
10513
+ rest.push(Object.assign(item, row));
10514
+ }
10515
+ }, { children: mapChildrenField });
10516
+ return rest;
10517
+ }
10414
10518
  if (treeConfig) {
10519
+ // 如果是树结构
10415
10520
  const childrenField = treeOpts.children || treeOpts.childrenField;
10416
- // 如果是树表格只允许导出数据源
10417
10521
  const rest = [];
10418
10522
  const expandMaps = {};
10419
10523
  const useMaps = {};
10420
- const { handleGetRowId } = createHandleGetRowId($xeTable);
10421
- XEUtils.eachTree(datas, (item, $rowIndex, items, path, parent, nodes) => {
10524
+ XEUtils.eachTree(datas, (item, $rowIndex, items, path, parentItem, nodes) => {
10422
10525
  const row = item._row || item;
10423
10526
  const rowid = handleGetRowId(row);
10424
10527
  if (useMaps[rowid]) {
10425
10528
  return;
10426
10529
  }
10427
- const parentRow = parent && parent._row ? parent._row : parent;
10530
+ const parentRow = parentItem && parentItem._row ? parentItem._row : parentItem;
10428
10531
  const pRowid = parentRow ? handleGetRowId(parentRow) : '';
10429
- if ((isAllExpand || !parentRow || (expandMaps[pRowid] && $xeTable.isTreeExpandByRow(parentRow)))) {
10430
- const hasRowChild = hasTreeChildren(row);
10532
+ if ((isTreeAllExpanded || !parentRow || (expandMaps[pRowid] && $xeTable.isTreeExpandByRow(parentRow)))) {
10533
+ const hasRowChild = row[childrenField] && row[childrenField].length;
10431
10534
  const item = {
10432
10535
  _row: row,
10433
10536
  _level: nodes.length - 1,
@@ -11082,10 +11185,11 @@ hooks$4.add('tableExportModule', {
11082
11185
  const $xeGantt = $xeTable.xeGantt;
11083
11186
  const $xeGGWrapper = $xeGrid || $xeGantt;
11084
11187
  const { treeConfig, showHeader, showFooter } = props;
11085
- const { initStore, isGroup, footerTableData, exportStore, exportParams } = reactData;
11188
+ const { initStore, isGroup, rowGroupList, footerTableData, exportStore, exportParams } = reactData;
11086
11189
  const { collectColumn, mergeBodyList, mergeFooterList } = internalData;
11087
11190
  const exportOpts = computeExportOpts.value;
11088
- const hasTree = treeConfig;
11191
+ const hasTree = !!treeConfig;
11192
+ const hasRowGroup = rowGroupList.length > 0;
11089
11193
  const customOpts = computeCustomOpts.value;
11090
11194
  const selectRecords = $xeTable.getCheckboxRecords();
11091
11195
  const proxyOpts = $xeGGWrapper ? $xeGGWrapper.getComputeMaps().computeProxyOpts.value : {};
@@ -11102,6 +11206,11 @@ hooks$4.add('tableExportModule', {
11102
11206
  current: 'current',
11103
11207
  modes: (proxyOpts.ajax && proxyOpts.ajax.queryAll ? ['all'] : []).concat(['current', 'selected', 'empty'])
11104
11208
  }, options);
11209
+ // 已废弃,参数 isAllExpand
11210
+ if (XEUtils.isBoolean(defOpts.isAllExpand)) {
11211
+ warnLog('vxe.error.delProp', ['isAllExpand', 'isTreeAllExpanded']);
11212
+ defOpts.isTreeAllExpanded = defOpts.isAllExpand;
11213
+ }
11105
11214
  const types = defOpts.types || XEUtils.keys(exportOpts._typeMaps);
11106
11215
  const modes = defOpts.modes || [];
11107
11216
  const checkMethod = customOpts.checkMethod;
@@ -11144,17 +11253,16 @@ hooks$4.add('tableExportModule', {
11144
11253
  column.disabled = (parent && parent.disabled) || (checkMethod ? !checkMethod({ $table: $xeTable, column }) : false);
11145
11254
  });
11146
11255
  // 更新条件
11147
- Object.assign(exportStore, {
11148
- columns: exportColumns,
11149
- typeList,
11150
- modeList,
11151
- hasFooter,
11152
- hasMerge,
11153
- hasTree,
11154
- isPrint,
11155
- hasColgroup: isGroup,
11156
- visible: true
11157
- });
11256
+ exportStore.columns = exportColumns;
11257
+ exportStore.typeList = typeList;
11258
+ exportStore.modeList = modeList;
11259
+ exportStore.hasFooter = hasFooter;
11260
+ exportStore.hasMerge = hasMerge;
11261
+ exportStore.hasTree = hasTree;
11262
+ exportStore.hasRowGroup = hasRowGroup;
11263
+ exportStore.isPrint = !!isPrint;
11264
+ exportStore.hasColgroup = isGroup;
11265
+ exportStore.visible = true;
11158
11266
  // 默认参数
11159
11267
  Object.assign(exportParams, {
11160
11268
  mode: selectRecords.length ? 'selected' : 'current'
@@ -11234,7 +11342,8 @@ hooks$4.add('tableExportModule', {
11234
11342
  // filename: '',
11235
11343
  // sheetName: '',
11236
11344
  // original: false,
11237
- // isAllExpand: false,
11345
+ // isTreeAllExpanded: false,
11346
+ // isRowGroupAllExpanded: false,
11238
11347
  // data: null,
11239
11348
  // remote: false,
11240
11349
  // dataFilterMethod: null,
@@ -11244,6 +11353,11 @@ hooks$4.add('tableExportModule', {
11244
11353
  // beforeExportMethod: null,
11245
11354
  // afterExportMethod: null
11246
11355
  }, exportOpts, options);
11356
+ // 已废弃,参数 isAllExpand
11357
+ if (XEUtils.isBoolean(opts.isAllExpand)) {
11358
+ warnLog('vxe.error.delProp', ['isAllExpand', 'isTreeAllExpanded']);
11359
+ opts.isTreeAllExpanded = opts.isAllExpand;
11360
+ }
11247
11361
  let { filename, sheetName, type, mode, columns, original, columnFilterMethod, beforeExportMethod, includeFields, excludeFields } = opts;
11248
11362
  let groups = [];
11249
11363
  const selectRecords = $xeTable.getCheckboxRecords();
@@ -14716,6 +14830,10 @@ var VxeTableComponent = defineVxeComponent({
14716
14830
  const computeRowGroupOpts = computed(() => {
14717
14831
  return computeAggregateOpts.value;
14718
14832
  });
14833
+ const computeAggregateMode = computed(() => {
14834
+ const aggregateOpts = computeAggregateOpts.value;
14835
+ return aggregateOpts.mode;
14836
+ });
14719
14837
  const computeAggregateAccuracyOpts = computed(() => {
14720
14838
  return Object.assign({}, getConfig$2().table.aggregateAccuracyConfig, props.aggregateAccuracyConfig);
14721
14839
  });
@@ -17894,12 +18012,12 @@ var VxeTableComponent = defineVxeComponent({
17894
18012
  handleeGroupSummary(aggList);
17895
18013
  }
17896
18014
  };
17897
- const handleGroupData = (list, rowGroups) => {
18015
+ const handleGroupData = (list, rowGroups, isCombinedField) => {
17898
18016
  let fullData = list;
17899
18017
  let treeData = list;
17900
18018
  if (rowGroups) {
17901
18019
  const aggregateOpts = computeAggregateOpts.value;
17902
- const { rowField, parentField, childrenField, mapChildrenField } = aggregateOpts;
18020
+ const { rowField, parentField, separator, childrenField, mapChildrenField } = aggregateOpts;
17903
18021
  const rowOpts = computeRowOpts.value;
17904
18022
  const checkboxOpts = computeCheckboxOpts.value;
17905
18023
  const { checkField } = checkboxOpts;
@@ -17911,11 +18029,26 @@ var VxeTableComponent = defineVxeComponent({
17911
18029
  const groupField = rgItem.field;
17912
18030
  const groupColumn = $xeTable.getColumnByField(groupField);
17913
18031
  const groupMaps = {};
18032
+ const groupCombinedMaps = {};
17914
18033
  const aggList = [];
17915
18034
  const rowkey = getRowkey($xeTable);
17916
18035
  list.forEach((row) => {
17917
18036
  const cellValue = groupColumn ? $xeTable.getCellLabel(row, groupColumn) : XEUtils.get(row, groupField);
17918
- const groupValue = XEUtils.eqNull(cellValue) ? '' : cellValue;
18037
+ let groupValue = XEUtils.eqNull(cellValue) ? '' : cellValue;
18038
+ if (isCombinedField) {
18039
+ const groupVals = [groupValue];
18040
+ rowGroups.slice(1).forEach(ogItem => {
18041
+ const ogField = ogItem.field;
18042
+ const ogColumn = $xeTable.getColumnByField(ogField);
18043
+ const ocValue = ogColumn ? $xeTable.getCellLabel(row, ogColumn) : XEUtils.get(row, ogField);
18044
+ const ogValue = XEUtils.eqNull(ocValue) ? '' : ocValue;
18045
+ groupValue += (separator || ' / ') + ogValue;
18046
+ groupVals.push(ogValue);
18047
+ });
18048
+ if (!groupCombinedMaps[groupValue]) {
18049
+ groupCombinedMaps[groupValue] = groupVals;
18050
+ }
18051
+ }
17919
18052
  let childList = groupMaps[groupValue];
17920
18053
  if (!childList) {
17921
18054
  childList = [];
@@ -17926,33 +18059,62 @@ var VxeTableComponent = defineVxeComponent({
17926
18059
  }
17927
18060
  childList.push(row);
17928
18061
  });
17929
- XEUtils.objectEach(groupMaps, (childList, groupValue) => {
17930
- const { fullData: childFullData, treeData: childTreeData } = handleGroupData(childList, rowGroups.slice(1));
17931
- const aggRow = {
17932
- isAggregate: true,
17933
- aggData: {},
17934
- groupContent: groupValue,
17935
- groupField,
17936
- childCount: 0,
17937
- [rowField]: getRowUniqueId(),
17938
- [parentField]: null,
17939
- [childrenField]: childTreeData,
17940
- [mapChildrenField]: childTreeData
17941
- };
17942
- aggRow[rowkey] = createRowId(rowOpts, aggRow, rowkey);
17943
- if (checkField) {
17944
- aggRow[checkField] = false;
17945
- }
17946
- if (indeterminateField) {
17947
- aggRow[indeterminateField] = false;
17948
- }
17949
- aggList.push(aggRow);
17950
- treeData.push(aggRow);
17951
- fullData.push(aggRow);
17952
- if (childFullData.length) {
17953
- fullData.push(...childFullData);
17954
- }
17955
- });
18062
+ if (isCombinedField) {
18063
+ XEUtils.objectEach(groupMaps, (childList, groupValue) => {
18064
+ const aggRow = {
18065
+ isAggregate: true,
18066
+ aggData: {},
18067
+ groupContent: groupValue,
18068
+ groupCombineds: groupCombinedMaps[groupValue],
18069
+ groupField,
18070
+ childCount: 0,
18071
+ [rowField]: getRowUniqueId(),
18072
+ [parentField]: null,
18073
+ [childrenField]: childList,
18074
+ [mapChildrenField]: childList
18075
+ };
18076
+ aggRow[rowkey] = createRowId(rowOpts, aggRow, rowkey);
18077
+ if (checkField) {
18078
+ aggRow[checkField] = false;
18079
+ }
18080
+ if (indeterminateField) {
18081
+ aggRow[indeterminateField] = false;
18082
+ }
18083
+ aggList.push(aggRow);
18084
+ treeData.push(aggRow);
18085
+ fullData.push(aggRow);
18086
+ });
18087
+ }
18088
+ else {
18089
+ XEUtils.objectEach(groupMaps, (childList, groupValue) => {
18090
+ const { fullData: childFullData, treeData: childTreeData } = handleGroupData(childList, rowGroups.slice(1));
18091
+ const aggRow = {
18092
+ isAggregate: true,
18093
+ aggData: {},
18094
+ groupContent: groupValue,
18095
+ groupCombineds: [],
18096
+ groupField,
18097
+ childCount: 0,
18098
+ [rowField]: getRowUniqueId(),
18099
+ [parentField]: null,
18100
+ [childrenField]: childTreeData,
18101
+ [mapChildrenField]: childTreeData
18102
+ };
18103
+ aggRow[rowkey] = createRowId(rowOpts, aggRow, rowkey);
18104
+ if (checkField) {
18105
+ aggRow[checkField] = false;
18106
+ }
18107
+ if (indeterminateField) {
18108
+ aggRow[indeterminateField] = false;
18109
+ }
18110
+ aggList.push(aggRow);
18111
+ treeData.push(aggRow);
18112
+ fullData.push(aggRow);
18113
+ if (childFullData.length) {
18114
+ fullData.push(...childFullData);
18115
+ }
18116
+ });
18117
+ }
17956
18118
  handleeGroupSummary(aggList);
17957
18119
  }
17958
18120
  }
@@ -17961,6 +18123,13 @@ var VxeTableComponent = defineVxeComponent({
17961
18123
  fullData
17962
18124
  };
17963
18125
  };
18126
+ const initGroupData = (list, rowGroups) => {
18127
+ const aggregateOpts = computeAggregateOpts.value;
18128
+ const { mode } = aggregateOpts;
18129
+ const isCombinedField = mode === 'combined';
18130
+ const groupRest = handleGroupData(list, rowGroups, isCombinedField);
18131
+ return groupRest;
18132
+ };
17964
18133
  const initData = () => {
17965
18134
  const { data } = props;
17966
18135
  loadTableData(data || [], true, true).then(() => {
@@ -18043,7 +18212,7 @@ var VxeTableComponent = defineVxeComponent({
18043
18212
  }
18044
18213
  }
18045
18214
  else if ((aggregateConfig || rowGroupConfig) && rowGroupList.length) {
18046
- const groupRest = handleGroupData(fullData, rowGroupList);
18215
+ const groupRest = initGroupData(fullData, rowGroupList);
18047
18216
  treeData = groupRest.treeData;
18048
18217
  fullData = groupRest.fullData;
18049
18218
  isRGroup = true;
@@ -28092,6 +28261,11 @@ var VxeTableComponent = defineVxeComponent({
28092
28261
  });
28093
28262
  internalData.keepUpdateFieldMaps = kpfMaps;
28094
28263
  });
28264
+ watch(computeAggregateMode, () => {
28265
+ if (reactData.isRowGroupStatus) {
28266
+ loadTableData(internalData.tableSynchData, false, true);
28267
+ }
28268
+ });
28095
28269
  if ($xeTabs) {
28096
28270
  watch(() => $xeTabs ? $xeTabs.reactData.resizeFlag : null, () => {
28097
28271
  handleGlobalResizeEvent();
@@ -28243,6 +28417,9 @@ var VxeTableComponent = defineVxeComponent({
28243
28417
  if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !XEUtils.includeArrays(XEUtils.keys(exportOpts._typeMaps), exportOpts.types)) {
28244
28418
  warnLog('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(exportOpts._typeMaps), type)).join(',') || XEUtils.keys(exportOpts._typeMaps).join(',')]);
28245
28419
  }
28420
+ if (exportConfig && XEUtils.isBoolean(exportOpts.isAllExpand)) {
28421
+ warnLog('vxe.error.delProp', ['isAllExpand', 'isTreeAllExpanded']);
28422
+ }
28246
28423
  if (!props.id) {
28247
28424
  if ((props.customConfig ? isEnableConf(customOpts) : customOpts.enabled) && customOpts.storage) {
28248
28425
  errLog('vxe.error.reqProp', ['id']);
@@ -31076,6 +31253,10 @@ var zhCN = {
31076
31253
  expMergeTitle: '如果存在,则支持带有合并结构的单元格',
31077
31254
  expOptAllExpand: '展开树',
31078
31255
  expAllExpandTitle: '如果存在,则支持将带有层级结构的数据全部展开',
31256
+ expOptTreeAllExpand: '展开树',
31257
+ expTreeAllExpandTitle: '如果存在,则自动展开所有树层级',
31258
+ expOptRowGroupAllExpand: '展开分组',
31259
+ expRowGroupAllExpandTitle: '如果存在,则自动展开所有分组层级',
31079
31260
  expOptUseStyle: '样式',
31080
31261
  expUseStyleTitle: '如果存在,则支持带样式的单元格',
31081
31262
  expOptOriginal: '源数据',