vxe-table 3.15.46 → 3.15.47

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 (148) hide show
  1. package/es/locale/lang/ar-EG.js +14 -1
  2. package/es/locale/lang/de-DE.js +14 -1
  3. package/es/locale/lang/en-US.js +14 -1
  4. package/es/locale/lang/es-ES.js +14 -1
  5. package/es/locale/lang/fr-FR.js +14 -1
  6. package/es/locale/lang/hu-HU.js +14 -1
  7. package/es/locale/lang/hy-AM.js +14 -1
  8. package/es/locale/lang/id-ID.js +14 -1
  9. package/es/locale/lang/it-IT.js +14 -1
  10. package/es/locale/lang/ja-JP.js +14 -1
  11. package/es/locale/lang/ko-KR.js +14 -1
  12. package/es/locale/lang/ms-MY.js +14 -1
  13. package/es/locale/lang/nb-NO.js +14 -1
  14. package/es/locale/lang/pt-BR.js +14 -1
  15. package/es/locale/lang/ru-RU.js +14 -1
  16. package/es/locale/lang/th-TH.js +14 -1
  17. package/es/locale/lang/ug-CN.js +14 -1
  18. package/es/locale/lang/uk-UA.js +14 -1
  19. package/es/locale/lang/uz-UZ.js +14 -1
  20. package/es/locale/lang/vi-VN.js +14 -1
  21. package/es/locale/lang/zh-CHT.js +15 -2
  22. package/es/locale/lang/zh-CN.js +14 -1
  23. package/es/style.css +1 -1
  24. package/es/table/module/custom/mixin.js +20 -5
  25. package/es/table/module/custom/panel.js +27 -13
  26. package/es/table/src/columnInfo.js +1 -0
  27. package/es/table/src/methods.js +48 -15
  28. package/es/table/src/table.js +14 -3
  29. package/es/ui/index.js +8 -5
  30. package/es/ui/src/log.js +1 -1
  31. package/lib/index.umd.js +135 -47
  32. package/lib/index.umd.min.js +1 -1
  33. package/lib/locale/lang/ar-EG.js +14 -1
  34. package/lib/locale/lang/ar-EG.min.js +1 -1
  35. package/lib/locale/lang/ar-EG.umd.js +14 -1
  36. package/lib/locale/lang/de-DE.js +14 -1
  37. package/lib/locale/lang/de-DE.min.js +1 -1
  38. package/lib/locale/lang/de-DE.umd.js +14 -1
  39. package/lib/locale/lang/en-US.js +14 -1
  40. package/lib/locale/lang/en-US.min.js +1 -1
  41. package/lib/locale/lang/en-US.umd.js +14 -1
  42. package/lib/locale/lang/es-ES.js +14 -1
  43. package/lib/locale/lang/es-ES.min.js +1 -1
  44. package/lib/locale/lang/es-ES.umd.js +14 -1
  45. package/lib/locale/lang/fr-FR.js +14 -1
  46. package/lib/locale/lang/fr-FR.min.js +1 -1
  47. package/lib/locale/lang/fr-FR.umd.js +14 -1
  48. package/lib/locale/lang/hu-HU.js +14 -1
  49. package/lib/locale/lang/hu-HU.min.js +1 -1
  50. package/lib/locale/lang/hu-HU.umd.js +14 -1
  51. package/lib/locale/lang/hy-AM.js +14 -1
  52. package/lib/locale/lang/hy-AM.min.js +1 -1
  53. package/lib/locale/lang/hy-AM.umd.js +14 -1
  54. package/lib/locale/lang/id-ID.js +14 -1
  55. package/lib/locale/lang/id-ID.min.js +1 -1
  56. package/lib/locale/lang/id-ID.umd.js +14 -1
  57. package/lib/locale/lang/it-IT.js +14 -1
  58. package/lib/locale/lang/it-IT.min.js +1 -1
  59. package/lib/locale/lang/it-IT.umd.js +14 -1
  60. package/lib/locale/lang/ja-JP.js +14 -1
  61. package/lib/locale/lang/ja-JP.min.js +1 -1
  62. package/lib/locale/lang/ja-JP.umd.js +14 -1
  63. package/lib/locale/lang/ko-KR.js +14 -1
  64. package/lib/locale/lang/ko-KR.min.js +1 -1
  65. package/lib/locale/lang/ko-KR.umd.js +14 -1
  66. package/lib/locale/lang/ms-MY.js +14 -1
  67. package/lib/locale/lang/ms-MY.min.js +1 -1
  68. package/lib/locale/lang/ms-MY.umd.js +14 -1
  69. package/lib/locale/lang/nb-NO.js +14 -1
  70. package/lib/locale/lang/nb-NO.min.js +1 -1
  71. package/lib/locale/lang/nb-NO.umd.js +14 -1
  72. package/lib/locale/lang/pt-BR.js +14 -1
  73. package/lib/locale/lang/pt-BR.min.js +1 -1
  74. package/lib/locale/lang/pt-BR.umd.js +14 -1
  75. package/lib/locale/lang/ru-RU.js +14 -1
  76. package/lib/locale/lang/ru-RU.min.js +1 -1
  77. package/lib/locale/lang/ru-RU.umd.js +14 -1
  78. package/lib/locale/lang/th-TH.js +14 -1
  79. package/lib/locale/lang/th-TH.min.js +1 -1
  80. package/lib/locale/lang/th-TH.umd.js +14 -1
  81. package/lib/locale/lang/ug-CN.js +14 -1
  82. package/lib/locale/lang/ug-CN.min.js +1 -1
  83. package/lib/locale/lang/ug-CN.umd.js +14 -1
  84. package/lib/locale/lang/uk-UA.js +14 -1
  85. package/lib/locale/lang/uk-UA.min.js +1 -1
  86. package/lib/locale/lang/uk-UA.umd.js +14 -1
  87. package/lib/locale/lang/uz-UZ.js +14 -1
  88. package/lib/locale/lang/uz-UZ.min.js +1 -1
  89. package/lib/locale/lang/uz-UZ.umd.js +14 -1
  90. package/lib/locale/lang/vi-VN.js +14 -1
  91. package/lib/locale/lang/vi-VN.min.js +1 -1
  92. package/lib/locale/lang/vi-VN.umd.js +14 -1
  93. package/lib/locale/lang/zh-CHT.js +15 -2
  94. package/lib/locale/lang/zh-CHT.min.js +1 -1
  95. package/lib/locale/lang/zh-CHT.umd.js +15 -2
  96. package/lib/locale/lang/zh-CN.js +14 -1
  97. package/lib/locale/lang/zh-CN.min.js +1 -1
  98. package/lib/locale/lang/zh-CN.umd.js +14 -1
  99. package/lib/style.css +1 -1
  100. package/lib/table/module/custom/mixin.js +20 -5
  101. package/lib/table/module/custom/mixin.min.js +1 -1
  102. package/lib/table/module/custom/panel.js +26 -14
  103. package/lib/table/module/custom/panel.min.js +1 -1
  104. package/lib/table/src/columnInfo.js +1 -0
  105. package/lib/table/src/columnInfo.min.js +1 -1
  106. package/lib/table/src/methods.js +51 -18
  107. package/lib/table/src/methods.min.js +1 -1
  108. package/lib/table/src/table.js +14 -3
  109. package/lib/table/src/table.min.js +1 -1
  110. package/lib/ui/index.js +8 -5
  111. package/lib/ui/index.min.js +1 -1
  112. package/lib/ui/src/log.js +1 -1
  113. package/lib/ui/src/log.min.js +1 -1
  114. package/package.json +1 -1
  115. package/packages/locale/lang/ar-EG.ts +14 -1
  116. package/packages/locale/lang/de-DE.ts +14 -1
  117. package/packages/locale/lang/en-US.ts +14 -1
  118. package/packages/locale/lang/es-ES.ts +14 -1
  119. package/packages/locale/lang/fr-FR.ts +14 -1
  120. package/packages/locale/lang/hu-HU.ts +14 -1
  121. package/packages/locale/lang/hy-AM.ts +14 -1
  122. package/packages/locale/lang/id-ID.ts +14 -1
  123. package/packages/locale/lang/it-IT.ts +14 -1
  124. package/packages/locale/lang/ja-JP.ts +14 -1
  125. package/packages/locale/lang/ko-KR.ts +14 -1
  126. package/packages/locale/lang/ms-MY.ts +14 -1
  127. package/packages/locale/lang/nb-NO.ts +14 -1
  128. package/packages/locale/lang/pt-BR.ts +14 -1
  129. package/packages/locale/lang/ru-RU.ts +14 -1
  130. package/packages/locale/lang/th-TH.ts +14 -1
  131. package/packages/locale/lang/ug-CN.ts +14 -1
  132. package/packages/locale/lang/uk-UA.ts +14 -1
  133. package/packages/locale/lang/uz-UZ.ts +14 -1
  134. package/packages/locale/lang/vi-VN.ts +14 -1
  135. package/packages/locale/lang/zh-CHT.ts +15 -2
  136. package/packages/locale/lang/zh-CN.ts +14 -1
  137. package/packages/table/module/custom/mixin.ts +18 -5
  138. package/packages/table/module/custom/panel.ts +25 -12
  139. package/packages/table/src/columnInfo.ts +1 -0
  140. package/packages/table/src/methods.ts +50 -14
  141. package/packages/table/src/table.ts +14 -3
  142. package/packages/ui/index.ts +7 -4
  143. /package/es/{iconfont.1750651550655.ttf → iconfont.1750732150166.ttf} +0 -0
  144. /package/es/{iconfont.1750651550655.woff → iconfont.1750732150166.woff} +0 -0
  145. /package/es/{iconfont.1750651550655.woff2 → iconfont.1750732150166.woff2} +0 -0
  146. /package/lib/{iconfont.1750651550655.ttf → iconfont.1750732150166.ttf} +0 -0
  147. /package/lib/{iconfont.1750651550655.woff → iconfont.1750732150166.woff} +0 -0
  148. /package/lib/{iconfont.1750651550655.woff2 → iconfont.1750732150166.woff2} +0 -0
@@ -55,7 +55,7 @@ export default {
55
55
  const reactData = $xeTable;
56
56
  const { customColumnList, aggHandleFields, rowGroupList } = reactData;
57
57
  const customOpts = $xeTable.computeCustomOpts;
58
- const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts;
58
+ const { allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues } = customOpts;
59
59
  XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
60
60
  if (parentColumn) {
61
61
  // 更新子列信息
@@ -81,6 +81,9 @@ export default {
81
81
  if (allowVisible) {
82
82
  column.visible = column.renderVisible;
83
83
  }
84
+ if (allowGroup && allowValues) {
85
+ column.aggFunc = column.renderAggFn;
86
+ }
84
87
  });
85
88
  reactData.isCustomStatus = true;
86
89
  reactData.isDragColMove = true;
@@ -88,9 +91,9 @@ export default {
88
91
  reactData.isDragColMove = false;
89
92
  }, 1000);
90
93
  return $xeTable.saveCustomStore('confirm').then(() => {
91
- if ($xeTable.handlePivotTableAggregateData) {
94
+ if (allowGroup && allowValues && $xeTable.handlePivotTableAggregateData) {
92
95
  if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
93
- // 改动聚合分组
96
+ // 更新数据分组
94
97
  if (aggHandleFields.length) {
95
98
  $xeTable.setRowGroups(aggHandleFields);
96
99
  }
@@ -98,6 +101,10 @@ export default {
98
101
  $xeTable.clearRowGroups();
99
102
  }
100
103
  }
104
+ else {
105
+ // 更新聚合函数
106
+ $xeTable.handleUpdateAggData();
107
+ }
101
108
  }
102
109
  });
103
110
  },
@@ -141,7 +148,8 @@ export default {
141
148
  visible: true,
142
149
  resizable: options === true,
143
150
  fixed: options === true,
144
- sort: options === true
151
+ sort: options === true,
152
+ aggFunc: options === true
145
153
  }, options);
146
154
  XEUtils.eachTree(collectColumn, (column) => {
147
155
  if (opts.resizable) {
@@ -156,12 +164,16 @@ export default {
156
164
  if (!checkMethod || checkMethod({ $table: $xeTable, column })) {
157
165
  column.visible = column.defaultVisible;
158
166
  }
167
+ if (opts.aggFunc) {
168
+ column.aggFunc = column.defaultAggFunc;
169
+ column.renderAggFn = column.defaultAggFunc;
170
+ }
159
171
  column.renderResizeWidth = column.renderWidth;
160
172
  });
161
173
  reactData.isCustomStatus = false;
162
174
  $xeTable.saveCustomStore('reset');
163
175
  return $xeTable.handleCustom().then(() => {
164
- if ($xeTable.handlePivotTableAggregateData) {
176
+ if (opts.aggFunc && $xeTable.handlePivotTableAggregateData) {
165
177
  const rowGroupFields = $xeTable.computeRowGroupFields;
166
178
  if (rowGroupFields ? rowGroupFields.length : rowGroupList.length) {
167
179
  if (rowGroupFields && rowGroupFields.length) {
@@ -171,6 +183,9 @@ export default {
171
183
  $xeTable.clearRowGroups();
172
184
  }
173
185
  }
186
+ else {
187
+ $xeTable.handleUpdateAggData();
188
+ }
174
189
  }
175
190
  });
176
191
  },
@@ -17,8 +17,8 @@ function showDropTip($xeTableCustomPanel, evnt, optEl, showLine, dragPos) {
17
17
  const { prevDragToChild } = customPanelInternalData;
18
18
  const bodyWrapperRect = bodyWrapperElem.getBoundingClientRect();
19
19
  const customBodyRect = customBodyElem.getBoundingClientRect();
20
+ const dragLineEl = $xeTableCustomPanel.$refs.refDragLineElem;
20
21
  if (optEl) {
21
- const dragLineEl = $xeTableCustomPanel.$refs.refDragLineElem;
22
22
  if (dragLineEl) {
23
23
  if (showLine) {
24
24
  const optRect = optEl.getBoundingClientRect();
@@ -35,6 +35,11 @@ function showDropTip($xeTableCustomPanel, evnt, optEl, showLine, dragPos) {
35
35
  }
36
36
  }
37
37
  }
38
+ else {
39
+ if (dragLineEl) {
40
+ dragLineEl.style.display = 'node';
41
+ }
42
+ }
38
43
  const dragTipEl = $xeTableCustomPanel.$refs.refDragTipElem;
39
44
  if (dragTipEl) {
40
45
  dragTipEl.style.display = 'block';
@@ -279,7 +284,7 @@ const renderSimplePanel = (h, _vm) => {
279
284
  ? [
280
285
  h('div', {
281
286
  ref: 'refBodyWrapperElem',
282
- class: 'vxe-table-custom-body-wrapper'
287
+ class: 'vxe-table-custom-simple--body-wrapper'
283
288
  }, [
284
289
  !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel
285
290
  ? h($xeTable.getPivotTableAggregateSimplePanel(), {
@@ -851,12 +856,14 @@ export default {
851
856
  data() {
852
857
  const reactData = {
853
858
  dragCol: null,
859
+ dragGroupField: null,
860
+ dragAggFnCol: null,
854
861
  dragTipText: ''
855
862
  };
856
863
  const internalData = {
857
864
  // prevDragCol: undefined,
858
- // prevDragGroup: undefined,
859
- // prevDragValues: undefined,
865
+ // prevDragGroupField: undefined,
866
+ // prevDragAggFnColid: undefined,
860
867
  // prevDragToChild: false,
861
868
  // prevDragPos: null
862
869
  };
@@ -1116,6 +1123,8 @@ export default {
1116
1123
  const column = $xeTable.getColumnById(colid);
1117
1124
  trEl.draggable = true;
1118
1125
  customPanelReactData.dragCol = column;
1126
+ customPanelReactData.dragGroupField = null;
1127
+ customPanelReactData.dragAggFnCol = null;
1119
1128
  this.updateColDropTipContent();
1120
1129
  addClass(trEl, 'active--drag-origin');
1121
1130
  },
@@ -1129,6 +1138,8 @@ export default {
1129
1138
  hideDropTip($xeTableCustomPanel);
1130
1139
  trEl.draggable = false;
1131
1140
  customPanelReactData.dragCol = null;
1141
+ customPanelReactData.dragGroupField = null;
1142
+ customPanelReactData.dragAggFnCol = null;
1132
1143
  removeClass(trEl, 'active--drag-origin');
1133
1144
  },
1134
1145
  sortDragstartEvent(evnt) {
@@ -1137,8 +1148,8 @@ export default {
1137
1148
  if (evnt.dataTransfer) {
1138
1149
  evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
1139
1150
  }
1140
- customPanelInternalData.prevDragGroup = null;
1141
- customPanelInternalData.prevDragValues = null;
1151
+ customPanelInternalData.prevDragGroupField = null;
1152
+ customPanelInternalData.prevDragAggFnColid = null;
1142
1153
  },
1143
1154
  sortDragendEvent(evnt) {
1144
1155
  const $xeTableCustomPanel = this;
@@ -1157,9 +1168,9 @@ export default {
1157
1168
  const columnDragOpts = $xeTable.computeColumnDragOpts;
1158
1169
  const { isCrossDrag, isSelfToChildDrag, isToChildDrag, dragEndMethod } = columnDragOpts;
1159
1170
  const { dragCol } = customPanelReactData;
1160
- const { prevDragCol, prevDragGroup, prevDragValues, prevDragPos, prevDragToChild } = customPanelInternalData;
1171
+ const { prevDragCol, prevDragGroupField, prevDragAggFnColid, prevDragPos, prevDragToChild } = customPanelInternalData;
1161
1172
  const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
1162
- if (prevDragGroup || prevDragValues) {
1173
+ if (prevDragGroupField || prevDragAggFnColid) {
1163
1174
  if ($xeTable.handlePivotTableAggregatePanelDragendEvent) {
1164
1175
  $xeTable.handlePivotTableAggregatePanelDragendEvent(evnt);
1165
1176
  }
@@ -1318,8 +1329,10 @@ export default {
1318
1329
  }
1319
1330
  hideDropTip($xeTableCustomPanel);
1320
1331
  customPanelReactData.dragCol = null;
1321
- customPanelInternalData.prevDragGroup = null;
1322
- customPanelInternalData.prevDragValues = null;
1332
+ customPanelReactData.dragGroupField = null;
1333
+ customPanelReactData.dragAggFnCol = null;
1334
+ customPanelInternalData.prevDragGroupField = null;
1335
+ customPanelInternalData.prevDragAggFnColid = null;
1323
1336
  trEl.draggable = false;
1324
1337
  trEl.removeAttribute('drag-pos');
1325
1338
  removeClass(trEl, 'active--drag-target');
@@ -1339,14 +1352,15 @@ export default {
1339
1352
  const isControlKey = hasControlKey(evnt);
1340
1353
  const colid = optEl.getAttribute('colid');
1341
1354
  const column = $xeTable.getColumnById(colid);
1342
- customPanelInternalData.prevDragGroup = null;
1343
- customPanelInternalData.prevDragValues = null;
1355
+ customPanelInternalData.prevDragGroupField = null;
1356
+ customPanelInternalData.prevDragAggFnColid = null;
1344
1357
  // 是否移入有效列
1345
1358
  if (column && (isCrossDrag || column.level === 1)) {
1346
1359
  evnt.preventDefault();
1347
1360
  const offsetY = evnt.clientY - optEl.getBoundingClientRect().y;
1348
1361
  const dragPos = offsetY < optEl.clientHeight / 2 ? 'top' : 'bottom';
1349
- if ((dragCol && dragCol.id === column.id) ||
1362
+ if (!dragCol ||
1363
+ (dragCol && dragCol.id === column.id) ||
1350
1364
  (!isCrossDrag && column.level > 1) ||
1351
1365
  (!immediate && column.level > 1) ||
1352
1366
  column.renderFixed) {
@@ -108,6 +108,7 @@ export class ColumnInfo {
108
108
  halfVisible: false,
109
109
  defaultVisible: visible,
110
110
  defaultFixed: _vm.fixed,
111
+ defaultAggFunc: _vm.aggFunc,
111
112
  checked: false,
112
113
  halfChecked: false,
113
114
  disabled: false,
@@ -167,7 +167,8 @@ function restoreCustomStorage($xeTable) {
167
167
  const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
168
168
  const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
169
169
  const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
170
- if (storage && (customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
170
+ const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
171
+ if (storage && (customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort || isCustomAggFunc)) {
171
172
  if (!tableId) {
172
173
  errLog('vxe.error.reqProp', ['id']);
173
174
  return;
@@ -2611,7 +2612,19 @@ function handleRecalculateLayout($xeTable, reFull) {
2611
2612
  }
2612
2613
  });
2613
2614
  }
2614
- const handleUpdateRowGroup = ($xeTable, groupFields) => {
2615
+ function handleUpdateAggValues($xeTable) {
2616
+ const reactData = $xeTable;
2617
+ const internalData = $xeTable;
2618
+ const { visibleColumn } = internalData;
2619
+ const aggCols = [];
2620
+ visibleColumn.forEach(column => {
2621
+ if (column.aggFunc) {
2622
+ aggCols.push(column);
2623
+ }
2624
+ });
2625
+ reactData.aggHandleAggColumns = aggCols;
2626
+ }
2627
+ function handleUpdateRowGroup($xeTable, groupFields) {
2615
2628
  const reactData = $xeTable;
2616
2629
  const aggFields = [];
2617
2630
  const aggConfs = [];
@@ -2625,7 +2638,8 @@ const handleUpdateRowGroup = ($xeTable, groupFields) => {
2625
2638
  }
2626
2639
  reactData.rowGroupList = aggConfs;
2627
2640
  reactData.aggHandleFields = aggFields;
2628
- };
2641
+ handleUpdateAggValues($xeTable);
2642
+ }
2629
2643
  function handleeGroupSummary($xeTable, aggList) {
2630
2644
  const aggregateOpts = $xeTable.computeAggregateOpts;
2631
2645
  const { mapChildrenField } = aggregateOpts;
@@ -3121,6 +3135,7 @@ function parseColumns($xeTable, isReset) {
3121
3135
  }
3122
3136
  });
3123
3137
  handleTableColumn($xeTable);
3138
+ handleUpdateAggValues($xeTable);
3124
3139
  if (isReset) {
3125
3140
  return $xeTable.updateFooter().then(() => {
3126
3141
  return $xeTable.recalculate();
@@ -4954,15 +4969,18 @@ const Methods = {
4954
4969
  const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
4955
4970
  const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
4956
4971
  const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
4972
+ const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
4957
4973
  const resizableData = {};
4958
4974
  const sortData = {};
4959
4975
  const visibleData = {};
4960
4976
  const fixedData = {};
4977
+ const aggFuncData = {};
4961
4978
  const storeData = {
4962
4979
  resizableData: undefined,
4963
4980
  sortData: undefined,
4964
4981
  visibleData: undefined,
4965
- fixedData: undefined
4982
+ fixedData: undefined,
4983
+ aggFuncData: undefined
4966
4984
  };
4967
4985
  if (!id) {
4968
4986
  if (storage) {
@@ -4974,6 +4992,7 @@ const Methods = {
4974
4992
  let hasSort = 0;
4975
4993
  let hasFixed = 0;
4976
4994
  let hasVisible = 0;
4995
+ let hasAggFunc = 0;
4977
4996
  XEUtils.eachTree(collectColumn, (column, index, items, path, parentColumn) => {
4978
4997
  const colKey = column.getKey();
4979
4998
  if (!colKey) {
@@ -5005,6 +5024,10 @@ const Methods = {
5005
5024
  visibleData[colKey] = true;
5006
5025
  }
5007
5026
  }
5027
+ if (isCustomAggFunc && column.aggFunc !== column.defaultAggFunc) {
5028
+ hasAggFunc = 1;
5029
+ aggFuncData[colKey] = column.aggFunc;
5030
+ }
5008
5031
  });
5009
5032
  if (hasResizable) {
5010
5033
  storeData.resizableData = resizableData;
@@ -5018,6 +5041,9 @@ const Methods = {
5018
5041
  if (hasVisible) {
5019
5042
  storeData.visibleData = visibleData;
5020
5043
  }
5044
+ if (hasAggFunc) {
5045
+ storeData.aggFuncData = aggFuncData;
5046
+ }
5021
5047
  return storeData;
5022
5048
  },
5023
5049
  saveCustomStore(type) {
@@ -5027,17 +5053,18 @@ const Methods = {
5027
5053
  const { customConfig } = props;
5028
5054
  const tableId = $xeTable.computeTableId;
5029
5055
  const customOpts = $xeTable.computeCustomOpts;
5030
- const { updateStore, storage } = customOpts;
5056
+ const { updateStore, storage, storeOptions } = customOpts;
5031
5057
  const isAllCustom = storage === true;
5032
- const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
5033
- const isCustomResizable = isAllCustom || storageOpts.resizable;
5034
- const isCustomVisible = isAllCustom || storageOpts.visible;
5035
- const isCustomFixed = isAllCustom || storageOpts.fixed;
5036
- const isCustomSort = isAllCustom || storageOpts.sort;
5058
+ const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {}, storeOptions);
5059
+ const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
5060
+ const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
5061
+ const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
5062
+ const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
5063
+ const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
5037
5064
  if (type !== 'reset') {
5038
5065
  reactData.isCustomStatus = true;
5039
5066
  }
5040
- if (storage && (customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
5067
+ if (storage && (customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort || isCustomAggFunc)) {
5041
5068
  if (!tableId) {
5042
5069
  errLog('vxe.error.reqProp', ['id']);
5043
5070
  return this.$nextTick();
@@ -5722,9 +5749,10 @@ const Methods = {
5722
5749
  const $xeGrid = $xeTable.$xeGrid;
5723
5750
  const { $el, $refs, $toolbar, mouseConfig, editStore, ctxMenuStore, editRules, editOpts, validOpts, areaOpts, filterStore, customStore, getRowNode } = this;
5724
5751
  const { actived } = editStore;
5725
- const { customWrapper, refValidTooltip } = $refs;
5726
5752
  const tableFilter = $refs.refTableFilter;
5727
5753
  const tableMenu = $refs.refTableMenu;
5754
+ const tableCustom = $refs.refTableCustom;
5755
+ const validTooltip = $refs.refValidTooltip;
5728
5756
  // 筛选
5729
5757
  if (tableFilter) {
5730
5758
  if (getEventTargetNode(evnt, $el, 'vxe-cell--filter').flag) {
@@ -5740,11 +5768,11 @@ const Methods = {
5740
5768
  }
5741
5769
  }
5742
5770
  // 自定义列
5743
- if (customWrapper) {
5771
+ if (tableCustom) {
5744
5772
  if (customStore.btnEl === evnt.target || getEventTargetNode(evnt, document.body, 'vxe-toolbar-custom-target').flag) {
5745
5773
  // 如果点击了自定义列按钮
5746
5774
  }
5747
- else if (getEventTargetNode(evnt, customWrapper.$el).flag) {
5775
+ else if (getEventTargetNode(evnt, tableCustom.$el).flag) {
5748
5776
  // 如果点击自定义列容器
5749
5777
  }
5750
5778
  else {
@@ -5759,7 +5787,7 @@ const Methods = {
5759
5787
  // 如果是激活状态,点击了单元格之外
5760
5788
  const cell = actived.args.cell;
5761
5789
  if ((!cell || !getEventTargetNode(evnt, cell).flag)) {
5762
- if (refValidTooltip && getEventTargetNode(evnt, refValidTooltip.$el).flag) {
5790
+ if (validTooltip && getEventTargetNode(evnt, validTooltip.$el).flag) {
5763
5791
  // 如果是激活状态,且点击了校验提示框
5764
5792
  }
5765
5793
  else if (!this.lastCallTime || this.lastCallTime + 50 < Date.now()) {
@@ -10243,6 +10271,11 @@ const Methods = {
10243
10271
  return updateStyle($xeTable);
10244
10272
  });
10245
10273
  },
10274
+ handleUpdateAggData() {
10275
+ const $xeTable = this;
10276
+ const internalData = $xeTable;
10277
+ return loadTableData($xeTable, internalData.tableSynchData, true);
10278
+ },
10246
10279
  updateZindex() {
10247
10280
  if (this.zIndex) {
10248
10281
  this.tZindex = this.zIndex;
@@ -647,6 +647,7 @@ export default {
647
647
  isRowGroupStatus: false,
648
648
  rowGroupList: [],
649
649
  aggHandleFields: [],
650
+ aggHandleAggColumns: [],
650
651
  rowGroupExpandedFlag: 1,
651
652
  rowExpandedFlag: 1,
652
653
  treeExpandedFlag: 1,
@@ -1571,6 +1572,16 @@ export default {
1571
1572
  return;
1572
1573
  }
1573
1574
  }
1575
+ if (!$xeTable.handlePivotTableAggregateData) {
1576
+ if (customOpts.allowGroup) {
1577
+ errLog('vxe.error.notProp', ['custom-config.allowGroup']);
1578
+ return;
1579
+ }
1580
+ if (customOpts.allowValues) {
1581
+ errLog('vxe.error.notProp', ['custom-config.allowValues']);
1582
+ return;
1583
+ }
1584
+ }
1574
1585
  if (treeConfig && rowOpts.drag && !treeOpts.transform) {
1575
1586
  warnLog('vxe.error.notSupportProp', ['column-config.drag', 'tree-config.transform=false', 'tree-config.transform=true']);
1576
1587
  }
@@ -1583,8 +1594,8 @@ export default {
1583
1594
  if (aggregateOpts.countFields) {
1584
1595
  warnLog('vxe.error.delProp', ['row-group-config.countFields', 'column.agg-func']);
1585
1596
  }
1586
- if (aggregateOpts.countMethod) {
1587
- warnLog('vxe.error.delProp', ['row-group-config.countMethod', 'aggregate-config.aggregateMethod']);
1597
+ if (aggregateOpts.aggregateMethod) {
1598
+ warnLog('vxe.error.delProp', ['row-group-config.aggregateMethod', 'aggregate-config.countMethod']);
1588
1599
  }
1589
1600
  if (props.treeConfig && treeOpts.children) {
1590
1601
  warnLog('vxe.error.delProp', ['tree-config.children', 'tree-config.childrenField']);
@@ -1986,7 +1997,7 @@ export default {
1986
1997
  initStore.custom
1987
1998
  ? h(TableCustomPanelComponent, {
1988
1999
  key: 'cs',
1989
- ref: 'customWrapper',
2000
+ ref: 'refTableCustom',
1990
2001
  props: {
1991
2002
  customStore
1992
2003
  }
package/es/ui/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  import { getFuncText } from './src/utils';
3
- export const version = "3.15.46";
3
+ export const version = "3.15.47";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
@@ -103,6 +103,7 @@ VxeUI.setConfig({
103
103
  // rowGroup: false,
104
104
  // aggFunc: false
105
105
  },
106
+ // autoAggGroupValues: false,
106
107
  // checkMethod () {},
107
108
  modalOptions: {
108
109
  showMaximize: true,
@@ -142,7 +143,8 @@ VxeUI.setConfig({
142
143
  childrenField: '_X_ROW_CHILDREN',
143
144
  mapChildrenField: '_X_ROW_CHILD_LIST',
144
145
  indent: 20,
145
- showIcon: true
146
+ showIcon: true,
147
+ maxGroupSize: 4
146
148
  },
147
149
  treeConfig: {
148
150
  padding: true,
@@ -312,9 +314,10 @@ VxeUI.setIcon({
312
314
  TABLE_DRAG_DISABLED: iconPrefix + 'no-drop',
313
315
  TABLE_ROW_GROUP_OPEN: iconPrefix + 'arrow-right rotate90',
314
316
  TABLE_ROW_GROUP_CLOSE: iconPrefix + 'arrow-right',
315
- TABLE_AGGREGATION_GROUPING: iconPrefix + 'grouping',
316
- TABLE_AGGREGATION_VALUES: iconPrefix + 'values',
317
- TABLE_AGGREGATION_DELETE: iconPrefix + 'close',
317
+ TABLE_AGGREGATE_GROUPING: iconPrefix + 'grouping',
318
+ TABLE_AGGREGATE_VALUES: iconPrefix + 'values',
319
+ TABLE_AGGREGATE_SORT: iconPrefix + 'drag-handle',
320
+ TABLE_AGGREGATE_DELETE: iconPrefix + 'close',
318
321
  // toolbar
319
322
  TOOLBAR_TOOLS_REFRESH: iconPrefix + 'repeat',
320
323
  TOOLBAR_TOOLS_REFRESH_LOADING: iconPrefix + 'repeat roll',
package/es/ui/src/log.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const version = `table v${"3.15.46"}`;
3
+ const version = `table v${"3.15.47"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);