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.
- package/es/locale/lang/ar-EG.js +14 -1
- package/es/locale/lang/de-DE.js +14 -1
- package/es/locale/lang/en-US.js +14 -1
- package/es/locale/lang/es-ES.js +14 -1
- package/es/locale/lang/fr-FR.js +14 -1
- package/es/locale/lang/hu-HU.js +14 -1
- package/es/locale/lang/hy-AM.js +14 -1
- package/es/locale/lang/id-ID.js +14 -1
- package/es/locale/lang/it-IT.js +14 -1
- package/es/locale/lang/ja-JP.js +14 -1
- package/es/locale/lang/ko-KR.js +14 -1
- package/es/locale/lang/ms-MY.js +14 -1
- package/es/locale/lang/nb-NO.js +14 -1
- package/es/locale/lang/pt-BR.js +14 -1
- package/es/locale/lang/ru-RU.js +14 -1
- package/es/locale/lang/th-TH.js +14 -1
- package/es/locale/lang/ug-CN.js +14 -1
- package/es/locale/lang/uk-UA.js +14 -1
- package/es/locale/lang/uz-UZ.js +14 -1
- package/es/locale/lang/vi-VN.js +14 -1
- package/es/locale/lang/zh-CHT.js +15 -2
- package/es/locale/lang/zh-CN.js +14 -1
- package/es/style.css +1 -1
- package/es/table/module/custom/mixin.js +20 -5
- package/es/table/module/custom/panel.js +27 -13
- package/es/table/src/columnInfo.js +1 -0
- package/es/table/src/methods.js +48 -15
- package/es/table/src/table.js +14 -3
- package/es/ui/index.js +8 -5
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +135 -47
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +14 -1
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +14 -1
- package/lib/locale/lang/de-DE.js +14 -1
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +14 -1
- package/lib/locale/lang/en-US.js +14 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +14 -1
- package/lib/locale/lang/es-ES.js +14 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +14 -1
- package/lib/locale/lang/fr-FR.js +14 -1
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +14 -1
- package/lib/locale/lang/hu-HU.js +14 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +14 -1
- package/lib/locale/lang/hy-AM.js +14 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +14 -1
- package/lib/locale/lang/id-ID.js +14 -1
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +14 -1
- package/lib/locale/lang/it-IT.js +14 -1
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +14 -1
- package/lib/locale/lang/ja-JP.js +14 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +14 -1
- package/lib/locale/lang/ko-KR.js +14 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +14 -1
- package/lib/locale/lang/ms-MY.js +14 -1
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +14 -1
- package/lib/locale/lang/nb-NO.js +14 -1
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +14 -1
- package/lib/locale/lang/pt-BR.js +14 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +14 -1
- package/lib/locale/lang/ru-RU.js +14 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +14 -1
- package/lib/locale/lang/th-TH.js +14 -1
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +14 -1
- package/lib/locale/lang/ug-CN.js +14 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +14 -1
- package/lib/locale/lang/uk-UA.js +14 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +14 -1
- package/lib/locale/lang/uz-UZ.js +14 -1
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +14 -1
- package/lib/locale/lang/vi-VN.js +14 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +14 -1
- package/lib/locale/lang/zh-CHT.js +15 -2
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +15 -2
- package/lib/locale/lang/zh-CN.js +14 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +14 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/mixin.js +20 -5
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +26 -14
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/src/columnInfo.js +1 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +51 -18
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +14 -3
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +8 -5
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/locale/lang/ar-EG.ts +14 -1
- package/packages/locale/lang/de-DE.ts +14 -1
- package/packages/locale/lang/en-US.ts +14 -1
- package/packages/locale/lang/es-ES.ts +14 -1
- package/packages/locale/lang/fr-FR.ts +14 -1
- package/packages/locale/lang/hu-HU.ts +14 -1
- package/packages/locale/lang/hy-AM.ts +14 -1
- package/packages/locale/lang/id-ID.ts +14 -1
- package/packages/locale/lang/it-IT.ts +14 -1
- package/packages/locale/lang/ja-JP.ts +14 -1
- package/packages/locale/lang/ko-KR.ts +14 -1
- package/packages/locale/lang/ms-MY.ts +14 -1
- package/packages/locale/lang/nb-NO.ts +14 -1
- package/packages/locale/lang/pt-BR.ts +14 -1
- package/packages/locale/lang/ru-RU.ts +14 -1
- package/packages/locale/lang/th-TH.ts +14 -1
- package/packages/locale/lang/ug-CN.ts +14 -1
- package/packages/locale/lang/uk-UA.ts +14 -1
- package/packages/locale/lang/uz-UZ.ts +14 -1
- package/packages/locale/lang/vi-VN.ts +14 -1
- package/packages/locale/lang/zh-CHT.ts +15 -2
- package/packages/locale/lang/zh-CN.ts +14 -1
- package/packages/table/module/custom/mixin.ts +18 -5
- package/packages/table/module/custom/panel.ts +25 -12
- package/packages/table/src/columnInfo.ts +1 -0
- package/packages/table/src/methods.ts +50 -14
- package/packages/table/src/table.ts +14 -3
- package/packages/ui/index.ts +7 -4
- /package/es/{iconfont.1750651550655.ttf → iconfont.1750732150166.ttf} +0 -0
- /package/es/{iconfont.1750651550655.woff → iconfont.1750732150166.woff} +0 -0
- /package/es/{iconfont.1750651550655.woff2 → iconfont.1750732150166.woff2} +0 -0
- /package/lib/{iconfont.1750651550655.ttf → iconfont.1750732150166.ttf} +0 -0
- /package/lib/{iconfont.1750651550655.woff → iconfont.1750732150166.woff} +0 -0
- /package/lib/{iconfont.1750651550655.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.
|
|
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
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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 =
|
|
11051
|
-
const isCustomVisible =
|
|
11052
|
-
const isCustomFixed =
|
|
11053
|
-
const isCustomSort =
|
|
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 (
|
|
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,
|
|
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 (
|
|
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) {
|
|
@@ -17121,6 +17153,11 @@ const Methods = {
|
|
|
17121
17153
|
return updateStyle($xeTable);
|
|
17122
17154
|
});
|
|
17123
17155
|
},
|
|
17156
|
+
handleUpdateAggData() {
|
|
17157
|
+
const $xeTable = this;
|
|
17158
|
+
const internalData = $xeTable;
|
|
17159
|
+
return loadTableData($xeTable, internalData.tableSynchData, true);
|
|
17160
|
+
},
|
|
17124
17161
|
updateZindex() {
|
|
17125
17162
|
if (this.zIndex) {
|
|
17126
17163
|
this.tZindex = this.zIndex;
|
|
@@ -19484,8 +19521,8 @@ function panel_showDropTip($xeTableCustomPanel, evnt, optEl, showLine, dragPos)
|
|
|
19484
19521
|
} = customPanelInternalData;
|
|
19485
19522
|
const bodyWrapperRect = bodyWrapperElem.getBoundingClientRect();
|
|
19486
19523
|
const customBodyRect = customBodyElem.getBoundingClientRect();
|
|
19524
|
+
const dragLineEl = $xeTableCustomPanel.$refs.refDragLineElem;
|
|
19487
19525
|
if (optEl) {
|
|
19488
|
-
const dragLineEl = $xeTableCustomPanel.$refs.refDragLineElem;
|
|
19489
19526
|
if (dragLineEl) {
|
|
19490
19527
|
if (showLine) {
|
|
19491
19528
|
const optRect = optEl.getBoundingClientRect();
|
|
@@ -19500,6 +19537,10 @@ function panel_showDropTip($xeTableCustomPanel, evnt, optEl, showLine, dragPos)
|
|
|
19500
19537
|
dragLineEl.style.display = '';
|
|
19501
19538
|
}
|
|
19502
19539
|
}
|
|
19540
|
+
} else {
|
|
19541
|
+
if (dragLineEl) {
|
|
19542
|
+
dragLineEl.style.display = 'node';
|
|
19543
|
+
}
|
|
19503
19544
|
}
|
|
19504
19545
|
const dragTipEl = $xeTableCustomPanel.$refs.refDragTipElem;
|
|
19505
19546
|
if (dragTipEl) {
|
|
@@ -19736,7 +19777,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
19736
19777
|
} : {}
|
|
19737
19778
|
}, customStore.visible ? [h('div', {
|
|
19738
19779
|
ref: 'refBodyWrapperElem',
|
|
19739
|
-
class: 'vxe-table-custom-body-wrapper'
|
|
19780
|
+
class: 'vxe-table-custom-simple--body-wrapper'
|
|
19740
19781
|
}, [!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel ? h($xeTable.getPivotTableAggregateSimplePanel(), {
|
|
19741
19782
|
props: {
|
|
19742
19783
|
customStore
|
|
@@ -20201,12 +20242,14 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
20201
20242
|
data() {
|
|
20202
20243
|
const reactData = {
|
|
20203
20244
|
dragCol: null,
|
|
20245
|
+
dragGroupField: null,
|
|
20246
|
+
dragAggFnCol: null,
|
|
20204
20247
|
dragTipText: ''
|
|
20205
20248
|
};
|
|
20206
20249
|
const internalData = {
|
|
20207
20250
|
// prevDragCol: undefined,
|
|
20208
|
-
//
|
|
20209
|
-
//
|
|
20251
|
+
// prevDragGroupField: undefined,
|
|
20252
|
+
// prevDragAggFnColid: undefined,
|
|
20210
20253
|
// prevDragToChild: false,
|
|
20211
20254
|
// prevDragPos: null
|
|
20212
20255
|
};
|
|
@@ -20492,6 +20535,8 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
20492
20535
|
const column = $xeTable.getColumnById(colid);
|
|
20493
20536
|
trEl.draggable = true;
|
|
20494
20537
|
customPanelReactData.dragCol = column;
|
|
20538
|
+
customPanelReactData.dragGroupField = null;
|
|
20539
|
+
customPanelReactData.dragAggFnCol = null;
|
|
20495
20540
|
this.updateColDropTipContent();
|
|
20496
20541
|
addClass(trEl, 'active--drag-origin');
|
|
20497
20542
|
},
|
|
@@ -20505,6 +20550,8 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
20505
20550
|
panel_hideDropTip($xeTableCustomPanel);
|
|
20506
20551
|
trEl.draggable = false;
|
|
20507
20552
|
customPanelReactData.dragCol = null;
|
|
20553
|
+
customPanelReactData.dragGroupField = null;
|
|
20554
|
+
customPanelReactData.dragAggFnCol = null;
|
|
20508
20555
|
removeClass(trEl, 'active--drag-origin');
|
|
20509
20556
|
},
|
|
20510
20557
|
sortDragstartEvent(evnt) {
|
|
@@ -20513,8 +20560,8 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
20513
20560
|
if (evnt.dataTransfer) {
|
|
20514
20561
|
evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
|
|
20515
20562
|
}
|
|
20516
|
-
customPanelInternalData.
|
|
20517
|
-
customPanelInternalData.
|
|
20563
|
+
customPanelInternalData.prevDragGroupField = null;
|
|
20564
|
+
customPanelInternalData.prevDragAggFnColid = null;
|
|
20518
20565
|
},
|
|
20519
20566
|
sortDragendEvent(evnt) {
|
|
20520
20567
|
const $xeTableCustomPanel = this;
|
|
@@ -20550,13 +20597,13 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
20550
20597
|
} = customPanelReactData;
|
|
20551
20598
|
const {
|
|
20552
20599
|
prevDragCol,
|
|
20553
|
-
|
|
20554
|
-
|
|
20600
|
+
prevDragGroupField,
|
|
20601
|
+
prevDragAggFnColid,
|
|
20555
20602
|
prevDragPos,
|
|
20556
20603
|
prevDragToChild
|
|
20557
20604
|
} = customPanelInternalData;
|
|
20558
20605
|
const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
|
|
20559
|
-
if (
|
|
20606
|
+
if (prevDragGroupField || prevDragAggFnColid) {
|
|
20560
20607
|
if ($xeTable.handlePivotTableAggregatePanelDragendEvent) {
|
|
20561
20608
|
$xeTable.handlePivotTableAggregatePanelDragendEvent(evnt);
|
|
20562
20609
|
}
|
|
@@ -20716,8 +20763,10 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
20716
20763
|
}
|
|
20717
20764
|
panel_hideDropTip($xeTableCustomPanel);
|
|
20718
20765
|
customPanelReactData.dragCol = null;
|
|
20719
|
-
|
|
20720
|
-
|
|
20766
|
+
customPanelReactData.dragGroupField = null;
|
|
20767
|
+
customPanelReactData.dragAggFnCol = null;
|
|
20768
|
+
customPanelInternalData.prevDragGroupField = null;
|
|
20769
|
+
customPanelInternalData.prevDragAggFnColid = null;
|
|
20721
20770
|
trEl.draggable = false;
|
|
20722
20771
|
trEl.removeAttribute('drag-pos');
|
|
20723
20772
|
removeClass(trEl, 'active--drag-target');
|
|
@@ -20744,14 +20793,14 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
20744
20793
|
const isControlKey = hasControlKey(evnt);
|
|
20745
20794
|
const colid = optEl.getAttribute('colid');
|
|
20746
20795
|
const column = $xeTable.getColumnById(colid);
|
|
20747
|
-
customPanelInternalData.
|
|
20748
|
-
customPanelInternalData.
|
|
20796
|
+
customPanelInternalData.prevDragGroupField = null;
|
|
20797
|
+
customPanelInternalData.prevDragAggFnColid = null;
|
|
20749
20798
|
// 是否移入有效列
|
|
20750
20799
|
if (column && (isCrossDrag || column.level === 1)) {
|
|
20751
20800
|
evnt.preventDefault();
|
|
20752
20801
|
const offsetY = evnt.clientY - optEl.getBoundingClientRect().y;
|
|
20753
20802
|
const dragPos = offsetY < optEl.clientHeight / 2 ? 'top' : 'bottom';
|
|
20754
|
-
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) {
|
|
20755
20804
|
panel_showDropTip($xeTableCustomPanel, evnt, optEl, false, dragPos);
|
|
20756
20805
|
return;
|
|
20757
20806
|
}
|
|
@@ -27155,7 +27204,9 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
27155
27204
|
allowVisible,
|
|
27156
27205
|
allowSort,
|
|
27157
27206
|
allowFixed,
|
|
27158
|
-
allowResizable
|
|
27207
|
+
allowResizable,
|
|
27208
|
+
allowGroup,
|
|
27209
|
+
allowValues
|
|
27159
27210
|
} = customOpts;
|
|
27160
27211
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parentColumn) => {
|
|
27161
27212
|
if (parentColumn) {
|
|
@@ -27181,6 +27232,9 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
27181
27232
|
if (allowVisible) {
|
|
27182
27233
|
column.visible = column.renderVisible;
|
|
27183
27234
|
}
|
|
27235
|
+
if (allowGroup && allowValues) {
|
|
27236
|
+
column.aggFunc = column.renderAggFn;
|
|
27237
|
+
}
|
|
27184
27238
|
});
|
|
27185
27239
|
reactData.isCustomStatus = true;
|
|
27186
27240
|
reactData.isDragColMove = true;
|
|
@@ -27188,14 +27242,17 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
27188
27242
|
reactData.isDragColMove = false;
|
|
27189
27243
|
}, 1000);
|
|
27190
27244
|
return $xeTable.saveCustomStore('confirm').then(() => {
|
|
27191
|
-
if ($xeTable.handlePivotTableAggregateData) {
|
|
27245
|
+
if (allowGroup && allowValues && $xeTable.handlePivotTableAggregateData) {
|
|
27192
27246
|
if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
|
|
27193
|
-
//
|
|
27247
|
+
// 更新数据分组
|
|
27194
27248
|
if (aggHandleFields.length) {
|
|
27195
27249
|
$xeTable.setRowGroups(aggHandleFields);
|
|
27196
27250
|
} else {
|
|
27197
27251
|
$xeTable.clearRowGroups();
|
|
27198
27252
|
}
|
|
27253
|
+
} else {
|
|
27254
|
+
// 更新聚合函数
|
|
27255
|
+
$xeTable.handleUpdateAggData();
|
|
27199
27256
|
}
|
|
27200
27257
|
}
|
|
27201
27258
|
});
|
|
@@ -27260,7 +27317,8 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
27260
27317
|
visible: true,
|
|
27261
27318
|
resizable: options === true,
|
|
27262
27319
|
fixed: options === true,
|
|
27263
|
-
sort: options === true
|
|
27320
|
+
sort: options === true,
|
|
27321
|
+
aggFunc: options === true
|
|
27264
27322
|
}, options);
|
|
27265
27323
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, column => {
|
|
27266
27324
|
if (opts.resizable) {
|
|
@@ -27278,12 +27336,16 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
27278
27336
|
})) {
|
|
27279
27337
|
column.visible = column.defaultVisible;
|
|
27280
27338
|
}
|
|
27339
|
+
if (opts.aggFunc) {
|
|
27340
|
+
column.aggFunc = column.defaultAggFunc;
|
|
27341
|
+
column.renderAggFn = column.defaultAggFunc;
|
|
27342
|
+
}
|
|
27281
27343
|
column.renderResizeWidth = column.renderWidth;
|
|
27282
27344
|
});
|
|
27283
27345
|
reactData.isCustomStatus = false;
|
|
27284
27346
|
$xeTable.saveCustomStore('reset');
|
|
27285
27347
|
return $xeTable.handleCustom().then(() => {
|
|
27286
|
-
if ($xeTable.handlePivotTableAggregateData) {
|
|
27348
|
+
if (opts.aggFunc && $xeTable.handlePivotTableAggregateData) {
|
|
27287
27349
|
const rowGroupFields = $xeTable.computeRowGroupFields;
|
|
27288
27350
|
if (rowGroupFields ? rowGroupFields.length : rowGroupList.length) {
|
|
27289
27351
|
if (rowGroupFields && rowGroupFields.length) {
|
|
@@ -27291,6 +27353,8 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
27291
27353
|
} else {
|
|
27292
27354
|
$xeTable.clearRowGroups();
|
|
27293
27355
|
}
|
|
27356
|
+
} else {
|
|
27357
|
+
$xeTable.handleUpdateAggData();
|
|
27294
27358
|
}
|
|
27295
27359
|
}
|
|
27296
27360
|
});
|
|
@@ -28106,6 +28170,7 @@ function renderBody(h, $xeTable) {
|
|
|
28106
28170
|
isRowGroupStatus: false,
|
|
28107
28171
|
rowGroupList: [],
|
|
28108
28172
|
aggHandleFields: [],
|
|
28173
|
+
aggHandleAggColumns: [],
|
|
28109
28174
|
rowGroupExpandedFlag: 1,
|
|
28110
28175
|
rowExpandedFlag: 1,
|
|
28111
28176
|
treeExpandedFlag: 1,
|
|
@@ -29122,6 +29187,16 @@ function renderBody(h, $xeTable) {
|
|
|
29122
29187
|
return;
|
|
29123
29188
|
}
|
|
29124
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
|
+
}
|
|
29125
29200
|
if (treeConfig && rowOpts.drag && !treeOpts.transform) {
|
|
29126
29201
|
warnLog('vxe.error.notSupportProp', ['column-config.drag', 'tree-config.transform=false', 'tree-config.transform=true']);
|
|
29127
29202
|
}
|
|
@@ -29134,8 +29209,8 @@ function renderBody(h, $xeTable) {
|
|
|
29134
29209
|
if (aggregateOpts.countFields) {
|
|
29135
29210
|
warnLog('vxe.error.delProp', ['row-group-config.countFields', 'column.agg-func']);
|
|
29136
29211
|
}
|
|
29137
|
-
if (aggregateOpts.
|
|
29138
|
-
warnLog('vxe.error.delProp', ['row-group-config.
|
|
29212
|
+
if (aggregateOpts.aggregateMethod) {
|
|
29213
|
+
warnLog('vxe.error.delProp', ['row-group-config.aggregateMethod', 'aggregate-config.countMethod']);
|
|
29139
29214
|
}
|
|
29140
29215
|
if (props.treeConfig && treeOpts.children) {
|
|
29141
29216
|
warnLog('vxe.error.delProp', ['tree-config.children', 'tree-config.childrenField']);
|
|
@@ -29544,7 +29619,7 @@ function renderBody(h, $xeTable) {
|
|
|
29544
29619
|
*/
|
|
29545
29620
|
initStore.custom ? h(panel, {
|
|
29546
29621
|
key: 'cs',
|
|
29547
|
-
ref: '
|
|
29622
|
+
ref: 'refTableCustom',
|
|
29548
29623
|
props: {
|
|
29549
29624
|
customStore
|
|
29550
29625
|
}
|
|
@@ -33651,6 +33726,7 @@ const Toolbar = VxeToolbar;
|
|
|
33651
33726
|
customCancel: '取消',
|
|
33652
33727
|
customRestore: '恢复默认',
|
|
33653
33728
|
maxFixedCol: '最大冻结列的数量不能超过 {0} 个',
|
|
33729
|
+
maxGroupCol: '最大分组字段的数量不能超过 {0} 个',
|
|
33654
33730
|
dragTip: '移动:{0}',
|
|
33655
33731
|
resizeColTip: '宽:{0} 像素',
|
|
33656
33732
|
resizeRowTip: '高:{0} 像素',
|
|
@@ -34133,7 +34209,19 @@ const Toolbar = VxeToolbar;
|
|
|
34133
34209
|
extendPivotTable: {
|
|
34134
34210
|
aggregation: {
|
|
34135
34211
|
grouping: '分组',
|
|
34136
|
-
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: '末尾值'
|
|
34137
34225
|
}
|
|
34138
34226
|
},
|
|
34139
34227
|
filterComplexInput: {
|