vxe-table 3.13.22 → 3.13.24
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/module/filter/panel.js +12 -2
- 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 +49 -41
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/filter/panel.js +8 -2
- package/lib/table/module/filter/panel.min.js +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/module/filter/panel.ts +12 -2
- package/packages/table/src/methods.ts +42 -40
- /package/es/{iconfont.1741665630674.ttf → iconfont.1741854422584.ttf} +0 -0
- /package/es/{iconfont.1741665630674.woff → iconfont.1741854422584.woff} +0 -0
- /package/es/{iconfont.1741665630674.woff2 → iconfont.1741854422584.woff2} +0 -0
- /package/lib/{iconfont.1741665630674.ttf → iconfont.1741854422584.ttf} +0 -0
- /package/lib/{iconfont.1741665630674.woff → iconfont.1741854422584.woff} +0 -0
- /package/lib/{iconfont.1741665630674.woff2 → iconfont.1741854422584.woff2} +0 -0
package/lib/table/src/methods.js
CHANGED
|
@@ -269,7 +269,7 @@ function cacheColumnMap($xeTable) {
|
|
|
269
269
|
fullColumnFieldData[field] = rest;
|
|
270
270
|
} else {
|
|
271
271
|
if (storage && !type || columnOpts.drag && (isCrossDrag || isSelfToChildDrag)) {
|
|
272
|
-
(0, _log.errLog)('vxe.error.reqProp', [`${column.getTitle() || type || ''} -> column.field
|
|
272
|
+
(0, _log.errLog)('vxe.error.reqProp', [`${column.getTitle() || type || ''} -> column.field=?`]);
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
if (!hasFixed && fixed) {
|
|
@@ -4624,14 +4624,26 @@ const Methods = {
|
|
|
4624
4624
|
}
|
|
4625
4625
|
},
|
|
4626
4626
|
getCustomStoreData() {
|
|
4627
|
+
const $xeTable = this;
|
|
4628
|
+
const props = $xeTable;
|
|
4629
|
+
const internalData = $xeTable;
|
|
4630
|
+
const {
|
|
4631
|
+
id
|
|
4632
|
+
} = props;
|
|
4633
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
4627
4634
|
const {
|
|
4628
|
-
id,
|
|
4629
|
-
customOpts,
|
|
4630
4635
|
collectColumn
|
|
4631
|
-
} =
|
|
4636
|
+
} = internalData;
|
|
4632
4637
|
const {
|
|
4638
|
+
storage,
|
|
4633
4639
|
checkMethod
|
|
4634
4640
|
} = customOpts;
|
|
4641
|
+
const isAllCustom = storage === true;
|
|
4642
|
+
const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
|
|
4643
|
+
const isCustomResizable = isAllCustom || storageOpts.resizable;
|
|
4644
|
+
const isCustomVisible = isAllCustom || storageOpts.visible;
|
|
4645
|
+
const isCustomFixed = isAllCustom || storageOpts.fixed;
|
|
4646
|
+
const isCustomSort = isAllCustom || storageOpts.sort;
|
|
4635
4647
|
const resizableData = {};
|
|
4636
4648
|
const sortData = {};
|
|
4637
4649
|
const visibleData = {};
|
|
@@ -4648,48 +4660,38 @@ const Methods = {
|
|
|
4648
4660
|
}
|
|
4649
4661
|
let hasResizable = 0;
|
|
4650
4662
|
let hasSort = 0;
|
|
4651
|
-
let
|
|
4663
|
+
let hasFixed = 0;
|
|
4652
4664
|
let hasVisible = 0;
|
|
4653
4665
|
_xeUtils.default.eachTree(collectColumn, (column, index, items, path, parentColumn) => {
|
|
4666
|
+
const colKey = column.getKey();
|
|
4667
|
+
if (!colKey) {
|
|
4668
|
+
(0, _log.errLog)('vxe.error.reqProp', [`${column.getTitle() || column.type || ''} -> column.field=?`]);
|
|
4669
|
+
return;
|
|
4670
|
+
}
|
|
4654
4671
|
// 只支持一级
|
|
4655
4672
|
if (!parentColumn) {
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
hasSort = 1;
|
|
4660
|
-
sortData[colKey] = column.renderSortNumber;
|
|
4661
|
-
}
|
|
4662
|
-
});
|
|
4663
|
-
if (column.fixed !== column.defaultFixed) {
|
|
4664
|
-
const colKey = column.getKey();
|
|
4665
|
-
if (colKey) {
|
|
4666
|
-
hasFixedt = 1;
|
|
4667
|
-
fixedData[colKey] = column.fixed;
|
|
4668
|
-
}
|
|
4673
|
+
if (isCustomSort) {
|
|
4674
|
+
hasSort = 1;
|
|
4675
|
+
sortData[colKey] = column.renderSortNumber;
|
|
4669
4676
|
}
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
if (colKey) {
|
|
4674
|
-
hasResizable = 1;
|
|
4675
|
-
resizableData[colKey] = column.renderWidth;
|
|
4677
|
+
if (isCustomFixed && column.fixed !== column.defaultFixed) {
|
|
4678
|
+
hasFixed = 1;
|
|
4679
|
+
fixedData[colKey] = column.fixed;
|
|
4676
4680
|
}
|
|
4677
4681
|
}
|
|
4678
|
-
if (
|
|
4682
|
+
if (isCustomResizable && column.resizeWidth) {
|
|
4683
|
+
hasResizable = 1;
|
|
4684
|
+
resizableData[colKey] = column.renderWidth;
|
|
4685
|
+
}
|
|
4686
|
+
if (isCustomVisible && (!checkMethod || checkMethod({
|
|
4679
4687
|
column
|
|
4680
|
-
})) {
|
|
4688
|
+
}))) {
|
|
4681
4689
|
if (!column.visible && column.defaultVisible) {
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
hasVisible = 1;
|
|
4685
|
-
visibleData[colKey] = false;
|
|
4686
|
-
}
|
|
4690
|
+
hasVisible = 1;
|
|
4691
|
+
visibleData[colKey] = false;
|
|
4687
4692
|
} else if (column.visible && !column.defaultVisible) {
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
hasVisible = 1;
|
|
4691
|
-
visibleData[colKey] = true;
|
|
4692
|
-
}
|
|
4693
|
+
hasVisible = 1;
|
|
4694
|
+
visibleData[colKey] = true;
|
|
4693
4695
|
}
|
|
4694
4696
|
}
|
|
4695
4697
|
});
|
|
@@ -4699,7 +4701,7 @@ const Methods = {
|
|
|
4699
4701
|
if (hasSort) {
|
|
4700
4702
|
storeData.sortData = sortData;
|
|
4701
4703
|
}
|
|
4702
|
-
if (
|
|
4704
|
+
if (hasFixed) {
|
|
4703
4705
|
storeData.fixedData = fixedData;
|
|
4704
4706
|
}
|
|
4705
4707
|
if (hasVisible) {
|