vxe-table 3.15.45 → 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 +29 -15
  26. package/es/table/src/columnInfo.js +1 -0
  27. package/es/table/src/methods.js +57 -16
  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 +148 -50
  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 +28 -16
  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 +62 -19
  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 +27 -14
  139. package/packages/table/src/columnInfo.ts +1 -0
  140. package/packages/table/src/methods.ts +61 -16
  141. package/packages/table/src/table.ts +14 -3
  142. package/packages/ui/index.ts +7 -4
  143. /package/es/{iconfont.1750641764687.ttf → iconfont.1750732150166.ttf} +0 -0
  144. /package/es/{iconfont.1750641764687.woff → iconfont.1750732150166.woff} +0 -0
  145. /package/es/{iconfont.1750641764687.woff2 → iconfont.1750732150166.woff2} +0 -0
  146. /package/lib/{iconfont.1750641764687.ttf → iconfont.1750732150166.ttf} +0 -0
  147. /package/lib/{iconfont.1750641764687.woff → iconfont.1750732150166.woff} +0 -0
  148. /package/lib/{iconfont.1750641764687.woff2 → iconfont.1750732150166.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -2002,7 +2002,7 @@ function getClass(property, params) {
2002
2002
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2003
2003
 
2004
2004
 
2005
- const version = "3.15.45";
2005
+ const version = "3.15.47";
2006
2006
  core_.VxeUI.version = version;
2007
2007
  core_.VxeUI.tableVersion = version;
2008
2008
  core_.VxeUI.setConfig({
@@ -2105,6 +2105,7 @@ core_.VxeUI.setConfig({
2105
2105
  // rowGroup: false,
2106
2106
  // aggFunc: false
2107
2107
  },
2108
+ // autoAggGroupValues: false,
2108
2109
  // checkMethod () {},
2109
2110
  modalOptions: {
2110
2111
  showMaximize: true,
@@ -2144,7 +2145,8 @@ core_.VxeUI.setConfig({
2144
2145
  childrenField: '_X_ROW_CHILDREN',
2145
2146
  mapChildrenField: '_X_ROW_CHILD_LIST',
2146
2147
  indent: 20,
2147
- showIcon: true
2148
+ showIcon: true,
2149
+ maxGroupSize: 4
2148
2150
  },
2149
2151
  treeConfig: {
2150
2152
  padding: true,
@@ -2314,9 +2316,10 @@ core_.VxeUI.setIcon({
2314
2316
  TABLE_DRAG_DISABLED: iconPrefix + 'no-drop',
2315
2317
  TABLE_ROW_GROUP_OPEN: iconPrefix + 'arrow-right rotate90',
2316
2318
  TABLE_ROW_GROUP_CLOSE: iconPrefix + 'arrow-right',
2317
- TABLE_AGGREGATION_GROUPING: iconPrefix + 'grouping',
2318
- TABLE_AGGREGATION_VALUES: iconPrefix + 'values',
2319
- TABLE_AGGREGATION_DELETE: iconPrefix + 'close',
2319
+ TABLE_AGGREGATE_GROUPING: iconPrefix + 'grouping',
2320
+ TABLE_AGGREGATE_VALUES: iconPrefix + 'values',
2321
+ TABLE_AGGREGATE_SORT: iconPrefix + 'drag-handle',
2322
+ TABLE_AGGREGATE_DELETE: iconPrefix + 'close',
2320
2323
  // toolbar
2321
2324
  TOOLBAR_TOOLS_REFRESH: iconPrefix + 'repeat',
2322
2325
  TOOLBAR_TOOLS_REFRESH_LOADING: iconPrefix + 'repeat roll',
@@ -2662,7 +2665,7 @@ function isNodeElement(elem) {
2662
2665
  const {
2663
2666
  log: log_log
2664
2667
  } = core_.VxeUI;
2665
- const log_version = `table v${"3.15.45"}`;
2668
+ const log_version = `table v${"3.15.47"}`;
2666
2669
  const warnLog = log_log.create('warn', log_version);
2667
2670
  const errLog = log_log.create('error', log_version);
2668
2671
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -2785,6 +2788,7 @@ class ColumnInfo {
2785
2788
  halfVisible: false,
2786
2789
  defaultVisible: visible,
2787
2790
  defaultFixed: _vm.fixed,
2791
+ defaultAggFunc: _vm.aggFunc,
2788
2792
  checked: false,
2789
2793
  halfChecked: false,
2790
2794
  disabled: false,
@@ -5350,7 +5354,8 @@ function restoreCustomStorage($xeTable) {
5350
5354
  const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
5351
5355
  const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
5352
5356
  const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
5353
- if (storage && (customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
5357
+ const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
5358
+ if (storage && (customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort || isCustomAggFunc)) {
5354
5359
  if (!tableId) {
5355
5360
  errLog('vxe.error.reqProp', ['id']);
5356
5361
  return;
@@ -8275,7 +8280,21 @@ function handleRecalculateLayout($xeTable, reFull) {
8275
8280
  }
8276
8281
  });
8277
8282
  }
8278
- const handleUpdateRowGroup = ($xeTable, groupFields) => {
8283
+ function handleUpdateAggValues($xeTable) {
8284
+ const reactData = $xeTable;
8285
+ const internalData = $xeTable;
8286
+ const {
8287
+ visibleColumn
8288
+ } = internalData;
8289
+ const aggCols = [];
8290
+ visibleColumn.forEach(column => {
8291
+ if (column.aggFunc) {
8292
+ aggCols.push(column);
8293
+ }
8294
+ });
8295
+ reactData.aggHandleAggColumns = aggCols;
8296
+ }
8297
+ function handleUpdateRowGroup($xeTable, groupFields) {
8279
8298
  const reactData = $xeTable;
8280
8299
  const aggFields = [];
8281
8300
  const aggConfs = [];
@@ -8289,7 +8308,8 @@ const handleUpdateRowGroup = ($xeTable, groupFields) => {
8289
8308
  }
8290
8309
  reactData.rowGroupList = aggConfs;
8291
8310
  reactData.aggHandleFields = aggFields;
8292
- };
8311
+ handleUpdateAggValues($xeTable);
8312
+ }
8293
8313
  function handleeGroupSummary($xeTable, aggList) {
8294
8314
  const aggregateOpts = $xeTable.computeAggregateOpts;
8295
8315
  const {
@@ -8843,6 +8863,7 @@ function parseColumns($xeTable, isReset) {
8843
8863
  }
8844
8864
  });
8845
8865
  handleTableColumn($xeTable);
8866
+ handleUpdateAggValues($xeTable);
8846
8867
  if (isReset) {
8847
8868
  return $xeTable.updateFooter().then(() => {
8848
8869
  return $xeTable.recalculate();
@@ -10964,15 +10985,18 @@ const Methods = {
10964
10985
  const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
10965
10986
  const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
10966
10987
  const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
10988
+ const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
10967
10989
  const resizableData = {};
10968
10990
  const sortData = {};
10969
10991
  const visibleData = {};
10970
10992
  const fixedData = {};
10993
+ const aggFuncData = {};
10971
10994
  const storeData = {
10972
10995
  resizableData: undefined,
10973
10996
  sortData: undefined,
10974
10997
  visibleData: undefined,
10975
- fixedData: undefined
10998
+ fixedData: undefined,
10999
+ aggFuncData: undefined
10976
11000
  };
10977
11001
  if (!id) {
10978
11002
  if (storage) {
@@ -10984,6 +11008,7 @@ const Methods = {
10984
11008
  let hasSort = 0;
10985
11009
  let hasFixed = 0;
10986
11010
  let hasVisible = 0;
11011
+ let hasAggFunc = 0;
10987
11012
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, (column, index, items, path, parentColumn) => {
10988
11013
  const colKey = column.getKey();
10989
11014
  if (!colKey) {
@@ -11017,6 +11042,10 @@ const Methods = {
11017
11042
  visibleData[colKey] = true;
11018
11043
  }
11019
11044
  }
11045
+ if (isCustomAggFunc && column.aggFunc !== column.defaultAggFunc) {
11046
+ hasAggFunc = 1;
11047
+ aggFuncData[colKey] = column.aggFunc;
11048
+ }
11020
11049
  });
11021
11050
  if (hasResizable) {
11022
11051
  storeData.resizableData = resizableData;
@@ -11030,6 +11059,9 @@ const Methods = {
11030
11059
  if (hasVisible) {
11031
11060
  storeData.visibleData = visibleData;
11032
11061
  }
11062
+ if (hasAggFunc) {
11063
+ storeData.aggFuncData = aggFuncData;
11064
+ }
11033
11065
  return storeData;
11034
11066
  },
11035
11067
  saveCustomStore(type) {
@@ -11043,18 +11075,20 @@ const Methods = {
11043
11075
  const customOpts = $xeTable.computeCustomOpts;
11044
11076
  const {
11045
11077
  updateStore,
11046
- storage
11078
+ storage,
11079
+ storeOptions
11047
11080
  } = customOpts;
11048
11081
  const isAllCustom = storage === true;
11049
- const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
11050
- const isCustomResizable = isAllCustom || storageOpts.resizable;
11051
- const isCustomVisible = isAllCustom || storageOpts.visible;
11052
- const isCustomFixed = isAllCustom || storageOpts.fixed;
11053
- const isCustomSort = isAllCustom || storageOpts.sort;
11082
+ const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {}, storeOptions);
11083
+ const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
11084
+ const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
11085
+ const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
11086
+ const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
11087
+ const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
11054
11088
  if (type !== 'reset') {
11055
11089
  reactData.isCustomStatus = true;
11056
11090
  }
11057
- if (storage && (customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
11091
+ if (storage && (customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort || isCustomAggFunc)) {
11058
11092
  if (!tableId) {
11059
11093
  errLog('vxe.error.reqProp', ['id']);
11060
11094
  return this.$nextTick();
@@ -11835,12 +11869,10 @@ const Methods = {
11835
11869
  const {
11836
11870
  actived
11837
11871
  } = editStore;
11838
- const {
11839
- customWrapper,
11840
- refValidTooltip
11841
- } = $refs;
11842
11872
  const tableFilter = $refs.refTableFilter;
11843
11873
  const tableMenu = $refs.refTableMenu;
11874
+ const tableCustom = $refs.refTableCustom;
11875
+ const validTooltip = $refs.refValidTooltip;
11844
11876
  // 筛选
11845
11877
  if (tableFilter) {
11846
11878
  if (getEventTargetNode(evnt, $el, 'vxe-cell--filter').flag) {
@@ -11854,10 +11886,10 @@ const Methods = {
11854
11886
  }
11855
11887
  }
11856
11888
  // 自定义列
11857
- if (customWrapper) {
11889
+ if (tableCustom) {
11858
11890
  if (customStore.btnEl === evnt.target || getEventTargetNode(evnt, document.body, 'vxe-toolbar-custom-target').flag) {
11859
11891
  // 如果点击了自定义列按钮
11860
- } else if (getEventTargetNode(evnt, customWrapper.$el).flag) {
11892
+ } else if (getEventTargetNode(evnt, tableCustom.$el).flag) {
11861
11893
  // 如果点击自定义列容器
11862
11894
  } else {
11863
11895
  if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
@@ -11871,7 +11903,7 @@ const Methods = {
11871
11903
  // 如果是激活状态,点击了单元格之外
11872
11904
  const cell = actived.args.cell;
11873
11905
  if (!cell || !getEventTargetNode(evnt, cell).flag) {
11874
- if (refValidTooltip && getEventTargetNode(evnt, refValidTooltip.$el).flag) {
11906
+ if (validTooltip && getEventTargetNode(evnt, validTooltip.$el).flag) {
11875
11907
  // 如果是激活状态,且点击了校验提示框
11876
11908
  } else if (!this.lastCallTime || this.lastCallTime + 50 < Date.now()) {
11877
11909
  if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
@@ -13143,7 +13175,17 @@ const Methods = {
13143
13175
  }
13144
13176
  vLen++;
13145
13177
  });
13146
- const isSelected = selectCheckboxMaps[rowid] || sLen >= vLen && (vLen >= 1 || hLen >= 1);
13178
+ let isSelected = sLen >= vLen && (vLen >= 1 || hLen >= 1);
13179
+ if (checkMethod) {
13180
+ if (checkMethod({
13181
+ $table: $xeTable,
13182
+ row
13183
+ })) {
13184
+ isSelected = sLen >= vLen;
13185
+ } else {
13186
+ isSelected = selectCheckboxMaps[rowid];
13187
+ }
13188
+ }
13147
13189
  const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
13148
13190
  if (checkField) {
13149
13191
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, checkField, isSelected);
@@ -17111,6 +17153,11 @@ const Methods = {
17111
17153
  return updateStyle($xeTable);
17112
17154
  });
17113
17155
  },
17156
+ handleUpdateAggData() {
17157
+ const $xeTable = this;
17158
+ const internalData = $xeTable;
17159
+ return loadTableData($xeTable, internalData.tableSynchData, true);
17160
+ },
17114
17161
  updateZindex() {
17115
17162
  if (this.zIndex) {
17116
17163
  this.tZindex = this.zIndex;
@@ -19474,8 +19521,8 @@ function panel_showDropTip($xeTableCustomPanel, evnt, optEl, showLine, dragPos)
19474
19521
  } = customPanelInternalData;
19475
19522
  const bodyWrapperRect = bodyWrapperElem.getBoundingClientRect();
19476
19523
  const customBodyRect = customBodyElem.getBoundingClientRect();
19524
+ const dragLineEl = $xeTableCustomPanel.$refs.refDragLineElem;
19477
19525
  if (optEl) {
19478
- const dragLineEl = $xeTableCustomPanel.$refs.refDragLineElem;
19479
19526
  if (dragLineEl) {
19480
19527
  if (showLine) {
19481
19528
  const optRect = optEl.getBoundingClientRect();
@@ -19490,6 +19537,10 @@ function panel_showDropTip($xeTableCustomPanel, evnt, optEl, showLine, dragPos)
19490
19537
  dragLineEl.style.display = '';
19491
19538
  }
19492
19539
  }
19540
+ } else {
19541
+ if (dragLineEl) {
19542
+ dragLineEl.style.display = 'node';
19543
+ }
19493
19544
  }
19494
19545
  const dragTipEl = $xeTableCustomPanel.$refs.refDragTipElem;
19495
19546
  if (dragTipEl) {
@@ -19726,7 +19777,7 @@ const renderSimplePanel = (h, _vm) => {
19726
19777
  } : {}
19727
19778
  }, customStore.visible ? [h('div', {
19728
19779
  ref: 'refBodyWrapperElem',
19729
- class: 'vxe-table-custom-body-wrapper'
19780
+ class: 'vxe-table-custom-simple--body-wrapper'
19730
19781
  }, [!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel ? h($xeTable.getPivotTableAggregateSimplePanel(), {
19731
19782
  props: {
19732
19783
  customStore
@@ -20191,12 +20242,14 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
20191
20242
  data() {
20192
20243
  const reactData = {
20193
20244
  dragCol: null,
20194
- dragGroup: null,
20195
- dragValues: null,
20245
+ dragGroupField: null,
20246
+ dragAggFnCol: null,
20196
20247
  dragTipText: ''
20197
20248
  };
20198
20249
  const internalData = {
20199
20250
  // prevDragCol: undefined,
20251
+ // prevDragGroupField: undefined,
20252
+ // prevDragAggFnColid: undefined,
20200
20253
  // prevDragToChild: false,
20201
20254
  // prevDragPos: null
20202
20255
  };
@@ -20482,6 +20535,8 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
20482
20535
  const column = $xeTable.getColumnById(colid);
20483
20536
  trEl.draggable = true;
20484
20537
  customPanelReactData.dragCol = column;
20538
+ customPanelReactData.dragGroupField = null;
20539
+ customPanelReactData.dragAggFnCol = null;
20485
20540
  this.updateColDropTipContent();
20486
20541
  addClass(trEl, 'active--drag-origin');
20487
20542
  },
@@ -20495,16 +20550,18 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
20495
20550
  panel_hideDropTip($xeTableCustomPanel);
20496
20551
  trEl.draggable = false;
20497
20552
  customPanelReactData.dragCol = null;
20553
+ customPanelReactData.dragGroupField = null;
20554
+ customPanelReactData.dragAggFnCol = null;
20498
20555
  removeClass(trEl, 'active--drag-origin');
20499
20556
  },
20500
20557
  sortDragstartEvent(evnt) {
20501
20558
  const $xeTableCustomPanel = this;
20502
- const customPanelReactData = $xeTableCustomPanel.reactData;
20559
+ const customPanelInternalData = $xeTableCustomPanel.internalData;
20503
20560
  if (evnt.dataTransfer) {
20504
20561
  evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
20505
20562
  }
20506
- customPanelReactData.dragGroup = null;
20507
- customPanelReactData.dragValues = null;
20563
+ customPanelInternalData.prevDragGroupField = null;
20564
+ customPanelInternalData.prevDragAggFnColid = null;
20508
20565
  },
20509
20566
  sortDragendEvent(evnt) {
20510
20567
  const $xeTableCustomPanel = this;
@@ -20536,17 +20593,17 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
20536
20593
  dragEndMethod
20537
20594
  } = columnDragOpts;
20538
20595
  const {
20539
- dragCol,
20540
- dragGroup,
20541
- dragValues
20596
+ dragCol
20542
20597
  } = customPanelReactData;
20543
20598
  const {
20544
20599
  prevDragCol,
20600
+ prevDragGroupField,
20601
+ prevDragAggFnColid,
20545
20602
  prevDragPos,
20546
20603
  prevDragToChild
20547
20604
  } = customPanelInternalData;
20548
20605
  const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
20549
- if (dragGroup || dragValues) {
20606
+ if (prevDragGroupField || prevDragAggFnColid) {
20550
20607
  if ($xeTable.handlePivotTableAggregatePanelDragendEvent) {
20551
20608
  $xeTable.handlePivotTableAggregatePanelDragendEvent(evnt);
20552
20609
  }
@@ -20706,8 +20763,10 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
20706
20763
  }
20707
20764
  panel_hideDropTip($xeTableCustomPanel);
20708
20765
  customPanelReactData.dragCol = null;
20709
- customPanelReactData.dragGroup = null;
20710
- customPanelReactData.dragValues = null;
20766
+ customPanelReactData.dragGroupField = null;
20767
+ customPanelReactData.dragAggFnCol = null;
20768
+ customPanelInternalData.prevDragGroupField = null;
20769
+ customPanelInternalData.prevDragAggFnColid = null;
20711
20770
  trEl.draggable = false;
20712
20771
  trEl.removeAttribute('drag-pos');
20713
20772
  removeClass(trEl, 'active--drag-target');
@@ -20734,14 +20793,14 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
20734
20793
  const isControlKey = hasControlKey(evnt);
20735
20794
  const colid = optEl.getAttribute('colid');
20736
20795
  const column = $xeTable.getColumnById(colid);
20737
- customPanelReactData.dragGroup = null;
20738
- customPanelReactData.dragValues = null;
20796
+ customPanelInternalData.prevDragGroupField = null;
20797
+ customPanelInternalData.prevDragAggFnColid = null;
20739
20798
  // 是否移入有效列
20740
20799
  if (column && (isCrossDrag || column.level === 1)) {
20741
20800
  evnt.preventDefault();
20742
20801
  const offsetY = evnt.clientY - optEl.getBoundingClientRect().y;
20743
20802
  const dragPos = offsetY < optEl.clientHeight / 2 ? 'top' : 'bottom';
20744
- if (dragCol && dragCol.id === column.id || !isCrossDrag && column.level > 1 || !immediate && column.level > 1 || column.renderFixed) {
20803
+ if (!dragCol || dragCol && dragCol.id === column.id || !isCrossDrag && column.level > 1 || !immediate && column.level > 1 || column.renderFixed) {
20745
20804
  panel_showDropTip($xeTableCustomPanel, evnt, optEl, false, dragPos);
20746
20805
  return;
20747
20806
  }
@@ -27145,7 +27204,9 @@ function emitCustomEvent($xeTable, type, evnt) {
27145
27204
  allowVisible,
27146
27205
  allowSort,
27147
27206
  allowFixed,
27148
- allowResizable
27207
+ allowResizable,
27208
+ allowGroup,
27209
+ allowValues
27149
27210
  } = customOpts;
27150
27211
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parentColumn) => {
27151
27212
  if (parentColumn) {
@@ -27171,6 +27232,9 @@ function emitCustomEvent($xeTable, type, evnt) {
27171
27232
  if (allowVisible) {
27172
27233
  column.visible = column.renderVisible;
27173
27234
  }
27235
+ if (allowGroup && allowValues) {
27236
+ column.aggFunc = column.renderAggFn;
27237
+ }
27174
27238
  });
27175
27239
  reactData.isCustomStatus = true;
27176
27240
  reactData.isDragColMove = true;
@@ -27178,14 +27242,17 @@ function emitCustomEvent($xeTable, type, evnt) {
27178
27242
  reactData.isDragColMove = false;
27179
27243
  }, 1000);
27180
27244
  return $xeTable.saveCustomStore('confirm').then(() => {
27181
- if ($xeTable.handlePivotTableAggregateData) {
27245
+ if (allowGroup && allowValues && $xeTable.handlePivotTableAggregateData) {
27182
27246
  if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
27183
- // 改动聚合分组
27247
+ // 更新数据分组
27184
27248
  if (aggHandleFields.length) {
27185
27249
  $xeTable.setRowGroups(aggHandleFields);
27186
27250
  } else {
27187
27251
  $xeTable.clearRowGroups();
27188
27252
  }
27253
+ } else {
27254
+ // 更新聚合函数
27255
+ $xeTable.handleUpdateAggData();
27189
27256
  }
27190
27257
  }
27191
27258
  });
@@ -27250,7 +27317,8 @@ function emitCustomEvent($xeTable, type, evnt) {
27250
27317
  visible: true,
27251
27318
  resizable: options === true,
27252
27319
  fixed: options === true,
27253
- sort: options === true
27320
+ sort: options === true,
27321
+ aggFunc: options === true
27254
27322
  }, options);
27255
27323
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, column => {
27256
27324
  if (opts.resizable) {
@@ -27268,12 +27336,16 @@ function emitCustomEvent($xeTable, type, evnt) {
27268
27336
  })) {
27269
27337
  column.visible = column.defaultVisible;
27270
27338
  }
27339
+ if (opts.aggFunc) {
27340
+ column.aggFunc = column.defaultAggFunc;
27341
+ column.renderAggFn = column.defaultAggFunc;
27342
+ }
27271
27343
  column.renderResizeWidth = column.renderWidth;
27272
27344
  });
27273
27345
  reactData.isCustomStatus = false;
27274
27346
  $xeTable.saveCustomStore('reset');
27275
27347
  return $xeTable.handleCustom().then(() => {
27276
- if ($xeTable.handlePivotTableAggregateData) {
27348
+ if (opts.aggFunc && $xeTable.handlePivotTableAggregateData) {
27277
27349
  const rowGroupFields = $xeTable.computeRowGroupFields;
27278
27350
  if (rowGroupFields ? rowGroupFields.length : rowGroupList.length) {
27279
27351
  if (rowGroupFields && rowGroupFields.length) {
@@ -27281,6 +27353,8 @@ function emitCustomEvent($xeTable, type, evnt) {
27281
27353
  } else {
27282
27354
  $xeTable.clearRowGroups();
27283
27355
  }
27356
+ } else {
27357
+ $xeTable.handleUpdateAggData();
27284
27358
  }
27285
27359
  }
27286
27360
  });
@@ -28096,6 +28170,7 @@ function renderBody(h, $xeTable) {
28096
28170
  isRowGroupStatus: false,
28097
28171
  rowGroupList: [],
28098
28172
  aggHandleFields: [],
28173
+ aggHandleAggColumns: [],
28099
28174
  rowGroupExpandedFlag: 1,
28100
28175
  rowExpandedFlag: 1,
28101
28176
  treeExpandedFlag: 1,
@@ -29112,6 +29187,16 @@ function renderBody(h, $xeTable) {
29112
29187
  return;
29113
29188
  }
29114
29189
  }
29190
+ if (!$xeTable.handlePivotTableAggregateData) {
29191
+ if (customOpts.allowGroup) {
29192
+ errLog('vxe.error.notProp', ['custom-config.allowGroup']);
29193
+ return;
29194
+ }
29195
+ if (customOpts.allowValues) {
29196
+ errLog('vxe.error.notProp', ['custom-config.allowValues']);
29197
+ return;
29198
+ }
29199
+ }
29115
29200
  if (treeConfig && rowOpts.drag && !treeOpts.transform) {
29116
29201
  warnLog('vxe.error.notSupportProp', ['column-config.drag', 'tree-config.transform=false', 'tree-config.transform=true']);
29117
29202
  }
@@ -29124,8 +29209,8 @@ function renderBody(h, $xeTable) {
29124
29209
  if (aggregateOpts.countFields) {
29125
29210
  warnLog('vxe.error.delProp', ['row-group-config.countFields', 'column.agg-func']);
29126
29211
  }
29127
- if (aggregateOpts.countMethod) {
29128
- warnLog('vxe.error.delProp', ['row-group-config.countMethod', 'aggregate-config.aggregateMethod']);
29212
+ if (aggregateOpts.aggregateMethod) {
29213
+ warnLog('vxe.error.delProp', ['row-group-config.aggregateMethod', 'aggregate-config.countMethod']);
29129
29214
  }
29130
29215
  if (props.treeConfig && treeOpts.children) {
29131
29216
  warnLog('vxe.error.delProp', ['tree-config.children', 'tree-config.childrenField']);
@@ -29534,7 +29619,7 @@ function renderBody(h, $xeTable) {
29534
29619
  */
29535
29620
  initStore.custom ? h(panel, {
29536
29621
  key: 'cs',
29537
- ref: 'customWrapper',
29622
+ ref: 'refTableCustom',
29538
29623
  props: {
29539
29624
  customStore
29540
29625
  }
@@ -33641,6 +33726,7 @@ const Toolbar = VxeToolbar;
33641
33726
  customCancel: '取消',
33642
33727
  customRestore: '恢复默认',
33643
33728
  maxFixedCol: '最大冻结列的数量不能超过 {0} 个',
33729
+ maxGroupCol: '最大分组字段的数量不能超过 {0} 个',
33644
33730
  dragTip: '移动:{0}',
33645
33731
  resizeColTip: '宽:{0} 像素',
33646
33732
  resizeRowTip: '高:{0} 像素',
@@ -34123,7 +34209,19 @@ const Toolbar = VxeToolbar;
34123
34209
  extendPivotTable: {
34124
34210
  aggregation: {
34125
34211
  grouping: '分组',
34126
- values: '值'
34212
+ values: '值',
34213
+ groupPlaceholder: '拖至此处进行分组',
34214
+ valuesPlaceholder: '拖至此处进行聚合',
34215
+ dragExistCol: '该列已存在'
34216
+ },
34217
+ aggFuncs: {
34218
+ sum: '求和',
34219
+ count: '计数',
34220
+ avg: '平均值',
34221
+ min: '最小值',
34222
+ max: '最大值',
34223
+ first: '首个值',
34224
+ last: '末尾值'
34127
34225
  }
34128
34226
  },
34129
34227
  filterComplexInput: {