vxe-table 3.17.1 → 3.17.3
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/de-DE.js +80 -80
- package/es/locale/lang/es-ES.js +79 -79
- package/es/locale/lang/ja-JP.js +82 -82
- package/es/locale/lang/ko-KR.js +88 -88
- package/es/locale/lang/ru-RU.js +84 -84
- package/es/locale/lang/vi-VN.js +79 -79
- package/es/locale/lang/zh-CHT.js +21 -21
- package/es/style.css +1 -1
- package/es/table/src/body.js +4 -4
- package/es/table/src/methods.js +28 -3
- package/es/table/src/table.js +26 -6
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +66 -13
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/de-DE.js +80 -80
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +80 -80
- package/lib/locale/lang/es-ES.js +79 -79
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +79 -79
- package/lib/locale/lang/ja-JP.js +82 -82
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +82 -82
- package/lib/locale/lang/ko-KR.js +88 -88
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +88 -88
- package/lib/locale/lang/ru-RU.js +84 -84
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +84 -84
- package/lib/locale/lang/vi-VN.js +79 -79
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +79 -79
- package/lib/locale/lang/zh-CHT.js +21 -21
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +21 -21
- package/lib/style.css +1 -1
- package/lib/table/src/body.js +4 -3
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/methods.js +32 -2
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +28 -6
- 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 +1 -1
- package/packages/locale/lang/de-DE.ts +80 -80
- package/packages/locale/lang/es-ES.ts +79 -79
- package/packages/locale/lang/ja-JP.ts +82 -82
- package/packages/locale/lang/ko-KR.ts +88 -88
- package/packages/locale/lang/ru-RU.ts +84 -84
- package/packages/locale/lang/vi-VN.ts +79 -79
- package/packages/locale/lang/zh-CHT.ts +21 -21
- package/packages/table/src/body.ts +4 -4
- package/packages/table/src/methods.ts +28 -3
- package/packages/table/src/table.ts +26 -6
- /package/es/{iconfont.1754358049869.ttf → iconfont.1754439845207.ttf} +0 -0
- /package/es/{iconfont.1754358049869.woff → iconfont.1754439845207.woff} +0 -0
- /package/es/{iconfont.1754358049869.woff2 → iconfont.1754439845207.woff2} +0 -0
- /package/lib/{iconfont.1754358049869.ttf → iconfont.1754439845207.ttf} +0 -0
- /package/lib/{iconfont.1754358049869.woff → iconfont.1754439845207.woff} +0 -0
- /package/lib/{iconfont.1754358049869.woff2 → iconfont.1754439845207.woff2} +0 -0
package/es/table/src/body.js
CHANGED
|
@@ -61,7 +61,7 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
|
|
|
61
61
|
const tableInternalData = $xeTable;
|
|
62
62
|
const $xeGrid = $xeTable.$xeGrid;
|
|
63
63
|
const { columnKey, resizable: allResizable, showOverflow: allShowOverflow, border, height, treeConfig, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding: allPadding } = tableProps;
|
|
64
|
-
const { tableData, dragRow, overflowX, currentColumn, scrollXLoad, scrollYLoad, mergeBodyFlag, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag, editStore, isAllOverflow, validErrorMaps } = tableReactData;
|
|
64
|
+
const { tableData, dragRow, overflowX, overflowY, currentColumn, scrollXLoad, scrollYLoad, mergeBodyFlag, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag, editStore, isAllOverflow, validErrorMaps } = tableReactData;
|
|
65
65
|
const { fullAllDataRowIdData, fullColumnIdData, mergeBodyCellMaps, visibleColumn, afterFullData, mergeBodyList, scrollXStore, scrollYStore } = tableInternalData;
|
|
66
66
|
const cellOpts = $xeTable.computeCellOpts;
|
|
67
67
|
const validOpts = $xeTable.computeValidOpts;
|
|
@@ -244,12 +244,12 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
|
|
|
244
244
|
const isLastColumn = $columnIndex === columns.length - 1;
|
|
245
245
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
246
246
|
let isVNPreEmptyStatus = false;
|
|
247
|
-
if (
|
|
247
|
+
if (!isMergeCell) {
|
|
248
248
|
if (!dragRow || getRowid($xeTable, dragRow) !== rowid) {
|
|
249
|
-
if (scrollYLoad && !treeConfig && !virtualYOpts.immediate && (_rowIndex < scrollYStore.visibleStartIndex - scrollYStore.preloadSize || _rowIndex > scrollYStore.visibleEndIndex + scrollYStore.preloadSize)) {
|
|
249
|
+
if (overflowY && scrollYLoad && !treeConfig && !virtualYOpts.immediate && (_rowIndex < scrollYStore.visibleStartIndex - scrollYStore.preloadSize || _rowIndex > scrollYStore.visibleEndIndex + scrollYStore.preloadSize)) {
|
|
250
250
|
isVNPreEmptyStatus = true;
|
|
251
251
|
}
|
|
252
|
-
else if (scrollXLoad && !virtualXOpts.immediate && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
252
|
+
else if (overflowX && scrollXLoad && !virtualXOpts.immediate && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
253
253
|
isVNPreEmptyStatus = true;
|
|
254
254
|
}
|
|
255
255
|
}
|
package/es/table/src/methods.js
CHANGED
|
@@ -3984,12 +3984,16 @@ const Methods = {
|
|
|
3984
3984
|
const internalData = $xeTable;
|
|
3985
3985
|
const { treeConfig } = props;
|
|
3986
3986
|
const { isRowGroupStatus } = reactData;
|
|
3987
|
-
const { fullAllDataRowIdData, tableFullData, tableFullTreeData, tableFullGroupData, treeExpandedMaps } = internalData;
|
|
3987
|
+
const { currKeyField, fullAllDataRowIdData, tableFullData, tableFullTreeData, tableFullGroupData, treeExpandedMaps } = internalData;
|
|
3988
3988
|
const fullAllDataRowIdMaps = isReset ? {} : Object.assign({}, fullAllDataRowIdData); // 存在已删除数据
|
|
3989
3989
|
const fullDataRowIdMaps = {};
|
|
3990
|
+
const idMaps = {};
|
|
3990
3991
|
const { handleUpdateRowId } = createHandleUpdateRowId($xeTable);
|
|
3991
3992
|
const handleRowCache = (row, index, items, currIndex, parentRow, rowid, level, seq) => {
|
|
3992
3993
|
let rowRest = fullAllDataRowIdMaps[rowid];
|
|
3994
|
+
if (idMaps[rowid]) {
|
|
3995
|
+
errLog('vxe.error.repeatKey', [currKeyField, rowid]);
|
|
3996
|
+
}
|
|
3993
3997
|
if (!rowRest) {
|
|
3994
3998
|
rowRest = { row, rowid, seq, index: -1, _index: -1, $index: -1, treeIndex: index, _tIndex: -1, items, parent: parentRow, level, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 };
|
|
3995
3999
|
}
|
|
@@ -4001,6 +4005,7 @@ const Methods = {
|
|
|
4001
4005
|
rowRest.level = level;
|
|
4002
4006
|
rowRest.index = currIndex;
|
|
4003
4007
|
rowRest.treeIndex = index;
|
|
4008
|
+
idMaps[rowid] = true;
|
|
4004
4009
|
fullDataRowIdMaps[rowid] = rowRest;
|
|
4005
4010
|
fullAllDataRowIdMaps[rowid] = rowRest;
|
|
4006
4011
|
};
|
|
@@ -7521,8 +7526,28 @@ const Methods = {
|
|
|
7521
7526
|
/**
|
|
7522
7527
|
* 用于当前行,获取当前行的数据
|
|
7523
7528
|
*/
|
|
7524
|
-
getCurrentRecord() {
|
|
7525
|
-
|
|
7529
|
+
getCurrentRecord(isFull) {
|
|
7530
|
+
const $xeTable = this;
|
|
7531
|
+
const props = $xeTable;
|
|
7532
|
+
const reactData = $xeTable;
|
|
7533
|
+
const internalData = $xeTable;
|
|
7534
|
+
const { currentRow } = reactData;
|
|
7535
|
+
const { fullDataRowIdData, afterFullRowMaps } = internalData;
|
|
7536
|
+
const rowOpts = $xeTable.computeRowOpts;
|
|
7537
|
+
if (rowOpts.isCurrent || props.highlightCurrentRow) {
|
|
7538
|
+
const rowid = getRowid($xeTable, currentRow);
|
|
7539
|
+
if (isFull) {
|
|
7540
|
+
if (fullDataRowIdData[rowid]) {
|
|
7541
|
+
return currentRow;
|
|
7542
|
+
}
|
|
7543
|
+
}
|
|
7544
|
+
else {
|
|
7545
|
+
if (afterFullRowMaps[rowid]) {
|
|
7546
|
+
return currentRow;
|
|
7547
|
+
}
|
|
7548
|
+
}
|
|
7549
|
+
}
|
|
7550
|
+
return null;
|
|
7526
7551
|
},
|
|
7527
7552
|
/**
|
|
7528
7553
|
* 用于单选行,获取当已选中的数据
|
package/es/table/src/table.js
CHANGED
|
@@ -758,20 +758,40 @@ export default {
|
|
|
758
758
|
computeVirtualXOpts() {
|
|
759
759
|
const $xeTable = this;
|
|
760
760
|
const props = $xeTable;
|
|
761
|
-
const { virtualXConfig } = props;
|
|
761
|
+
const { virtualXConfig, scrollX } = props;
|
|
762
|
+
const globalVirtualXConfig = getConfig().table.virtualXConfig;
|
|
763
|
+
const globalScrollX = getConfig().table.scrollX;
|
|
762
764
|
if (virtualXConfig) {
|
|
763
|
-
return Object.assign({},
|
|
765
|
+
return Object.assign({}, globalVirtualXConfig, virtualXConfig);
|
|
764
766
|
}
|
|
765
|
-
|
|
767
|
+
if (scrollX) {
|
|
768
|
+
// 已废弃,保留兼容
|
|
769
|
+
return Object.assign({}, globalScrollX, scrollX);
|
|
770
|
+
}
|
|
771
|
+
if (globalVirtualXConfig) {
|
|
772
|
+
return Object.assign({}, globalVirtualXConfig, virtualXConfig);
|
|
773
|
+
}
|
|
774
|
+
// 已废弃,保留兼容
|
|
775
|
+
return Object.assign({}, globalScrollX, scrollX);
|
|
766
776
|
},
|
|
767
777
|
computeVirtualYOpts() {
|
|
768
778
|
const $xeTable = this;
|
|
769
779
|
const props = $xeTable;
|
|
770
|
-
const { virtualYConfig } = props;
|
|
780
|
+
const { virtualYConfig, scrollY } = props;
|
|
781
|
+
const globalVirtualYConfig = getConfig().table.virtualYConfig;
|
|
782
|
+
const globalScrollY = getConfig().table.scrollY;
|
|
771
783
|
if (virtualYConfig) {
|
|
772
|
-
return Object.assign({},
|
|
784
|
+
return Object.assign({}, globalVirtualYConfig, virtualYConfig);
|
|
785
|
+
}
|
|
786
|
+
if (scrollY) {
|
|
787
|
+
// 已废弃,保留兼容
|
|
788
|
+
return Object.assign({}, globalScrollY, scrollY);
|
|
789
|
+
}
|
|
790
|
+
if (globalVirtualYConfig) {
|
|
791
|
+
return Object.assign({}, globalVirtualYConfig, virtualYConfig);
|
|
773
792
|
}
|
|
774
|
-
|
|
793
|
+
// 已废弃,保留兼容
|
|
794
|
+
return Object.assign({}, globalScrollY, scrollY);
|
|
775
795
|
},
|
|
776
796
|
computeScrollbarOpts() {
|
|
777
797
|
const $xeTable = this;
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
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.17.
|
|
2005
|
+
const version = "3.17.3";
|
|
2006
2006
|
core_.VxeUI.version = version;
|
|
2007
2007
|
core_.VxeUI.tableVersion = version;
|
|
2008
2008
|
core_.VxeUI.setConfig({
|
|
@@ -2669,7 +2669,7 @@ function isNodeElement(elem) {
|
|
|
2669
2669
|
const {
|
|
2670
2670
|
log: log_log
|
|
2671
2671
|
} = core_.VxeUI;
|
|
2672
|
-
const log_version = `table v${"3.17.
|
|
2672
|
+
const log_version = `table v${"3.17.3"}`;
|
|
2673
2673
|
const warnLog = log_log.create('warn', log_version);
|
|
2674
2674
|
const errLog = log_log.create('error', log_version);
|
|
2675
2675
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -9951,6 +9951,7 @@ const Methods = {
|
|
|
9951
9951
|
isRowGroupStatus
|
|
9952
9952
|
} = reactData;
|
|
9953
9953
|
const {
|
|
9954
|
+
currKeyField,
|
|
9954
9955
|
fullAllDataRowIdData,
|
|
9955
9956
|
tableFullData,
|
|
9956
9957
|
tableFullTreeData,
|
|
@@ -9961,11 +9962,15 @@ const Methods = {
|
|
|
9961
9962
|
...fullAllDataRowIdData
|
|
9962
9963
|
}; // 存在已删除数据
|
|
9963
9964
|
const fullDataRowIdMaps = {};
|
|
9965
|
+
const idMaps = {};
|
|
9964
9966
|
const {
|
|
9965
9967
|
handleUpdateRowId
|
|
9966
9968
|
} = createHandleUpdateRowId($xeTable);
|
|
9967
9969
|
const handleRowCache = (row, index, items, currIndex, parentRow, rowid, level, seq) => {
|
|
9968
9970
|
let rowRest = fullAllDataRowIdMaps[rowid];
|
|
9971
|
+
if (idMaps[rowid]) {
|
|
9972
|
+
errLog('vxe.error.repeatKey', [currKeyField, rowid]);
|
|
9973
|
+
}
|
|
9969
9974
|
if (!rowRest) {
|
|
9970
9975
|
rowRest = {
|
|
9971
9976
|
row,
|
|
@@ -9993,6 +9998,7 @@ const Methods = {
|
|
|
9993
9998
|
rowRest.level = level;
|
|
9994
9999
|
rowRest.index = currIndex;
|
|
9995
10000
|
rowRest.treeIndex = index;
|
|
10001
|
+
idMaps[rowid] = true;
|
|
9996
10002
|
fullDataRowIdMaps[rowid] = rowRest;
|
|
9997
10003
|
fullAllDataRowIdMaps[rowid] = rowRest;
|
|
9998
10004
|
};
|
|
@@ -14078,8 +14084,32 @@ const Methods = {
|
|
|
14078
14084
|
/**
|
|
14079
14085
|
* 用于当前行,获取当前行的数据
|
|
14080
14086
|
*/
|
|
14081
|
-
getCurrentRecord() {
|
|
14082
|
-
|
|
14087
|
+
getCurrentRecord(isFull) {
|
|
14088
|
+
const $xeTable = this;
|
|
14089
|
+
const props = $xeTable;
|
|
14090
|
+
const reactData = $xeTable;
|
|
14091
|
+
const internalData = $xeTable;
|
|
14092
|
+
const {
|
|
14093
|
+
currentRow
|
|
14094
|
+
} = reactData;
|
|
14095
|
+
const {
|
|
14096
|
+
fullDataRowIdData,
|
|
14097
|
+
afterFullRowMaps
|
|
14098
|
+
} = internalData;
|
|
14099
|
+
const rowOpts = $xeTable.computeRowOpts;
|
|
14100
|
+
if (rowOpts.isCurrent || props.highlightCurrentRow) {
|
|
14101
|
+
const rowid = getRowid($xeTable, currentRow);
|
|
14102
|
+
if (isFull) {
|
|
14103
|
+
if (fullDataRowIdData[rowid]) {
|
|
14104
|
+
return currentRow;
|
|
14105
|
+
}
|
|
14106
|
+
} else {
|
|
14107
|
+
if (afterFullRowMaps[rowid]) {
|
|
14108
|
+
return currentRow;
|
|
14109
|
+
}
|
|
14110
|
+
}
|
|
14111
|
+
}
|
|
14112
|
+
return null;
|
|
14083
14113
|
},
|
|
14084
14114
|
/**
|
|
14085
14115
|
* 用于单选行,获取当已选中的数据
|
|
@@ -18009,6 +18039,7 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
|
|
|
18009
18039
|
tableData,
|
|
18010
18040
|
dragRow,
|
|
18011
18041
|
overflowX,
|
|
18042
|
+
overflowY,
|
|
18012
18043
|
currentColumn,
|
|
18013
18044
|
scrollXLoad,
|
|
18014
18045
|
scrollYLoad,
|
|
@@ -18246,11 +18277,11 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
|
|
|
18246
18277
|
const isLastColumn = $columnIndex === columns.length - 1;
|
|
18247
18278
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
18248
18279
|
let isVNPreEmptyStatus = false;
|
|
18249
|
-
if (
|
|
18280
|
+
if (!isMergeCell) {
|
|
18250
18281
|
if (!dragRow || getRowid($xeTable, dragRow) !== rowid) {
|
|
18251
|
-
if (scrollYLoad && !treeConfig && !virtualYOpts.immediate && (_rowIndex < scrollYStore.visibleStartIndex - scrollYStore.preloadSize || _rowIndex > scrollYStore.visibleEndIndex + scrollYStore.preloadSize)) {
|
|
18282
|
+
if (overflowY && scrollYLoad && !treeConfig && !virtualYOpts.immediate && (_rowIndex < scrollYStore.visibleStartIndex - scrollYStore.preloadSize || _rowIndex > scrollYStore.visibleEndIndex + scrollYStore.preloadSize)) {
|
|
18252
18283
|
isVNPreEmptyStatus = true;
|
|
18253
|
-
} else if (scrollXLoad && !virtualXOpts.immediate && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
18284
|
+
} else if (overflowX && scrollXLoad && !virtualXOpts.immediate && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
18254
18285
|
isVNPreEmptyStatus = true;
|
|
18255
18286
|
}
|
|
18256
18287
|
}
|
|
@@ -28906,23 +28937,45 @@ function renderBody(h, $xeTable) {
|
|
|
28906
28937
|
const $xeTable = this;
|
|
28907
28938
|
const props = $xeTable;
|
|
28908
28939
|
const {
|
|
28909
|
-
virtualXConfig
|
|
28940
|
+
virtualXConfig,
|
|
28941
|
+
scrollX
|
|
28910
28942
|
} = props;
|
|
28943
|
+
const globalVirtualXConfig = table_getConfig().table.virtualXConfig;
|
|
28944
|
+
const globalScrollX = table_getConfig().table.scrollX;
|
|
28911
28945
|
if (virtualXConfig) {
|
|
28912
|
-
return Object.assign({},
|
|
28946
|
+
return Object.assign({}, globalVirtualXConfig, virtualXConfig);
|
|
28947
|
+
}
|
|
28948
|
+
if (scrollX) {
|
|
28949
|
+
// 已废弃,保留兼容
|
|
28950
|
+
return Object.assign({}, globalScrollX, scrollX);
|
|
28913
28951
|
}
|
|
28914
|
-
|
|
28952
|
+
if (globalVirtualXConfig) {
|
|
28953
|
+
return Object.assign({}, globalVirtualXConfig, virtualXConfig);
|
|
28954
|
+
}
|
|
28955
|
+
// 已废弃,保留兼容
|
|
28956
|
+
return Object.assign({}, globalScrollX, scrollX);
|
|
28915
28957
|
},
|
|
28916
28958
|
computeVirtualYOpts() {
|
|
28917
28959
|
const $xeTable = this;
|
|
28918
28960
|
const props = $xeTable;
|
|
28919
28961
|
const {
|
|
28920
|
-
virtualYConfig
|
|
28962
|
+
virtualYConfig,
|
|
28963
|
+
scrollY
|
|
28921
28964
|
} = props;
|
|
28965
|
+
const globalVirtualYConfig = table_getConfig().table.virtualYConfig;
|
|
28966
|
+
const globalScrollY = table_getConfig().table.scrollY;
|
|
28922
28967
|
if (virtualYConfig) {
|
|
28923
|
-
return Object.assign({},
|
|
28968
|
+
return Object.assign({}, globalVirtualYConfig, virtualYConfig);
|
|
28969
|
+
}
|
|
28970
|
+
if (scrollY) {
|
|
28971
|
+
// 已废弃,保留兼容
|
|
28972
|
+
return Object.assign({}, globalScrollY, scrollY);
|
|
28973
|
+
}
|
|
28974
|
+
if (globalVirtualYConfig) {
|
|
28975
|
+
return Object.assign({}, globalVirtualYConfig, virtualYConfig);
|
|
28924
28976
|
}
|
|
28925
|
-
|
|
28977
|
+
// 已废弃,保留兼容
|
|
28978
|
+
return Object.assign({}, globalScrollY, scrollY);
|
|
28926
28979
|
},
|
|
28927
28980
|
computeScrollbarOpts() {
|
|
28928
28981
|
const $xeTable = this;
|