vxe-table 3.14.0-beta.12 → 3.14.0-beta.13
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/style.css +1 -1
- package/es/table/src/methods.js +36 -35
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +41 -39
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/methods.js +39 -37
- package/lib/table/src/methods.min.js +1 -1
- package/lib/ui/index.js +1 -1
- 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 +2 -2
- package/packages/table/src/methods.ts +44 -42
- /package/es/{iconfont.1741688823804.ttf → iconfont.1741830507096.ttf} +0 -0
- /package/es/{iconfont.1741688823804.woff → iconfont.1741830507096.woff} +0 -0
- /package/es/{iconfont.1741688823804.woff2 → iconfont.1741830507096.woff2} +0 -0
- /package/lib/{iconfont.1741688823804.ttf → iconfont.1741830507096.ttf} +0 -0
- /package/lib/{iconfont.1741688823804.woff → iconfont.1741830507096.woff} +0 -0
- /package/lib/{iconfont.1741688823804.woff2 → iconfont.1741830507096.woff2} +0 -0
package/es/table/src/methods.js
CHANGED
|
@@ -218,7 +218,7 @@ function cacheColumnMap($xeTable) {
|
|
|
218
218
|
}
|
|
219
219
|
else {
|
|
220
220
|
if ((storage && !type) || (columnOpts.drag && (isCrossDrag || isSelfToChildDrag))) {
|
|
221
|
-
errLog('vxe.error.reqProp', [`${column.getTitle() || type || ''} -> column.field
|
|
221
|
+
errLog('vxe.error.reqProp', [`${column.getTitle() || type || ''} -> column.field=?`]);
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
if (!hasFixed && fixed) {
|
|
@@ -4039,8 +4039,19 @@ const Methods = {
|
|
|
4039
4039
|
}
|
|
4040
4040
|
},
|
|
4041
4041
|
getCustomStoreData() {
|
|
4042
|
-
const
|
|
4043
|
-
const
|
|
4042
|
+
const $xeTable = this;
|
|
4043
|
+
const props = $xeTable;
|
|
4044
|
+
const internalData = $xeTable;
|
|
4045
|
+
const { id } = props;
|
|
4046
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
4047
|
+
const { collectColumn } = internalData;
|
|
4048
|
+
const { storage, checkMethod } = customOpts;
|
|
4049
|
+
const isAllCustom = storage === true;
|
|
4050
|
+
const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
|
|
4051
|
+
const isCustomResizable = isAllCustom || storageOpts.resizable;
|
|
4052
|
+
const isCustomVisible = isAllCustom || storageOpts.visible;
|
|
4053
|
+
const isCustomFixed = isAllCustom || storageOpts.fixed;
|
|
4054
|
+
const isCustomSort = isAllCustom || storageOpts.sort;
|
|
4044
4055
|
const resizableData = {};
|
|
4045
4056
|
const sortData = {};
|
|
4046
4057
|
const visibleData = {};
|
|
@@ -4057,47 +4068,37 @@ const Methods = {
|
|
|
4057
4068
|
}
|
|
4058
4069
|
let hasResizable = 0;
|
|
4059
4070
|
let hasSort = 0;
|
|
4060
|
-
let
|
|
4071
|
+
let hasFixed = 0;
|
|
4061
4072
|
let hasVisible = 0;
|
|
4062
4073
|
XEUtils.eachTree(collectColumn, (column, index, items, path, parentColumn) => {
|
|
4074
|
+
const colKey = column.getKey();
|
|
4075
|
+
if (!colKey) {
|
|
4076
|
+
errLog('vxe.error.reqProp', [`${column.getTitle() || column.type || ''} -> column.field=?`]);
|
|
4077
|
+
return;
|
|
4078
|
+
}
|
|
4063
4079
|
// 只支持一级
|
|
4064
4080
|
if (!parentColumn) {
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
hasSort = 1;
|
|
4069
|
-
sortData[colKey] = column.renderSortNumber;
|
|
4070
|
-
}
|
|
4071
|
-
});
|
|
4072
|
-
if (column.fixed !== column.defaultFixed) {
|
|
4073
|
-
const colKey = column.getKey();
|
|
4074
|
-
if (colKey) {
|
|
4075
|
-
hasFixedt = 1;
|
|
4076
|
-
fixedData[colKey] = column.fixed;
|
|
4077
|
-
}
|
|
4081
|
+
if (isCustomSort) {
|
|
4082
|
+
hasSort = 1;
|
|
4083
|
+
sortData[colKey] = column.renderSortNumber;
|
|
4078
4084
|
}
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
if (colKey) {
|
|
4083
|
-
hasResizable = 1;
|
|
4084
|
-
resizableData[colKey] = column.renderWidth;
|
|
4085
|
+
if (isCustomFixed && column.fixed !== column.defaultFixed) {
|
|
4086
|
+
hasFixed = 1;
|
|
4087
|
+
fixedData[colKey] = column.fixed;
|
|
4085
4088
|
}
|
|
4086
4089
|
}
|
|
4087
|
-
if (
|
|
4090
|
+
if (isCustomResizable && column.resizeWidth) {
|
|
4091
|
+
hasResizable = 1;
|
|
4092
|
+
resizableData[colKey] = column.renderWidth;
|
|
4093
|
+
}
|
|
4094
|
+
if (isCustomVisible && (!checkMethod || checkMethod({ column }))) {
|
|
4088
4095
|
if (!column.visible && column.defaultVisible) {
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
hasVisible = 1;
|
|
4092
|
-
visibleData[colKey] = false;
|
|
4093
|
-
}
|
|
4096
|
+
hasVisible = 1;
|
|
4097
|
+
visibleData[colKey] = false;
|
|
4094
4098
|
}
|
|
4095
4099
|
else if (column.visible && !column.defaultVisible) {
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
hasVisible = 1;
|
|
4099
|
-
visibleData[colKey] = true;
|
|
4100
|
-
}
|
|
4100
|
+
hasVisible = 1;
|
|
4101
|
+
visibleData[colKey] = true;
|
|
4101
4102
|
}
|
|
4102
4103
|
}
|
|
4103
4104
|
});
|
|
@@ -4107,7 +4108,7 @@ const Methods = {
|
|
|
4107
4108
|
if (hasSort) {
|
|
4108
4109
|
storeData.sortData = sortData;
|
|
4109
4110
|
}
|
|
4110
|
-
if (
|
|
4111
|
+
if (hasFixed) {
|
|
4111
4112
|
storeData.fixedData = fixedData;
|
|
4112
4113
|
}
|
|
4113
4114
|
if (hasVisible) {
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
|
|
|
2220
2220
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2221
2221
|
|
|
2222
2222
|
|
|
2223
|
-
const version = "3.14.0-beta.
|
|
2223
|
+
const version = "3.14.0-beta.13";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2843,7 +2843,7 @@ function isNodeElement(elem) {
|
|
|
2843
2843
|
const {
|
|
2844
2844
|
log: log_log
|
|
2845
2845
|
} = core_.VxeUI;
|
|
2846
|
-
const log_version = `table v${"3.14.0-beta.
|
|
2846
|
+
const log_version = `table v${"3.14.0-beta.13"}`;
|
|
2847
2847
|
const warnLog = log_log.create('warn', log_version);
|
|
2848
2848
|
const errLog = log_log.create('error', log_version);
|
|
2849
2849
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -5381,7 +5381,7 @@ function cacheColumnMap($xeTable) {
|
|
|
5381
5381
|
fullColumnFieldData[field] = rest;
|
|
5382
5382
|
} else {
|
|
5383
5383
|
if (storage && !type || columnOpts.drag && (isCrossDrag || isSelfToChildDrag)) {
|
|
5384
|
-
errLog('vxe.error.reqProp', [`${column.getTitle() || type || ''} -> column.field
|
|
5384
|
+
errLog('vxe.error.reqProp', [`${column.getTitle() || type || ''} -> column.field=?`]);
|
|
5385
5385
|
}
|
|
5386
5386
|
}
|
|
5387
5387
|
if (!hasFixed && fixed) {
|
|
@@ -9815,14 +9815,26 @@ const Methods = {
|
|
|
9815
9815
|
}
|
|
9816
9816
|
},
|
|
9817
9817
|
getCustomStoreData() {
|
|
9818
|
+
const $xeTable = this;
|
|
9819
|
+
const props = $xeTable;
|
|
9820
|
+
const internalData = $xeTable;
|
|
9821
|
+
const {
|
|
9822
|
+
id
|
|
9823
|
+
} = props;
|
|
9824
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
9818
9825
|
const {
|
|
9819
|
-
id,
|
|
9820
|
-
customOpts,
|
|
9821
9826
|
collectColumn
|
|
9822
|
-
} =
|
|
9827
|
+
} = internalData;
|
|
9823
9828
|
const {
|
|
9829
|
+
storage,
|
|
9824
9830
|
checkMethod
|
|
9825
9831
|
} = customOpts;
|
|
9832
|
+
const isAllCustom = storage === true;
|
|
9833
|
+
const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
|
|
9834
|
+
const isCustomResizable = isAllCustom || storageOpts.resizable;
|
|
9835
|
+
const isCustomVisible = isAllCustom || storageOpts.visible;
|
|
9836
|
+
const isCustomFixed = isAllCustom || storageOpts.fixed;
|
|
9837
|
+
const isCustomSort = isAllCustom || storageOpts.sort;
|
|
9826
9838
|
const resizableData = {};
|
|
9827
9839
|
const sortData = {};
|
|
9828
9840
|
const visibleData = {};
|
|
@@ -9839,48 +9851,38 @@ const Methods = {
|
|
|
9839
9851
|
}
|
|
9840
9852
|
let hasResizable = 0;
|
|
9841
9853
|
let hasSort = 0;
|
|
9842
|
-
let
|
|
9854
|
+
let hasFixed = 0;
|
|
9843
9855
|
let hasVisible = 0;
|
|
9844
9856
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, (column, index, items, path, parentColumn) => {
|
|
9857
|
+
const colKey = column.getKey();
|
|
9858
|
+
if (!colKey) {
|
|
9859
|
+
errLog('vxe.error.reqProp', [`${column.getTitle() || column.type || ''} -> column.field=?`]);
|
|
9860
|
+
return;
|
|
9861
|
+
}
|
|
9845
9862
|
// 只支持一级
|
|
9846
9863
|
if (!parentColumn) {
|
|
9847
|
-
|
|
9848
|
-
|
|
9849
|
-
|
|
9850
|
-
hasSort = 1;
|
|
9851
|
-
sortData[colKey] = column.renderSortNumber;
|
|
9852
|
-
}
|
|
9853
|
-
});
|
|
9854
|
-
if (column.fixed !== column.defaultFixed) {
|
|
9855
|
-
const colKey = column.getKey();
|
|
9856
|
-
if (colKey) {
|
|
9857
|
-
hasFixedt = 1;
|
|
9858
|
-
fixedData[colKey] = column.fixed;
|
|
9859
|
-
}
|
|
9864
|
+
if (isCustomSort) {
|
|
9865
|
+
hasSort = 1;
|
|
9866
|
+
sortData[colKey] = column.renderSortNumber;
|
|
9860
9867
|
}
|
|
9861
|
-
|
|
9862
|
-
|
|
9863
|
-
|
|
9864
|
-
if (colKey) {
|
|
9865
|
-
hasResizable = 1;
|
|
9866
|
-
resizableData[colKey] = column.renderWidth;
|
|
9868
|
+
if (isCustomFixed && column.fixed !== column.defaultFixed) {
|
|
9869
|
+
hasFixed = 1;
|
|
9870
|
+
fixedData[colKey] = column.fixed;
|
|
9867
9871
|
}
|
|
9868
9872
|
}
|
|
9869
|
-
if (
|
|
9873
|
+
if (isCustomResizable && column.resizeWidth) {
|
|
9874
|
+
hasResizable = 1;
|
|
9875
|
+
resizableData[colKey] = column.renderWidth;
|
|
9876
|
+
}
|
|
9877
|
+
if (isCustomVisible && (!checkMethod || checkMethod({
|
|
9870
9878
|
column
|
|
9871
|
-
})) {
|
|
9879
|
+
}))) {
|
|
9872
9880
|
if (!column.visible && column.defaultVisible) {
|
|
9873
|
-
|
|
9874
|
-
|
|
9875
|
-
hasVisible = 1;
|
|
9876
|
-
visibleData[colKey] = false;
|
|
9877
|
-
}
|
|
9881
|
+
hasVisible = 1;
|
|
9882
|
+
visibleData[colKey] = false;
|
|
9878
9883
|
} else if (column.visible && !column.defaultVisible) {
|
|
9879
|
-
|
|
9880
|
-
|
|
9881
|
-
hasVisible = 1;
|
|
9882
|
-
visibleData[colKey] = true;
|
|
9883
|
-
}
|
|
9884
|
+
hasVisible = 1;
|
|
9885
|
+
visibleData[colKey] = true;
|
|
9884
9886
|
}
|
|
9885
9887
|
}
|
|
9886
9888
|
});
|
|
@@ -9890,7 +9892,7 @@ const Methods = {
|
|
|
9890
9892
|
if (hasSort) {
|
|
9891
9893
|
storeData.sortData = sortData;
|
|
9892
9894
|
}
|
|
9893
|
-
if (
|
|
9895
|
+
if (hasFixed) {
|
|
9894
9896
|
storeData.fixedData = fixedData;
|
|
9895
9897
|
}
|
|
9896
9898
|
if (hasVisible) {
|