vxe-table 3.11.13 → 3.11.14
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 +678 -0
- package/es/locale/lang/de-DE.js +678 -0
- package/es/locale/lang/en-US.js +2 -1
- package/es/locale/lang/es-ES.js +2 -1
- package/es/locale/lang/fr-FR.js +678 -0
- package/es/locale/lang/hu-HU.js +2 -1
- package/es/locale/lang/hy-AM.js +678 -0
- package/es/locale/lang/ja-JP.js +2 -1
- package/es/locale/lang/ko-KR.js +2 -1
- package/es/locale/lang/nb-NO.js +678 -0
- package/es/locale/lang/pt-BR.js +2 -1
- package/es/locale/lang/ru-RU.js +2 -1
- package/es/locale/lang/ug-CN.js +678 -0
- package/es/locale/lang/uk-UA.js +2 -1
- package/es/locale/lang/vi-VN.js +2 -1
- package/es/locale/lang/zh-CHT.js +2 -1
- package/es/locale/lang/zh-CN.js +2 -1
- package/es/style.css +1 -1
- package/es/table/module/edit/mixin.js +2 -2
- package/es/table/module/export/mixin.js +4 -1
- package/es/table/module/keyboard/mixin.js +2 -2
- package/es/table/src/body.js +15 -4
- package/es/table/src/methods.js +93 -13
- package/es/table/src/table.js +14 -6
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +165 -38
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +684 -0
- package/lib/locale/lang/ar-EG.min.js +1 -0
- package/lib/locale/lang/de-DE.js +684 -0
- package/lib/locale/lang/de-DE.min.js +1 -0
- package/lib/locale/lang/en-US.js +2 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -1
- package/lib/locale/lang/es-ES.js +2 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +2 -1
- package/lib/locale/lang/fr-FR.js +684 -0
- package/lib/locale/lang/fr-FR.min.js +1 -0
- package/lib/locale/lang/hu-HU.js +2 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +2 -1
- package/lib/locale/lang/hy-AM.js +684 -0
- package/lib/locale/lang/hy-AM.min.js +1 -0
- package/lib/locale/lang/ja-JP.js +2 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -1
- package/lib/locale/lang/ko-KR.js +2 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +2 -1
- package/lib/locale/lang/nb-NO.js +684 -0
- package/lib/locale/lang/nb-NO.min.js +1 -0
- package/lib/locale/lang/pt-BR.js +2 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -1
- package/lib/locale/lang/ru-RU.js +2 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +2 -1
- package/lib/locale/lang/ug-CN.js +684 -0
- package/lib/locale/lang/ug-CN.min.js +1 -0
- package/lib/locale/lang/uk-UA.js +2 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +2 -1
- package/lib/locale/lang/vi-VN.js +2 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +2 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +2 -1
- package/lib/locale/lang/zh-CN.js +2 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -1
- package/lib/style.css +1 -1
- package/lib/table/module/edit/mixin.js +2 -2
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/mixin.js +4 -1
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +2 -2
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/src/body.js +17 -4
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/methods.js +120 -16
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +16 -10
- 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/locale/lang/ar-EG.ts +678 -0
- package/packages/locale/lang/de-DE.ts +678 -0
- package/packages/locale/lang/en-US.ts +2 -1
- package/packages/locale/lang/es-ES.ts +2 -1
- package/packages/locale/lang/fr-FR.ts +678 -0
- package/packages/locale/lang/hu-HU.ts +2 -1
- package/packages/locale/lang/hy-AM.ts +678 -0
- package/packages/locale/lang/ja-JP.ts +2 -1
- package/packages/locale/lang/ko-KR.ts +2 -1
- package/packages/locale/lang/nb-NO.ts +678 -0
- package/packages/locale/lang/pt-BR.ts +2 -1
- package/packages/locale/lang/ru-RU.ts +2 -1
- package/packages/locale/lang/ug-CN.ts +678 -0
- package/packages/locale/lang/uk-UA.ts +2 -1
- package/packages/locale/lang/vi-VN.ts +2 -1
- package/packages/locale/lang/zh-CHT.ts +2 -1
- package/packages/locale/lang/zh-CN.ts +2 -1
- package/packages/table/module/edit/mixin.ts +2 -2
- package/packages/table/module/export/mixin.ts +4 -1
- package/packages/table/module/keyboard/mixin.ts +2 -2
- package/packages/table/src/body.ts +14 -4
- package/packages/table/src/methods.ts +97 -14
- package/packages/table/src/table.ts +14 -6
- /package/es/{iconfont.1732856009240.ttf → iconfont.1733097092605.ttf} +0 -0
- /package/es/{iconfont.1732856009240.woff → iconfont.1733097092605.woff} +0 -0
- /package/es/{iconfont.1732856009240.woff2 → iconfont.1733097092605.woff2} +0 -0
- /package/lib/{iconfont.1732856009240.ttf → iconfont.1733097092605.ttf} +0 -0
- /package/lib/{iconfont.1732856009240.woff → iconfont.1733097092605.woff} +0 -0
- /package/lib/{iconfont.1732856009240.woff2 → iconfont.1733097092605.woff2} +0 -0
package/es/table/src/methods.js
CHANGED
|
@@ -481,16 +481,15 @@ function handleRecalculateLayout($xeTable, reFull) {
|
|
|
481
481
|
}
|
|
482
482
|
$xeTable.calcCellWidth();
|
|
483
483
|
$xeTable.autoCellWidth();
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
484
|
+
return $xeTable.computeScrollLoad().then(() => {
|
|
485
|
+
if (reFull === true) {
|
|
486
|
+
// 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
|
|
487
487
|
calcCellHeight($xeTable);
|
|
488
488
|
$xeTable.calcCellWidth();
|
|
489
489
|
$xeTable.autoCellWidth();
|
|
490
490
|
return $xeTable.computeScrollLoad();
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
return $xeTable.computeScrollLoad();
|
|
491
|
+
}
|
|
492
|
+
});
|
|
494
493
|
}
|
|
495
494
|
function checkLastSyncScroll($xeTable, isRollX, isRollY) {
|
|
496
495
|
const reactData = $xeTable;
|
|
@@ -1674,6 +1673,9 @@ const Methods = {
|
|
|
1674
1673
|
* @returns
|
|
1675
1674
|
*/
|
|
1676
1675
|
handleVirtualTreeToList() {
|
|
1676
|
+
const $xeTable = this;
|
|
1677
|
+
const internalData = $xeTable;
|
|
1678
|
+
const { fullAllDataRowIdData } = internalData;
|
|
1677
1679
|
const { treeOpts, treeConfig, treeExpandedMaps, afterTreeFullData, afterFullData } = this;
|
|
1678
1680
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
1679
1681
|
if (treeConfig && treeOpts.transform) {
|
|
@@ -1683,6 +1685,10 @@ const Methods = {
|
|
|
1683
1685
|
const rowid = getRowid(this, row);
|
|
1684
1686
|
const parentRowid = getRowid(this, parent);
|
|
1685
1687
|
if (!parent || (expandMaps[parentRowid] && treeExpandedMaps[parentRowid])) {
|
|
1688
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
1689
|
+
if (rowRest) {
|
|
1690
|
+
rowRest._index = fullData.length;
|
|
1691
|
+
}
|
|
1686
1692
|
expandMaps[rowid] = 1;
|
|
1687
1693
|
fullData.push(row);
|
|
1688
1694
|
}
|
|
@@ -1825,17 +1831,46 @@ const Methods = {
|
|
|
1825
1831
|
this.afterTreeFullData = tableTree;
|
|
1826
1832
|
this.updateAfterDataIndex();
|
|
1827
1833
|
},
|
|
1834
|
+
updateTreeDataIndex() {
|
|
1835
|
+
const $xeTable = this;
|
|
1836
|
+
const props = $xeTable;
|
|
1837
|
+
const internalData = $xeTable;
|
|
1838
|
+
const { treeConfig } = props;
|
|
1839
|
+
const { afterFullData, fullDataRowIdData, fullAllDataRowIdData } = internalData;
|
|
1840
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
1841
|
+
if (treeConfig) {
|
|
1842
|
+
if (treeOpts.transform) {
|
|
1843
|
+
afterFullData.forEach((row, index) => {
|
|
1844
|
+
const rowid = getRowid($xeTable, row);
|
|
1845
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
1846
|
+
if (rowRest) {
|
|
1847
|
+
rowRest._index = index;
|
|
1848
|
+
}
|
|
1849
|
+
else {
|
|
1850
|
+
const rest = { row, rowid, seq: '-1', index: -1, $index: -1, _index: index, items: [], parent: null, level: 0, height: 0 };
|
|
1851
|
+
fullAllDataRowIdData[rowid] = rest;
|
|
1852
|
+
fullDataRowIdData[rowid] = rest;
|
|
1853
|
+
}
|
|
1854
|
+
});
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
},
|
|
1828
1858
|
/**
|
|
1829
1859
|
* 预编译
|
|
1830
1860
|
* 对渲染中的数据提前解析序号及索引。牺牲提前编译耗时换取渲染中额外损耗,使运行时更加流畅
|
|
1831
1861
|
*/
|
|
1832
1862
|
updateAfterDataIndex() {
|
|
1833
|
-
const
|
|
1863
|
+
const $xeTable = this;
|
|
1864
|
+
const props = $xeTable;
|
|
1865
|
+
const internalData = $xeTable;
|
|
1866
|
+
const { treeConfig } = props;
|
|
1867
|
+
const { afterFullData, fullDataRowIdData, fullAllDataRowIdData, afterTreeFullData } = internalData;
|
|
1868
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
1834
1869
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
1835
1870
|
const fullMaps = {};
|
|
1836
1871
|
if (treeConfig) {
|
|
1837
1872
|
XEUtils.eachTree(afterTreeFullData, (row, index, items, path) => {
|
|
1838
|
-
const rowid = getRowid(
|
|
1873
|
+
const rowid = getRowid($xeTable, row);
|
|
1839
1874
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
1840
1875
|
const seq = path.map((num, i) => i % 2 === 0 ? (Number(num) + 1) : '.').join('');
|
|
1841
1876
|
if (rowRest) {
|
|
@@ -1849,10 +1884,11 @@ const Methods = {
|
|
|
1849
1884
|
}
|
|
1850
1885
|
fullMaps[rowid] = row;
|
|
1851
1886
|
}, { children: treeOpts.transform ? treeOpts.mapChildrenField : childrenField });
|
|
1887
|
+
$xeTable.updateTreeDataIndex();
|
|
1852
1888
|
}
|
|
1853
1889
|
else {
|
|
1854
1890
|
afterFullData.forEach((row, index) => {
|
|
1855
|
-
const rowid = getRowid(
|
|
1891
|
+
const rowid = getRowid($xeTable, row);
|
|
1856
1892
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
1857
1893
|
const seq = index + 1;
|
|
1858
1894
|
if (rowRest) {
|
|
@@ -1869,10 +1905,40 @@ const Methods = {
|
|
|
1869
1905
|
}
|
|
1870
1906
|
this.afterFullRowMaps = fullMaps;
|
|
1871
1907
|
},
|
|
1908
|
+
/**
|
|
1909
|
+
* 只对 tree-config 有效,获取行的子级
|
|
1910
|
+
*/
|
|
1911
|
+
getTreeRowChildren(rowOrRowid) {
|
|
1912
|
+
const $xeTable = this;
|
|
1913
|
+
const props = $xeTable;
|
|
1914
|
+
const internalData = $xeTable;
|
|
1915
|
+
const { treeConfig } = props;
|
|
1916
|
+
const { fullDataRowIdData } = internalData;
|
|
1917
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
1918
|
+
const { transform, mapChildrenField } = treeOpts;
|
|
1919
|
+
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
1920
|
+
if (rowOrRowid && treeConfig) {
|
|
1921
|
+
let rowid;
|
|
1922
|
+
if (XEUtils.isString(rowOrRowid)) {
|
|
1923
|
+
rowid = rowOrRowid;
|
|
1924
|
+
}
|
|
1925
|
+
else {
|
|
1926
|
+
rowid = getRowid($xeTable, rowOrRowid);
|
|
1927
|
+
}
|
|
1928
|
+
if (rowid) {
|
|
1929
|
+
const rest = fullDataRowIdData[rowid];
|
|
1930
|
+
const row = rest ? rest.row : null;
|
|
1931
|
+
if (row) {
|
|
1932
|
+
return row[transform ? mapChildrenField : childrenField] || [];
|
|
1933
|
+
}
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
return [];
|
|
1937
|
+
},
|
|
1872
1938
|
/**
|
|
1873
1939
|
* 只对 tree-config 有效,获取行的父级
|
|
1874
1940
|
*/
|
|
1875
|
-
|
|
1941
|
+
getTreeParentRow(rowOrRowid) {
|
|
1876
1942
|
const { treeConfig, fullDataRowIdData } = this;
|
|
1877
1943
|
if (rowOrRowid && treeConfig) {
|
|
1878
1944
|
let rowid;
|
|
@@ -1889,6 +1955,11 @@ const Methods = {
|
|
|
1889
1955
|
}
|
|
1890
1956
|
return null;
|
|
1891
1957
|
},
|
|
1958
|
+
getParentRow(rowOrRowid) {
|
|
1959
|
+
const $xeTable = this;
|
|
1960
|
+
warnLog('vxe.error.delFunc', ['getParentRow', 'getTreeParentRow']);
|
|
1961
|
+
return $xeTable.getTreeParentRow(rowOrRowid);
|
|
1962
|
+
},
|
|
1892
1963
|
/**
|
|
1893
1964
|
* 根据行的唯一主键获取行
|
|
1894
1965
|
* @param {String/Number} rowid 行主键
|
|
@@ -5807,7 +5878,9 @@ const Methods = {
|
|
|
5807
5878
|
}
|
|
5808
5879
|
return this.$nextTick().then(() => {
|
|
5809
5880
|
if (transform) {
|
|
5810
|
-
|
|
5881
|
+
this.handleTableData();
|
|
5882
|
+
this.updateTreeDataIndex();
|
|
5883
|
+
return this.$nextTick();
|
|
5811
5884
|
}
|
|
5812
5885
|
});
|
|
5813
5886
|
});
|
|
@@ -5907,7 +5980,9 @@ const Methods = {
|
|
|
5907
5980
|
validRows.forEach((row) => this.handleTreeExpandReserve(row, expanded));
|
|
5908
5981
|
}
|
|
5909
5982
|
this.treeExpandedMaps = treeTempExpandedMaps;
|
|
5910
|
-
return Promise.all(result).then(
|
|
5983
|
+
return Promise.all(result).then(() => {
|
|
5984
|
+
return this.recalculate();
|
|
5985
|
+
});
|
|
5911
5986
|
},
|
|
5912
5987
|
/**
|
|
5913
5988
|
* 虚拟树的展开与收起
|
|
@@ -5918,9 +5993,14 @@ const Methods = {
|
|
|
5918
5993
|
handleVirtualTreeExpand(rows, expanded) {
|
|
5919
5994
|
return this.handleBaseTreeExpand(rows, expanded).then(() => {
|
|
5920
5995
|
this.handleVirtualTreeToList();
|
|
5921
|
-
|
|
5996
|
+
this.handleTableData();
|
|
5997
|
+
this.updateTreeDataIndex();
|
|
5922
5998
|
}).then(() => {
|
|
5923
5999
|
return this.recalculate();
|
|
6000
|
+
}).then(() => {
|
|
6001
|
+
setTimeout(() => {
|
|
6002
|
+
this.updateCellAreas();
|
|
6003
|
+
}, 30);
|
|
5924
6004
|
});
|
|
5925
6005
|
},
|
|
5926
6006
|
/**
|
package/es/table/src/table.js
CHANGED
|
@@ -849,7 +849,7 @@ export default {
|
|
|
849
849
|
if (this.showFooter && !(this.footerMethod || this.footerData)) {
|
|
850
850
|
warnLog('vxe.error.reqProp', ['footer-data | footer-method']);
|
|
851
851
|
}
|
|
852
|
-
if (treeConfig && this.stripe) {
|
|
852
|
+
if (treeConfig && !treeOpts.transform && this.stripe) {
|
|
853
853
|
warnLog('vxe.error.noTree', ['stripe']);
|
|
854
854
|
}
|
|
855
855
|
if (this.tooltipOpts.enabled) {
|
|
@@ -887,7 +887,10 @@ export default {
|
|
|
887
887
|
if (this.rowOpts.height && !this.showOverflow) {
|
|
888
888
|
warnLog('vxe.error.notProp', ['table.show-overflow']);
|
|
889
889
|
}
|
|
890
|
-
if (!this.
|
|
890
|
+
if (!this.handleMousedownCellAreaEvent) {
|
|
891
|
+
if (this.areaConfig) {
|
|
892
|
+
warnLog('vxe.error.notProp', ['area-config']);
|
|
893
|
+
}
|
|
891
894
|
if (this.clipConfig) {
|
|
892
895
|
warnLog('vxe.error.notProp', ['clip-config']);
|
|
893
896
|
}
|
|
@@ -914,7 +917,7 @@ export default {
|
|
|
914
917
|
// if (this.mouseOpts.area && this.checkboxOpts.range) {
|
|
915
918
|
// warnLog('vxe.error.errConflicts', ['mouse-config.area', 'checkbox-config.range'])
|
|
916
919
|
// }
|
|
917
|
-
if (this.
|
|
920
|
+
if (this.mouseOpts.area && (this.treeConfig && !treeOpts.transform)) {
|
|
918
921
|
errLog('vxe.error.noTree', ['mouse-config.area']);
|
|
919
922
|
}
|
|
920
923
|
}
|
|
@@ -1025,7 +1028,7 @@ export default {
|
|
|
1025
1028
|
const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip');
|
|
1026
1029
|
$xeTable.$nextTick(() => {
|
|
1027
1030
|
if (props.loading) {
|
|
1028
|
-
if (!VxeUILoadingComponent) {
|
|
1031
|
+
if (!VxeUILoadingComponent && !this.$scopedSlots.loading) {
|
|
1029
1032
|
errLog('vxe.error.reqComp', ['vxe-loading']);
|
|
1030
1033
|
}
|
|
1031
1034
|
}
|
|
@@ -1280,8 +1283,13 @@ export default {
|
|
|
1280
1283
|
value: currLoading,
|
|
1281
1284
|
icon: loadingOpts.icon,
|
|
1282
1285
|
text: loadingOpts.text
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1286
|
+
},
|
|
1287
|
+
scopedSlots: loadingSlot
|
|
1288
|
+
? {
|
|
1289
|
+
default: () => $xeTable.callSlot(loadingSlot, { $table: $xeTable, $grid: $xeGrid, loading: currLoading }, h)
|
|
1290
|
+
}
|
|
1291
|
+
: {}
|
|
1292
|
+
})
|
|
1285
1293
|
: loadingSlot
|
|
1286
1294
|
? h('div', {
|
|
1287
1295
|
class: ['vxe-loading--custom-wrapper', {
|
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.11.
|
|
2223
|
+
const version = "3.11.14";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2774,7 +2774,7 @@ function isNodeElement(elem) {
|
|
|
2774
2774
|
const {
|
|
2775
2775
|
log: log_log
|
|
2776
2776
|
} = core_.VxeUI;
|
|
2777
|
-
const log_version = `table v${"3.11.
|
|
2777
|
+
const log_version = `table v${"3.11.14"}`;
|
|
2778
2778
|
const warnLog = log_log.create('warn', log_version);
|
|
2779
2779
|
const errLog = log_log.create('error', log_version);
|
|
2780
2780
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -5399,16 +5399,15 @@ function handleRecalculateLayout($xeTable, reFull) {
|
|
|
5399
5399
|
}
|
|
5400
5400
|
$xeTable.calcCellWidth();
|
|
5401
5401
|
$xeTable.autoCellWidth();
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5402
|
+
return $xeTable.computeScrollLoad().then(() => {
|
|
5403
|
+
if (reFull === true) {
|
|
5404
|
+
// 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
|
|
5405
5405
|
calcCellHeight($xeTable);
|
|
5406
5406
|
$xeTable.calcCellWidth();
|
|
5407
5407
|
$xeTable.autoCellWidth();
|
|
5408
5408
|
return $xeTable.computeScrollLoad();
|
|
5409
|
-
}
|
|
5410
|
-
}
|
|
5411
|
-
return $xeTable.computeScrollLoad();
|
|
5409
|
+
}
|
|
5410
|
+
});
|
|
5412
5411
|
}
|
|
5413
5412
|
function checkLastSyncScroll($xeTable, isRollX, isRollY) {
|
|
5414
5413
|
const reactData = $xeTable;
|
|
@@ -6779,6 +6778,11 @@ const Methods = {
|
|
|
6779
6778
|
* @returns
|
|
6780
6779
|
*/
|
|
6781
6780
|
handleVirtualTreeToList() {
|
|
6781
|
+
const $xeTable = this;
|
|
6782
|
+
const internalData = $xeTable;
|
|
6783
|
+
const {
|
|
6784
|
+
fullAllDataRowIdData
|
|
6785
|
+
} = internalData;
|
|
6782
6786
|
const {
|
|
6783
6787
|
treeOpts,
|
|
6784
6788
|
treeConfig,
|
|
@@ -6794,6 +6798,10 @@ const Methods = {
|
|
|
6794
6798
|
const rowid = getRowid(this, row);
|
|
6795
6799
|
const parentRowid = getRowid(this, parent);
|
|
6796
6800
|
if (!parent || expandMaps[parentRowid] && treeExpandedMaps[parentRowid]) {
|
|
6801
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
6802
|
+
if (rowRest) {
|
|
6803
|
+
rowRest._index = fullData.length;
|
|
6804
|
+
}
|
|
6797
6805
|
expandMaps[rowid] = 1;
|
|
6798
6806
|
fullData.push(row);
|
|
6799
6807
|
}
|
|
@@ -7017,24 +7025,69 @@ const Methods = {
|
|
|
7017
7025
|
this.afterTreeFullData = tableTree;
|
|
7018
7026
|
this.updateAfterDataIndex();
|
|
7019
7027
|
},
|
|
7028
|
+
updateTreeDataIndex() {
|
|
7029
|
+
const $xeTable = this;
|
|
7030
|
+
const props = $xeTable;
|
|
7031
|
+
const internalData = $xeTable;
|
|
7032
|
+
const {
|
|
7033
|
+
treeConfig
|
|
7034
|
+
} = props;
|
|
7035
|
+
const {
|
|
7036
|
+
afterFullData,
|
|
7037
|
+
fullDataRowIdData,
|
|
7038
|
+
fullAllDataRowIdData
|
|
7039
|
+
} = internalData;
|
|
7040
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
7041
|
+
if (treeConfig) {
|
|
7042
|
+
if (treeOpts.transform) {
|
|
7043
|
+
afterFullData.forEach((row, index) => {
|
|
7044
|
+
const rowid = getRowid($xeTable, row);
|
|
7045
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
7046
|
+
if (rowRest) {
|
|
7047
|
+
rowRest._index = index;
|
|
7048
|
+
} else {
|
|
7049
|
+
const rest = {
|
|
7050
|
+
row,
|
|
7051
|
+
rowid,
|
|
7052
|
+
seq: '-1',
|
|
7053
|
+
index: -1,
|
|
7054
|
+
$index: -1,
|
|
7055
|
+
_index: index,
|
|
7056
|
+
items: [],
|
|
7057
|
+
parent: null,
|
|
7058
|
+
level: 0,
|
|
7059
|
+
height: 0
|
|
7060
|
+
};
|
|
7061
|
+
fullAllDataRowIdData[rowid] = rest;
|
|
7062
|
+
fullDataRowIdData[rowid] = rest;
|
|
7063
|
+
}
|
|
7064
|
+
});
|
|
7065
|
+
}
|
|
7066
|
+
}
|
|
7067
|
+
},
|
|
7020
7068
|
/**
|
|
7021
7069
|
* 预编译
|
|
7022
7070
|
* 对渲染中的数据提前解析序号及索引。牺牲提前编译耗时换取渲染中额外损耗,使运行时更加流畅
|
|
7023
7071
|
*/
|
|
7024
7072
|
updateAfterDataIndex() {
|
|
7073
|
+
const $xeTable = this;
|
|
7074
|
+
const props = $xeTable;
|
|
7075
|
+
const internalData = $xeTable;
|
|
7076
|
+
const {
|
|
7077
|
+
treeConfig
|
|
7078
|
+
} = props;
|
|
7025
7079
|
const {
|
|
7026
|
-
treeConfig,
|
|
7027
7080
|
afterFullData,
|
|
7028
7081
|
fullDataRowIdData,
|
|
7029
7082
|
fullAllDataRowIdData,
|
|
7030
|
-
afterTreeFullData
|
|
7031
|
-
|
|
7032
|
-
|
|
7083
|
+
afterTreeFullData
|
|
7084
|
+
} = internalData;
|
|
7085
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
7033
7086
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
7034
7087
|
const fullMaps = {};
|
|
7035
7088
|
if (treeConfig) {
|
|
7036
7089
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterTreeFullData, (row, index, items, path) => {
|
|
7037
|
-
const rowid = getRowid(
|
|
7090
|
+
const rowid = getRowid($xeTable, row);
|
|
7038
7091
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
7039
7092
|
const seq = path.map((num, i) => i % 2 === 0 ? Number(num) + 1 : '.').join('');
|
|
7040
7093
|
if (rowRest) {
|
|
@@ -7060,9 +7113,10 @@ const Methods = {
|
|
|
7060
7113
|
}, {
|
|
7061
7114
|
children: treeOpts.transform ? treeOpts.mapChildrenField : childrenField
|
|
7062
7115
|
});
|
|
7116
|
+
$xeTable.updateTreeDataIndex();
|
|
7063
7117
|
} else {
|
|
7064
7118
|
afterFullData.forEach((row, index) => {
|
|
7065
|
-
const rowid = getRowid(
|
|
7119
|
+
const rowid = getRowid($xeTable, row);
|
|
7066
7120
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
7067
7121
|
const seq = index + 1;
|
|
7068
7122
|
if (rowRest) {
|
|
@@ -7089,10 +7143,46 @@ const Methods = {
|
|
|
7089
7143
|
}
|
|
7090
7144
|
this.afterFullRowMaps = fullMaps;
|
|
7091
7145
|
},
|
|
7146
|
+
/**
|
|
7147
|
+
* 只对 tree-config 有效,获取行的子级
|
|
7148
|
+
*/
|
|
7149
|
+
getTreeRowChildren(rowOrRowid) {
|
|
7150
|
+
const $xeTable = this;
|
|
7151
|
+
const props = $xeTable;
|
|
7152
|
+
const internalData = $xeTable;
|
|
7153
|
+
const {
|
|
7154
|
+
treeConfig
|
|
7155
|
+
} = props;
|
|
7156
|
+
const {
|
|
7157
|
+
fullDataRowIdData
|
|
7158
|
+
} = internalData;
|
|
7159
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
7160
|
+
const {
|
|
7161
|
+
transform,
|
|
7162
|
+
mapChildrenField
|
|
7163
|
+
} = treeOpts;
|
|
7164
|
+
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
7165
|
+
if (rowOrRowid && treeConfig) {
|
|
7166
|
+
let rowid;
|
|
7167
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(rowOrRowid)) {
|
|
7168
|
+
rowid = rowOrRowid;
|
|
7169
|
+
} else {
|
|
7170
|
+
rowid = getRowid($xeTable, rowOrRowid);
|
|
7171
|
+
}
|
|
7172
|
+
if (rowid) {
|
|
7173
|
+
const rest = fullDataRowIdData[rowid];
|
|
7174
|
+
const row = rest ? rest.row : null;
|
|
7175
|
+
if (row) {
|
|
7176
|
+
return row[transform ? mapChildrenField : childrenField] || [];
|
|
7177
|
+
}
|
|
7178
|
+
}
|
|
7179
|
+
}
|
|
7180
|
+
return [];
|
|
7181
|
+
},
|
|
7092
7182
|
/**
|
|
7093
7183
|
* 只对 tree-config 有效,获取行的父级
|
|
7094
7184
|
*/
|
|
7095
|
-
|
|
7185
|
+
getTreeParentRow(rowOrRowid) {
|
|
7096
7186
|
const {
|
|
7097
7187
|
treeConfig,
|
|
7098
7188
|
fullDataRowIdData
|
|
@@ -7111,6 +7201,11 @@ const Methods = {
|
|
|
7111
7201
|
}
|
|
7112
7202
|
return null;
|
|
7113
7203
|
},
|
|
7204
|
+
getParentRow(rowOrRowid) {
|
|
7205
|
+
const $xeTable = this;
|
|
7206
|
+
warnLog('vxe.error.delFunc', ['getParentRow', 'getTreeParentRow']);
|
|
7207
|
+
return $xeTable.getTreeParentRow(rowOrRowid);
|
|
7208
|
+
},
|
|
7114
7209
|
/**
|
|
7115
7210
|
* 根据行的唯一主键获取行
|
|
7116
7211
|
* @param {String/Number} rowid 行主键
|
|
@@ -11728,7 +11823,9 @@ const Methods = {
|
|
|
11728
11823
|
}
|
|
11729
11824
|
return this.$nextTick().then(() => {
|
|
11730
11825
|
if (transform) {
|
|
11731
|
-
|
|
11826
|
+
this.handleTableData();
|
|
11827
|
+
this.updateTreeDataIndex();
|
|
11828
|
+
return this.$nextTick();
|
|
11732
11829
|
}
|
|
11733
11830
|
});
|
|
11734
11831
|
});
|
|
@@ -11856,7 +11953,9 @@ const Methods = {
|
|
|
11856
11953
|
validRows.forEach(row => this.handleTreeExpandReserve(row, expanded));
|
|
11857
11954
|
}
|
|
11858
11955
|
this.treeExpandedMaps = treeTempExpandedMaps;
|
|
11859
|
-
return Promise.all(result).then(
|
|
11956
|
+
return Promise.all(result).then(() => {
|
|
11957
|
+
return this.recalculate();
|
|
11958
|
+
});
|
|
11860
11959
|
},
|
|
11861
11960
|
/**
|
|
11862
11961
|
* 虚拟树的展开与收起
|
|
@@ -11867,9 +11966,14 @@ const Methods = {
|
|
|
11867
11966
|
handleVirtualTreeExpand(rows, expanded) {
|
|
11868
11967
|
return this.handleBaseTreeExpand(rows, expanded).then(() => {
|
|
11869
11968
|
this.handleVirtualTreeToList();
|
|
11870
|
-
|
|
11969
|
+
this.handleTableData();
|
|
11970
|
+
this.updateTreeDataIndex();
|
|
11871
11971
|
}).then(() => {
|
|
11872
11972
|
return this.recalculate();
|
|
11973
|
+
}).then(() => {
|
|
11974
|
+
setTimeout(() => {
|
|
11975
|
+
this.updateCellAreas();
|
|
11976
|
+
}, 30);
|
|
11873
11977
|
});
|
|
11874
11978
|
},
|
|
11875
11979
|
/**
|
|
@@ -13309,12 +13413,15 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
13309
13413
|
columnOpts,
|
|
13310
13414
|
isDragColMove
|
|
13311
13415
|
} = $xeTable;
|
|
13416
|
+
const {
|
|
13417
|
+
transform,
|
|
13418
|
+
seqMode
|
|
13419
|
+
} = treeOpts;
|
|
13312
13420
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
13313
13421
|
const rows = [];
|
|
13314
13422
|
tableData.forEach((row, $rowIndex) => {
|
|
13315
13423
|
const trOn = {};
|
|
13316
13424
|
let rowIndex = $rowIndex;
|
|
13317
|
-
const _rowIndex = $xeTable.getVTRowIndex(row);
|
|
13318
13425
|
// 确保任何情况下 rowIndex 都精准指向真实 data 索引
|
|
13319
13426
|
rowIndex = $xeTable.getRowIndex(row);
|
|
13320
13427
|
// 当前行事件
|
|
@@ -13337,8 +13444,18 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
13337
13444
|
}
|
|
13338
13445
|
const rowid = getRowid($xeTable, row);
|
|
13339
13446
|
const rest = fullAllDataRowIdData[rowid];
|
|
13340
|
-
|
|
13341
|
-
|
|
13447
|
+
let rowLevel = 0;
|
|
13448
|
+
let seq = -1;
|
|
13449
|
+
let _rowIndex = 0;
|
|
13450
|
+
if (rest) {
|
|
13451
|
+
rowLevel = rest.level;
|
|
13452
|
+
if (treeConfig && transform && seqMode === 'increasing') {
|
|
13453
|
+
seq = rest._index + 1;
|
|
13454
|
+
} else {
|
|
13455
|
+
seq = rest.seq;
|
|
13456
|
+
}
|
|
13457
|
+
_rowIndex = rest._index;
|
|
13458
|
+
}
|
|
13342
13459
|
const params = {
|
|
13343
13460
|
$table: $xeTable,
|
|
13344
13461
|
seq,
|
|
@@ -13377,7 +13494,7 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
13377
13494
|
};
|
|
13378
13495
|
}
|
|
13379
13496
|
const trClass = ['vxe-body--row', treeConfig ? `row--level-${rowLevel}` : '', {
|
|
13380
|
-
'row--stripe': stripe && (
|
|
13497
|
+
'row--stripe': stripe && (_rowIndex + 1) % 2 === 0,
|
|
13381
13498
|
'is--new': isNewRow,
|
|
13382
13499
|
'is--expand-row': isExpandRow,
|
|
13383
13500
|
'is--expand-tree': isExpandTree,
|
|
@@ -17853,8 +17970,8 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
17853
17970
|
};
|
|
17854
17971
|
fullDataRowIdData[rowid] = rest;
|
|
17855
17972
|
fullAllDataRowIdData[rowid] = rest;
|
|
17856
|
-
afterFullData.
|
|
17857
|
-
tableFullData.
|
|
17973
|
+
afterFullData.unshift(item);
|
|
17974
|
+
tableFullData.unshift(item);
|
|
17858
17975
|
});
|
|
17859
17976
|
// 刷新单元格合并
|
|
17860
17977
|
mergeList.forEach(mergeItem => {
|
|
@@ -20302,8 +20419,11 @@ const convertToRows = originColumns => {
|
|
|
20302
20419
|
}
|
|
20303
20420
|
// 检查类型,如果为自定义导出,则不需要校验类型
|
|
20304
20421
|
if (!opts.exportMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(exportOpts._typeMaps), type)) {
|
|
20422
|
+
errLog('vxe.error.notType', [type]);
|
|
20305
20423
|
if (true) {
|
|
20306
|
-
|
|
20424
|
+
if (['xlsx', 'pdf'].includes(type)) {
|
|
20425
|
+
warnLog('vxe.error.reqPlugin', [4, 'plugin-export-xlsx']);
|
|
20426
|
+
}
|
|
20307
20427
|
}
|
|
20308
20428
|
const params = {
|
|
20309
20429
|
status: false
|
|
@@ -20833,8 +20953,8 @@ function getCheckboxRangeRows($xeTable, evnt, params, targetTrElem, trRect, offs
|
|
|
20833
20953
|
mouseConfig,
|
|
20834
20954
|
mouseOpts
|
|
20835
20955
|
} = this;
|
|
20836
|
-
if (mouseConfig && mouseOpts.area && this.
|
|
20837
|
-
return this.
|
|
20956
|
+
if (mouseConfig && mouseOpts.area && this.handleMousedownCellAreaEvent) {
|
|
20957
|
+
return this.handleMousedownCellAreaEvent(evnt, params);
|
|
20838
20958
|
} else {
|
|
20839
20959
|
if (checkboxConfig && checkboxOpts.range) {
|
|
20840
20960
|
this.handleCheckboxRangeEvent(evnt, params);
|
|
@@ -22853,7 +22973,7 @@ function handleUupdateResize(_vm) {
|
|
|
22853
22973
|
if (this.showFooter && !(this.footerMethod || this.footerData)) {
|
|
22854
22974
|
warnLog('vxe.error.reqProp', ['footer-data | footer-method']);
|
|
22855
22975
|
}
|
|
22856
|
-
if (treeConfig && this.stripe) {
|
|
22976
|
+
if (treeConfig && !treeOpts.transform && this.stripe) {
|
|
22857
22977
|
warnLog('vxe.error.noTree', ['stripe']);
|
|
22858
22978
|
}
|
|
22859
22979
|
if (this.tooltipOpts.enabled) {
|
|
@@ -22896,7 +23016,10 @@ function handleUupdateResize(_vm) {
|
|
|
22896
23016
|
if (this.rowOpts.height && !this.showOverflow) {
|
|
22897
23017
|
warnLog('vxe.error.notProp', ['table.show-overflow']);
|
|
22898
23018
|
}
|
|
22899
|
-
if (!this.
|
|
23019
|
+
if (!this.handleMousedownCellAreaEvent) {
|
|
23020
|
+
if (this.areaConfig) {
|
|
23021
|
+
warnLog('vxe.error.notProp', ['area-config']);
|
|
23022
|
+
}
|
|
22900
23023
|
if (this.clipConfig) {
|
|
22901
23024
|
warnLog('vxe.error.notProp', ['clip-config']);
|
|
22902
23025
|
}
|
|
@@ -22923,7 +23046,7 @@ function handleUupdateResize(_vm) {
|
|
|
22923
23046
|
// if (this.mouseOpts.area && this.checkboxOpts.range) {
|
|
22924
23047
|
// warnLog('vxe.error.errConflicts', ['mouse-config.area', 'checkbox-config.range'])
|
|
22925
23048
|
// }
|
|
22926
|
-
if (this.
|
|
23049
|
+
if (this.mouseOpts.area && this.treeConfig && !treeOpts.transform) {
|
|
22927
23050
|
errLog('vxe.error.noTree', ['mouse-config.area']);
|
|
22928
23051
|
}
|
|
22929
23052
|
}
|
|
@@ -23036,7 +23159,7 @@ function handleUupdateResize(_vm) {
|
|
|
23036
23159
|
const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
|
|
23037
23160
|
$xeTable.$nextTick(() => {
|
|
23038
23161
|
if (props.loading) {
|
|
23039
|
-
if (!VxeUILoadingComponent) {
|
|
23162
|
+
if (!VxeUILoadingComponent && !this.$scopedSlots.loading) {
|
|
23040
23163
|
errLog('vxe.error.reqComp', ['vxe-loading']);
|
|
23041
23164
|
}
|
|
23042
23165
|
}
|
|
@@ -23305,12 +23428,15 @@ function handleUupdateResize(_vm) {
|
|
|
23305
23428
|
value: currLoading,
|
|
23306
23429
|
icon: loadingOpts.icon,
|
|
23307
23430
|
text: loadingOpts.text
|
|
23308
|
-
}
|
|
23309
|
-
|
|
23310
|
-
|
|
23311
|
-
|
|
23312
|
-
|
|
23313
|
-
|
|
23431
|
+
},
|
|
23432
|
+
scopedSlots: loadingSlot ? {
|
|
23433
|
+
default: () => $xeTable.callSlot(loadingSlot, {
|
|
23434
|
+
$table: $xeTable,
|
|
23435
|
+
$grid: $xeGrid,
|
|
23436
|
+
loading: currLoading
|
|
23437
|
+
}, h)
|
|
23438
|
+
} : {}
|
|
23439
|
+
}) : loadingSlot ? h('div', {
|
|
23314
23440
|
class: ['vxe-loading--custom-wrapper', {
|
|
23315
23441
|
'is--visible': currLoading
|
|
23316
23442
|
}]
|
|
@@ -26784,7 +26910,8 @@ const Toolbar = VxeToolbar;
|
|
|
26784
26910
|
notType: '不支持的文件类型 "{0}"',
|
|
26785
26911
|
notExp: '该浏览器不支持导入/导出功能',
|
|
26786
26912
|
impFields: '导入失败,请检查字段名和数据格式是否正确',
|
|
26787
|
-
treeNotImp: '树表格不支持导入'
|
|
26913
|
+
treeNotImp: '树表格不支持导入',
|
|
26914
|
+
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
|
|
26788
26915
|
},
|
|
26789
26916
|
table: {
|
|
26790
26917
|
emptyText: '暂无数据',
|