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.
- 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 +29 -15
- package/es/table/src/columnInfo.js +1 -0
- package/es/table/src/methods.js +57 -16
- 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 +148 -50
- 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 +28 -16
- 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 +62 -19
- 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 +27 -14
- package/packages/table/src/columnInfo.ts +1 -0
- package/packages/table/src/methods.ts +61 -16
- package/packages/table/src/table.ts +14 -3
- package/packages/ui/index.ts +7 -4
- /package/es/{iconfont.1750641764687.ttf → iconfont.1750732150166.ttf} +0 -0
- /package/es/{iconfont.1750641764687.woff → iconfont.1750732150166.woff} +0 -0
- /package/es/{iconfont.1750641764687.woff2 → iconfont.1750732150166.woff2} +0 -0
- /package/lib/{iconfont.1750641764687.ttf → iconfont.1750732150166.ttf} +0 -0
- /package/lib/{iconfont.1750641764687.woff → iconfont.1750732150166.woff} +0 -0
- /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.
|
|
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) {
|
|
@@ -13143,7 +13175,17 @@ const Methods = {
|
|
|
13143
13175
|
}
|
|
13144
13176
|
vLen++;
|
|
13145
13177
|
});
|
|
13146
|
-
|
|
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
|
-
|
|
20195
|
-
|
|
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
|
|
20559
|
+
const customPanelInternalData = $xeTableCustomPanel.internalData;
|
|
20503
20560
|
if (evnt.dataTransfer) {
|
|
20504
20561
|
evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
|
|
20505
20562
|
}
|
|
20506
|
-
|
|
20507
|
-
|
|
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 (
|
|
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.
|
|
20710
|
-
customPanelReactData.
|
|
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
|
-
|
|
20738
|
-
|
|
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.
|
|
29128
|
-
warnLog('vxe.error.delProp', ['row-group-config.
|
|
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: '
|
|
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: {
|