vxe-table 3.13.4 → 3.13.5
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/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/methods.js +40 -37
- package/es/table/src/table.js +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +46 -44
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/methods.js +41 -39
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +1 -1
- package/lib/table/src/table.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 +42 -39
- package/packages/table/src/table.ts +1 -1
- package/styles/theme/base.scss +1 -1
- /package/es/{iconfont.1740013687420.ttf → iconfont.1740038065641.ttf} +0 -0
- /package/es/{iconfont.1740013687420.woff → iconfont.1740038065641.woff} +0 -0
- /package/es/{iconfont.1740013687420.woff2 → iconfont.1740038065641.woff2} +0 -0
- /package/lib/{iconfont.1740013687420.ttf → iconfont.1740038065641.ttf} +0 -0
- /package/lib/{iconfont.1740013687420.woff → iconfont.1740038065641.woff} +0 -0
- /package/lib/{iconfont.1740013687420.woff2 → iconfont.1740038065641.woff2} +0 -0
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.13.
|
|
2223
|
+
const version = "3.13.5";
|
|
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.13.
|
|
2846
|
+
const log_version = `table v${"3.13.5"}`;
|
|
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
|
|
@@ -7523,15 +7523,11 @@ const Methods = {
|
|
|
7523
7523
|
internalData.tableFullData = fullData;
|
|
7524
7524
|
internalData.tableFullTreeData = treeData;
|
|
7525
7525
|
// 缓存数据
|
|
7526
|
-
$xeTable.cacheRowMap(true
|
|
7526
|
+
$xeTable.cacheRowMap(true);
|
|
7527
7527
|
// 原始数据
|
|
7528
7528
|
internalData.tableSynchData = datas;
|
|
7529
7529
|
if (isReset) {
|
|
7530
7530
|
internalData.isResizeCellHeight = false;
|
|
7531
|
-
reactData.rowExpandedMaps = {};
|
|
7532
|
-
reactData.rowExpandLazyLoadedMaps = {};
|
|
7533
|
-
reactData.treeExpandedMaps = {};
|
|
7534
|
-
reactData.treeExpandLazyLoadedMaps = {};
|
|
7535
7531
|
}
|
|
7536
7532
|
// 克隆原数据,用于显示编辑状态,与编辑值做对比
|
|
7537
7533
|
if (keepSource) {
|
|
@@ -7716,22 +7712,27 @@ const Methods = {
|
|
|
7716
7712
|
/**
|
|
7717
7713
|
* 更新数据行的 Map
|
|
7718
7714
|
*/
|
|
7719
|
-
cacheRowMap(
|
|
7715
|
+
cacheRowMap() {
|
|
7716
|
+
const $xeTable = this;
|
|
7717
|
+
const props = $xeTable;
|
|
7718
|
+
const internalData = $xeTable;
|
|
7719
|
+
const {
|
|
7720
|
+
treeConfig
|
|
7721
|
+
} = props;
|
|
7722
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
7720
7723
|
const {
|
|
7721
|
-
treeConfig,
|
|
7722
|
-
treeOpts,
|
|
7723
|
-
tableFullData,
|
|
7724
7724
|
fullAllDataRowIdData,
|
|
7725
|
+
tableFullData,
|
|
7725
7726
|
tableFullTreeData
|
|
7726
|
-
} =
|
|
7727
|
+
} = internalData;
|
|
7727
7728
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
7728
7729
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
|
|
7729
|
-
const rowkey = getRowkey(
|
|
7730
|
+
const rowkey = getRowkey($xeTable);
|
|
7730
7731
|
const isLazy = treeConfig && treeOpts.lazy;
|
|
7731
7732
|
const fullAllDataRowIdMaps = {};
|
|
7732
7733
|
const fullDataRowIdMaps = {};
|
|
7733
|
-
const
|
|
7734
|
-
let rowid = getRowid(
|
|
7734
|
+
const handleRow = (row, index, items, path, parentRow, nodes) => {
|
|
7735
|
+
let rowid = getRowid($xeTable, row);
|
|
7735
7736
|
const seq = treeConfig && path ? toTreePathSeq(path) : index + 1;
|
|
7736
7737
|
const level = nodes ? nodes.length - 1 : 0;
|
|
7737
7738
|
if (eqEmptyValue(rowid)) {
|
|
@@ -7741,9 +7742,9 @@ const Methods = {
|
|
|
7741
7742
|
if (isLazy && row[hasChildField] && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(row[childrenField])) {
|
|
7742
7743
|
row[childrenField] = null;
|
|
7743
7744
|
}
|
|
7744
|
-
let
|
|
7745
|
-
if (
|
|
7746
|
-
|
|
7745
|
+
let rowRest = fullAllDataRowIdData[rowid];
|
|
7746
|
+
if (!rowRest) {
|
|
7747
|
+
rowRest = {
|
|
7747
7748
|
row,
|
|
7748
7749
|
rowid,
|
|
7749
7750
|
seq,
|
|
@@ -7760,26 +7761,22 @@ const Methods = {
|
|
|
7760
7761
|
expandHeight: 0
|
|
7761
7762
|
};
|
|
7762
7763
|
}
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
}
|
|
7771
|
-
fullAllDataRowIdMaps[rowid] = cacheItem;
|
|
7764
|
+
rowRest.row = row;
|
|
7765
|
+
rowRest.items = items;
|
|
7766
|
+
rowRest.parent = parentRow;
|
|
7767
|
+
rowRest.level = level;
|
|
7768
|
+
rowRest.index = treeConfig && parentRow ? -1 : index;
|
|
7769
|
+
fullDataRowIdMaps[rowid] = rowRest;
|
|
7770
|
+
fullAllDataRowIdMaps[rowid] = rowRest;
|
|
7772
7771
|
};
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
}
|
|
7776
|
-
this.fullAllDataRowIdData = fullAllDataRowIdMaps;
|
|
7772
|
+
internalData.fullDataRowIdData = fullDataRowIdMaps;
|
|
7773
|
+
internalData.fullAllDataRowIdData = fullAllDataRowIdMaps;
|
|
7777
7774
|
if (treeConfig) {
|
|
7778
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData,
|
|
7775
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData, handleRow, {
|
|
7779
7776
|
children: childrenField
|
|
7780
7777
|
});
|
|
7781
7778
|
} else {
|
|
7782
|
-
tableFullData.forEach(
|
|
7779
|
+
tableFullData.forEach(handleRow);
|
|
7783
7780
|
}
|
|
7784
7781
|
},
|
|
7785
7782
|
cacheSourceMap(fullData) {
|
|
@@ -8784,7 +8781,7 @@ const Methods = {
|
|
|
8784
8781
|
treeConfig
|
|
8785
8782
|
} = props;
|
|
8786
8783
|
const {
|
|
8787
|
-
|
|
8784
|
+
fullAllDataRowIdData
|
|
8788
8785
|
} = internalData;
|
|
8789
8786
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
8790
8787
|
const {
|
|
@@ -8800,7 +8797,7 @@ const Methods = {
|
|
|
8800
8797
|
rowid = getRowid($xeTable, rowOrRowid);
|
|
8801
8798
|
}
|
|
8802
8799
|
if (rowid) {
|
|
8803
|
-
const rest =
|
|
8800
|
+
const rest = fullAllDataRowIdData[rowid];
|
|
8804
8801
|
const row = rest ? rest.row : null;
|
|
8805
8802
|
if (row) {
|
|
8806
8803
|
return row[transform ? mapChildrenField : childrenField] || [];
|
|
@@ -8820,7 +8817,7 @@ const Methods = {
|
|
|
8820
8817
|
treeConfig
|
|
8821
8818
|
} = props;
|
|
8822
8819
|
const {
|
|
8823
|
-
|
|
8820
|
+
fullAllDataRowIdData
|
|
8824
8821
|
} = internalData;
|
|
8825
8822
|
if (rowOrRowid && treeConfig) {
|
|
8826
8823
|
let rowid;
|
|
@@ -8830,7 +8827,7 @@ const Methods = {
|
|
|
8830
8827
|
rowid = getRowid($xeTable, rowOrRowid);
|
|
8831
8828
|
}
|
|
8832
8829
|
if (rowid) {
|
|
8833
|
-
const rest =
|
|
8830
|
+
const rest = fullAllDataRowIdData[rowid];
|
|
8834
8831
|
return rest ? rest.parent : null;
|
|
8835
8832
|
}
|
|
8836
8833
|
}
|
|
@@ -8849,10 +8846,10 @@ const Methods = {
|
|
|
8849
8846
|
const $xeTable = this;
|
|
8850
8847
|
const internalData = $xeTable;
|
|
8851
8848
|
const {
|
|
8852
|
-
|
|
8849
|
+
fullAllDataRowIdData
|
|
8853
8850
|
} = internalData;
|
|
8854
8851
|
const rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(cellValue) ? '' : encodeURIComponent(cellValue);
|
|
8855
|
-
return
|
|
8852
|
+
return fullAllDataRowIdData[rowid] ? fullAllDataRowIdData[rowid].row : null;
|
|
8856
8853
|
},
|
|
8857
8854
|
/**
|
|
8858
8855
|
* 根据行获取行的唯一主键
|
|
@@ -13830,9 +13827,6 @@ const Methods = {
|
|
|
13830
13827
|
const $xeTable = this;
|
|
13831
13828
|
const reactData = $xeTable;
|
|
13832
13829
|
const internalData = $xeTable;
|
|
13833
|
-
const tExpandedMaps = {
|
|
13834
|
-
...reactData.treeExpandedMaps
|
|
13835
|
-
};
|
|
13836
13830
|
const {
|
|
13837
13831
|
fullAllDataRowIdData
|
|
13838
13832
|
} = internalData;
|
|
@@ -13840,7 +13834,11 @@ const Methods = {
|
|
|
13840
13834
|
const {
|
|
13841
13835
|
transform
|
|
13842
13836
|
} = treeOpts;
|
|
13837
|
+
let tExpandedMaps = {};
|
|
13843
13838
|
if (rows) {
|
|
13839
|
+
tExpandedMaps = {
|
|
13840
|
+
...reactData.treeExpandedMaps
|
|
13841
|
+
};
|
|
13844
13842
|
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)) {
|
|
13845
13843
|
rows = [rows];
|
|
13846
13844
|
}
|
|
@@ -13854,8 +13852,12 @@ const Methods = {
|
|
|
13854
13852
|
}
|
|
13855
13853
|
}
|
|
13856
13854
|
});
|
|
13855
|
+
} else {
|
|
13856
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(fullAllDataRowIdData, rowRest => {
|
|
13857
|
+
rowRest.treeLoaded = false;
|
|
13858
|
+
});
|
|
13857
13859
|
}
|
|
13858
|
-
reactData.treeExpandedMaps =
|
|
13860
|
+
reactData.treeExpandedMaps = {};
|
|
13859
13861
|
if (transform) {
|
|
13860
13862
|
handleVirtualTreeToList($xeTable);
|
|
13861
13863
|
return $xeTable.handleTableData();
|
|
@@ -26276,7 +26278,7 @@ function renderBody(h, $xeTable) {
|
|
|
26276
26278
|
if (value && value.length >= 50000) {
|
|
26277
26279
|
warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)']);
|
|
26278
26280
|
}
|
|
26279
|
-
this.loadTableData(value || [],
|
|
26281
|
+
this.loadTableData(value || [], false).then(() => {
|
|
26280
26282
|
const {
|
|
26281
26283
|
scrollXLoad,
|
|
26282
26284
|
scrollYLoad,
|