vxe-table 4.10.6-beta.25 → 4.10.6-beta.26
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/body.js +10 -11
- package/es/table/src/table.js +44 -45
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +56 -66
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/body.js +7 -10
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/table.js +47 -54
- 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/body.ts +10 -11
- package/packages/table/src/table.ts +47 -46
- /package/es/{iconfont.1737356819937.ttf → iconfont.1737366161311.ttf} +0 -0
- /package/es/{iconfont.1737356819937.woff → iconfont.1737366161311.woff} +0 -0
- /package/es/{iconfont.1737356819937.woff2 → iconfont.1737366161311.woff2} +0 -0
- /package/lib/{iconfont.1737356819937.ttf → iconfont.1737366161311.ttf} +0 -0
- /package/lib/{iconfont.1737356819937.woff → iconfont.1737366161311.woff} +0 -0
- /package/lib/{iconfont.1737356819937.woff2 → iconfont.1737366161311.woff2} +0 -0
package/es/table/src/table.js
CHANGED
|
@@ -840,13 +840,13 @@ export default defineComponent({
|
|
|
840
840
|
return { toVisibleIndex: 0, visibleSize: 6 };
|
|
841
841
|
};
|
|
842
842
|
const computeRowHeight = () => {
|
|
843
|
-
const {
|
|
843
|
+
const { isAllOverflow } = reactData;
|
|
844
844
|
const tableHeader = refTableHeader.value;
|
|
845
845
|
const tableBody = refTableBody.value;
|
|
846
846
|
const tableBodyElem = tableBody ? tableBody.$el : null;
|
|
847
847
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
848
848
|
let rowHeight = 0;
|
|
849
|
-
if (
|
|
849
|
+
if (isAllOverflow) {
|
|
850
850
|
if (tableBodyElem) {
|
|
851
851
|
const tableHeaderElem = tableHeader ? tableHeader.$el : null;
|
|
852
852
|
let firstTrElem;
|
|
@@ -869,7 +869,7 @@ export default defineComponent({
|
|
|
869
869
|
return Math.max(18, rowHeight);
|
|
870
870
|
};
|
|
871
871
|
const handleVirtualYVisible = (currScrollTop) => {
|
|
872
|
-
const {
|
|
872
|
+
const { isAllOverflow } = reactData;
|
|
873
873
|
const { elemStore, isResizeCellHeight, afterFullData, fullAllDataRowIdData } = internalData;
|
|
874
874
|
const rowOpts = computeRowOpts.value;
|
|
875
875
|
const cellOpts = computeCellOpts.value;
|
|
@@ -883,7 +883,7 @@ export default defineComponent({
|
|
|
883
883
|
let offsetTop = 0;
|
|
884
884
|
let visibleSize = 0;
|
|
885
885
|
const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height;
|
|
886
|
-
if (!isCustomCellHeight &&
|
|
886
|
+
if (!isCustomCellHeight && isAllOverflow) {
|
|
887
887
|
toVisibleIndex = Math.floor(scrollTop / defaultRowHeight);
|
|
888
888
|
visibleSize = Math.ceil(clientHeight / defaultRowHeight) + 1;
|
|
889
889
|
}
|
|
@@ -1405,12 +1405,11 @@ export default defineComponent({
|
|
|
1405
1405
|
return colHeight + topBottomPadding;
|
|
1406
1406
|
};
|
|
1407
1407
|
const calcCellHeight = () => {
|
|
1408
|
-
const {
|
|
1409
|
-
const { tableData, scrollYLoad, scrollXLoad } = reactData;
|
|
1408
|
+
const { tableData, isAllOverflow, scrollYLoad, scrollXLoad } = reactData;
|
|
1410
1409
|
const { fullAllDataRowIdData } = internalData;
|
|
1411
1410
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
1412
1411
|
const el = refElem.value;
|
|
1413
|
-
if (!
|
|
1412
|
+
if (!isAllOverflow && scrollYLoad && el) {
|
|
1414
1413
|
tableData.forEach(row => {
|
|
1415
1414
|
const rowid = getRowid($xeTable, row);
|
|
1416
1415
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
@@ -1674,7 +1673,7 @@ export default defineComponent({
|
|
|
1674
1673
|
updateAfterDataIndex();
|
|
1675
1674
|
};
|
|
1676
1675
|
const updateStyle = () => {
|
|
1677
|
-
const { border,
|
|
1676
|
+
const { border, showHeaderOverflow: allColumnHeaderOverflow, showFooterOverflow: allColumnFooterOverflow, mouseConfig, spanMethod, footerSpanMethod } = props;
|
|
1678
1677
|
const { isGroup, currentRow, tableColumn, scrollXLoad, scrollYLoad, overflowX, scrollbarWidth, overflowY, scrollbarHeight, columnStore, editStore, isAllOverflow, expandColumn } = reactData;
|
|
1679
1678
|
const { visibleColumn, fullColumnIdData, tableHeight, tableWidth, headerHeight, footerHeight, elemStore, customHeight, customMinHeight, customMaxHeight } = internalData;
|
|
1680
1679
|
const el = refElem.value;
|
|
@@ -1863,7 +1862,7 @@ export default defineComponent({
|
|
|
1863
1862
|
let renderColumnList = tableColumn;
|
|
1864
1863
|
let isOptimizeMode = false;
|
|
1865
1864
|
// 如果是使用优化模式
|
|
1866
|
-
if (scrollXLoad || scrollYLoad ||
|
|
1865
|
+
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
1867
1866
|
if (expandColumn || spanMethod || footerSpanMethod) {
|
|
1868
1867
|
// 如果不支持优化模式
|
|
1869
1868
|
}
|
|
@@ -1948,7 +1947,7 @@ export default defineComponent({
|
|
|
1948
1947
|
cellOverflow = XEUtils.isUndefined(showFooterOverflow) || XEUtils.isNull(showFooterOverflow) ? allColumnFooterOverflow : showFooterOverflow;
|
|
1949
1948
|
}
|
|
1950
1949
|
else {
|
|
1951
|
-
cellOverflow = XEUtils.isUndefined(showOverflow) || XEUtils.isNull(showOverflow) ?
|
|
1950
|
+
cellOverflow = XEUtils.isUndefined(showOverflow) || XEUtils.isNull(showOverflow) ? isAllOverflow : showOverflow;
|
|
1952
1951
|
}
|
|
1953
1952
|
const showEllipsis = cellOverflow === 'ellipsis';
|
|
1954
1953
|
const showTitle = cellOverflow === 'title';
|
|
@@ -2534,11 +2533,10 @@ export default defineComponent({
|
|
|
2534
2533
|
* @param {Array} datas 数据
|
|
2535
2534
|
*/
|
|
2536
2535
|
const loadTableData = (datas, isReset) => {
|
|
2537
|
-
const { keepSource, treeConfig
|
|
2536
|
+
const { keepSource, treeConfig } = props;
|
|
2538
2537
|
const { editStore, scrollYLoad: oldScrollYLoad } = reactData;
|
|
2539
2538
|
const { scrollYStore, scrollXStore, lastScrollLeft, lastScrollTop } = internalData;
|
|
2540
2539
|
const treeOpts = computeTreeOpts.value;
|
|
2541
|
-
const rowOpts = computeRowOpts.value;
|
|
2542
2540
|
const { transform } = treeOpts;
|
|
2543
2541
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
2544
2542
|
let treeData = [];
|
|
@@ -2598,32 +2596,15 @@ export default defineComponent({
|
|
|
2598
2596
|
internalData.tableSynchData = datas;
|
|
2599
2597
|
if (isReset) {
|
|
2600
2598
|
internalData.isResizeCellHeight = false;
|
|
2599
|
+
reactData.rowExpandedMaps = {};
|
|
2600
|
+
reactData.rowExpandLazyLoadedMaps = {};
|
|
2601
|
+
reactData.treeExpandedMaps = {};
|
|
2602
|
+
reactData.treeExpandLazyLoadedMaps = {};
|
|
2601
2603
|
}
|
|
2602
2604
|
// 克隆原数据,用于显示编辑状态,与编辑值做对比
|
|
2603
2605
|
if (keepSource) {
|
|
2604
2606
|
tablePrivateMethods.cacheSourceMap(fullData);
|
|
2605
2607
|
}
|
|
2606
|
-
if (sYLoad) {
|
|
2607
|
-
if (showOverflow) {
|
|
2608
|
-
if (!rowOpts.height) {
|
|
2609
|
-
const errColumn = internalData.tableFullColumn.find(column => column.showOverflow === false);
|
|
2610
|
-
if (errColumn) {
|
|
2611
|
-
errLog('vxe.error.errProp', [`column[field="${errColumn.field}"].show-overflow=false`, 'show-overflow=true']);
|
|
2612
|
-
}
|
|
2613
|
-
}
|
|
2614
|
-
}
|
|
2615
|
-
if (process.env.NODE_ENV === 'development') {
|
|
2616
|
-
if (!(props.height || props.maxHeight)) {
|
|
2617
|
-
errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}']);
|
|
2618
|
-
}
|
|
2619
|
-
// if (!props.showOverflow) {
|
|
2620
|
-
// warnLog('vxe.error.reqProp', ['table.show-overflow'])
|
|
2621
|
-
// }
|
|
2622
|
-
if (props.spanMethod) {
|
|
2623
|
-
warnLog('vxe.error.scrollErrProp', ['table.span-method']);
|
|
2624
|
-
}
|
|
2625
|
-
}
|
|
2626
|
-
}
|
|
2627
2608
|
if ($xeTable.clearCellAreas && props.mouseConfig) {
|
|
2628
2609
|
$xeTable.clearCellAreas();
|
|
2629
2610
|
$xeTable.clearCopyCellArea();
|
|
@@ -2642,6 +2623,27 @@ export default defineComponent({
|
|
|
2642
2623
|
if (sYLoad) {
|
|
2643
2624
|
scrollYStore.endIndex = scrollYStore.visibleSize;
|
|
2644
2625
|
}
|
|
2626
|
+
if (sYLoad) {
|
|
2627
|
+
// if (showOverflow) {
|
|
2628
|
+
// if (!rowOpts.height) {
|
|
2629
|
+
// const errColumn = internalData.tableFullColumn.find(column => column.showOverflow === false)
|
|
2630
|
+
// if (errColumn) {
|
|
2631
|
+
// errLog('vxe.error.errProp', [`column[field="${errColumn.field}"].show-overflow=false`, 'show-overflow=true'])
|
|
2632
|
+
// }
|
|
2633
|
+
// }
|
|
2634
|
+
// }
|
|
2635
|
+
if (process.env.NODE_ENV === 'development') {
|
|
2636
|
+
if (!(props.height || props.maxHeight)) {
|
|
2637
|
+
errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}']);
|
|
2638
|
+
}
|
|
2639
|
+
// if (!props.showOverflow) {
|
|
2640
|
+
// warnLog('vxe.error.reqProp', ['table.show-overflow'])
|
|
2641
|
+
// }
|
|
2642
|
+
if (props.spanMethod) {
|
|
2643
|
+
warnLog('vxe.error.scrollErrProp', ['table.span-method']);
|
|
2644
|
+
}
|
|
2645
|
+
}
|
|
2646
|
+
}
|
|
2645
2647
|
handleReserveStatus();
|
|
2646
2648
|
tablePrivateMethods.checkSelectionStatus();
|
|
2647
2649
|
return new Promise(resolve => {
|
|
@@ -3039,11 +3041,10 @@ export default defineComponent({
|
|
|
3039
3041
|
* 纵向 Y 可视渲染处理
|
|
3040
3042
|
*/
|
|
3041
3043
|
const loadScrollYData = (scrollTop) => {
|
|
3042
|
-
const {
|
|
3043
|
-
const { mergeList } = reactData;
|
|
3044
|
+
const { mergeList, isAllOverflow } = reactData;
|
|
3044
3045
|
const { scrollYStore } = internalData;
|
|
3045
3046
|
const { preloadSize, startIndex, endIndex, offsetSize } = scrollYStore;
|
|
3046
|
-
const autoOffsetYSize =
|
|
3047
|
+
const autoOffsetYSize = isAllOverflow ? offsetSize : offsetSize + 1;
|
|
3047
3048
|
const { toVisibleIndex, visibleSize } = handleVirtualYVisible(scrollTop);
|
|
3048
3049
|
const offsetItem = {
|
|
3049
3050
|
startIndex: Math.max(0, toVisibleIndex - 1 - offsetSize - preloadSize),
|
|
@@ -5279,8 +5280,7 @@ export default defineComponent({
|
|
|
5279
5280
|
* @param {ColumnInfo} fieldOrColumn 列配置
|
|
5280
5281
|
*/
|
|
5281
5282
|
scrollToRow(row, fieldOrColumn) {
|
|
5282
|
-
const {
|
|
5283
|
-
const { scrollYLoad, scrollXLoad } = reactData;
|
|
5283
|
+
const { isAllOverflow, scrollYLoad, scrollXLoad } = reactData;
|
|
5284
5284
|
const rest = [];
|
|
5285
5285
|
if (row) {
|
|
5286
5286
|
if (props.treeConfig) {
|
|
@@ -5295,7 +5295,7 @@ export default defineComponent({
|
|
|
5295
5295
|
}
|
|
5296
5296
|
return Promise.all(rest).then(() => {
|
|
5297
5297
|
if (row) {
|
|
5298
|
-
if (!
|
|
5298
|
+
if (!isAllOverflow && (scrollYLoad || scrollXLoad)) {
|
|
5299
5299
|
calcCellHeight();
|
|
5300
5300
|
calcCellWidth();
|
|
5301
5301
|
}
|
|
@@ -8797,8 +8797,7 @@ export default defineComponent({
|
|
|
8797
8797
|
},
|
|
8798
8798
|
// 更新纵向 Y 可视渲染上下剩余空间大小
|
|
8799
8799
|
updateScrollYSpace() {
|
|
8800
|
-
const {
|
|
8801
|
-
const { scrollYLoad } = reactData;
|
|
8800
|
+
const { isAllOverflow, scrollYLoad } = reactData;
|
|
8802
8801
|
const { scrollYStore, elemStore, isResizeCellHeight, afterFullData, fullAllDataRowIdData } = internalData;
|
|
8803
8802
|
const { startIndex } = scrollYStore;
|
|
8804
8803
|
const rowOpts = computeRowOpts.value;
|
|
@@ -8810,7 +8809,7 @@ export default defineComponent({
|
|
|
8810
8809
|
let ySpaceHeight = 0;
|
|
8811
8810
|
if (scrollYLoad) {
|
|
8812
8811
|
const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height;
|
|
8813
|
-
if (!isCustomCellHeight &&
|
|
8812
|
+
if (!isCustomCellHeight && isAllOverflow) {
|
|
8814
8813
|
ySpaceHeight = afterFullData.length * defaultRowHeight;
|
|
8815
8814
|
topSpaceHeight = Math.max(0, startIndex * defaultRowHeight);
|
|
8816
8815
|
}
|
|
@@ -8856,12 +8855,12 @@ export default defineComponent({
|
|
|
8856
8855
|
});
|
|
8857
8856
|
},
|
|
8858
8857
|
updateScrollXData() {
|
|
8859
|
-
const {
|
|
8858
|
+
const { isAllOverflow } = reactData;
|
|
8860
8859
|
handleTableColumn();
|
|
8861
8860
|
return nextTick().then(() => {
|
|
8862
8861
|
handleTableColumn();
|
|
8863
8862
|
$xeTable.updateScrollXSpace();
|
|
8864
|
-
if (!
|
|
8863
|
+
if (!isAllOverflow) {
|
|
8865
8864
|
$xeTable.updateScrollYSpace();
|
|
8866
8865
|
}
|
|
8867
8866
|
});
|
|
@@ -9474,7 +9473,7 @@ export default defineComponent({
|
|
|
9474
9473
|
if (value && value.length >= 50000) {
|
|
9475
9474
|
warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)']);
|
|
9476
9475
|
}
|
|
9477
|
-
loadTableData(value,
|
|
9476
|
+
loadTableData(value, true).then(() => {
|
|
9478
9477
|
const { scrollXLoad, scrollYLoad, expandColumn } = reactData;
|
|
9479
9478
|
internalData.inited = true;
|
|
9480
9479
|
internalData.initStatus = true;
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -3138,7 +3138,7 @@ function eqEmptyValue(cellValue) {
|
|
|
3138
3138
|
;// ./packages/ui/index.ts
|
|
3139
3139
|
|
|
3140
3140
|
|
|
3141
|
-
const version = "4.10.6-beta.
|
|
3141
|
+
const version = "4.10.6-beta.26";
|
|
3142
3142
|
core_.VxeUI.version = version;
|
|
3143
3143
|
core_.VxeUI.tableVersion = version;
|
|
3144
3144
|
core_.VxeUI.setConfig({
|
|
@@ -3577,7 +3577,7 @@ var esnext_iterator_some = __webpack_require__(7550);
|
|
|
3577
3577
|
const {
|
|
3578
3578
|
log: log_log
|
|
3579
3579
|
} = core_.VxeUI;
|
|
3580
|
-
const log_version = `table v${"4.10.6-beta.
|
|
3580
|
+
const log_version = `table v${"4.10.6-beta.26"}`;
|
|
3581
3581
|
const warnLog = log_log.create('warn', log_version);
|
|
3582
3582
|
const errLog = log_log.create('error', log_version);
|
|
3583
3583
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -6259,7 +6259,6 @@ const renderType = 'body';
|
|
|
6259
6259
|
const {
|
|
6260
6260
|
columnKey,
|
|
6261
6261
|
height,
|
|
6262
|
-
showOverflow: allColumnOverflow,
|
|
6263
6262
|
cellClassName: allCellClassName,
|
|
6264
6263
|
cellStyle,
|
|
6265
6264
|
align: allAlign,
|
|
@@ -6338,12 +6337,11 @@ const renderType = 'body';
|
|
|
6338
6337
|
const resizeHeight = resizeHeightFlag ? rowRest.resizeHeight : 0;
|
|
6339
6338
|
let fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX;
|
|
6340
6339
|
const isPadding = allPadding === null ? cellOpts.padding : allPadding;
|
|
6341
|
-
const cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showOverflow) ?
|
|
6340
|
+
const cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showOverflow) ? isAllOverflow : showOverflow;
|
|
6342
6341
|
const showEllipsis = cellOverflow === 'ellipsis';
|
|
6343
6342
|
const showTitle = cellOverflow === 'title';
|
|
6344
6343
|
const showTooltip = cellOverflow === true || cellOverflow === 'tooltip';
|
|
6345
|
-
|
|
6346
|
-
const hasEllipsis = allColumnOverflow || showTitle || showTooltip || showEllipsis || resizeHeight > 0;
|
|
6344
|
+
const hasEllipsis = isAllOverflow || showTitle || showTooltip || showEllipsis || resizeHeight > 0;
|
|
6347
6345
|
let isDirty;
|
|
6348
6346
|
const tdOns = {};
|
|
6349
6347
|
const cellAlign = align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
@@ -6496,13 +6494,13 @@ const renderType = 'body';
|
|
|
6496
6494
|
isVNPreEmptyStatus = true;
|
|
6497
6495
|
}
|
|
6498
6496
|
const tcStyle = {};
|
|
6499
|
-
if (hasEllipsis) {
|
|
6497
|
+
if (scrollYLoad || hasEllipsis) {
|
|
6500
6498
|
tcStyle.height = `${cellHeight}px`;
|
|
6501
6499
|
} else {
|
|
6502
6500
|
tcStyle.minHeight = `${cellHeight}px`;
|
|
6503
6501
|
}
|
|
6504
6502
|
const tdVNs = [];
|
|
6505
|
-
if (fixedHiddenColumn &&
|
|
6503
|
+
if (fixedHiddenColumn && isAllOverflow) {
|
|
6506
6504
|
tdVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
6507
6505
|
key: 'tc',
|
|
6508
6506
|
class: ['vxe-cell', {
|
|
@@ -6597,7 +6595,6 @@ const renderType = 'body';
|
|
|
6597
6595
|
highlightHoverRow,
|
|
6598
6596
|
rowClassName,
|
|
6599
6597
|
rowStyle,
|
|
6600
|
-
showOverflow: allColumnOverflow,
|
|
6601
6598
|
editConfig,
|
|
6602
6599
|
treeConfig
|
|
6603
6600
|
} = tableProps;
|
|
@@ -6606,6 +6603,7 @@ const renderType = 'body';
|
|
|
6606
6603
|
treeExpandedMaps,
|
|
6607
6604
|
scrollXLoad,
|
|
6608
6605
|
scrollYLoad,
|
|
6606
|
+
isAllOverflow,
|
|
6609
6607
|
rowExpandedMaps,
|
|
6610
6608
|
expandColumn,
|
|
6611
6609
|
selectRadioRow,
|
|
@@ -6743,7 +6741,7 @@ const renderType = 'body';
|
|
|
6743
6741
|
const {
|
|
6744
6742
|
showOverflow
|
|
6745
6743
|
} = expandColumn;
|
|
6746
|
-
const hasEllipsis = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showOverflow) ?
|
|
6744
|
+
const hasEllipsis = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showOverflow) ? isAllOverflow : showOverflow;
|
|
6747
6745
|
const expandParams = {
|
|
6748
6746
|
$table: $xeTable,
|
|
6749
6747
|
seq,
|
|
@@ -6831,7 +6829,6 @@ const renderType = 'body';
|
|
|
6831
6829
|
tableColumn
|
|
6832
6830
|
} = props;
|
|
6833
6831
|
const {
|
|
6834
|
-
showOverflow: allColumnOverflow,
|
|
6835
6832
|
spanMethod,
|
|
6836
6833
|
footerSpanMethod,
|
|
6837
6834
|
mouseConfig
|
|
@@ -6862,7 +6859,7 @@ const renderType = 'body';
|
|
|
6862
6859
|
let renderColumnList = tableColumn;
|
|
6863
6860
|
let isOptimizeMode = false;
|
|
6864
6861
|
// 如果是使用优化模式
|
|
6865
|
-
if (scrollXLoad || scrollYLoad ||
|
|
6862
|
+
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
6866
6863
|
if (expandColumn || spanMethod || footerSpanMethod) {
|
|
6867
6864
|
// 如果不支持优化模式
|
|
6868
6865
|
} else {
|
|
@@ -11154,14 +11151,14 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11154
11151
|
};
|
|
11155
11152
|
const computeRowHeight = () => {
|
|
11156
11153
|
const {
|
|
11157
|
-
|
|
11158
|
-
} =
|
|
11154
|
+
isAllOverflow
|
|
11155
|
+
} = reactData;
|
|
11159
11156
|
const tableHeader = refTableHeader.value;
|
|
11160
11157
|
const tableBody = refTableBody.value;
|
|
11161
11158
|
const tableBodyElem = tableBody ? tableBody.$el : null;
|
|
11162
11159
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
11163
11160
|
let rowHeight = 0;
|
|
11164
|
-
if (
|
|
11161
|
+
if (isAllOverflow) {
|
|
11165
11162
|
if (tableBodyElem) {
|
|
11166
11163
|
const tableHeaderElem = tableHeader ? tableHeader.$el : null;
|
|
11167
11164
|
let firstTrElem;
|
|
@@ -11184,8 +11181,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11184
11181
|
};
|
|
11185
11182
|
const handleVirtualYVisible = currScrollTop => {
|
|
11186
11183
|
const {
|
|
11187
|
-
|
|
11188
|
-
} =
|
|
11184
|
+
isAllOverflow
|
|
11185
|
+
} = reactData;
|
|
11189
11186
|
const {
|
|
11190
11187
|
elemStore,
|
|
11191
11188
|
isResizeCellHeight,
|
|
@@ -11204,7 +11201,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11204
11201
|
let offsetTop = 0;
|
|
11205
11202
|
let visibleSize = 0;
|
|
11206
11203
|
const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height;
|
|
11207
|
-
if (!isCustomCellHeight &&
|
|
11204
|
+
if (!isCustomCellHeight && isAllOverflow) {
|
|
11208
11205
|
toVisibleIndex = Math.floor(scrollTop / defaultRowHeight);
|
|
11209
11206
|
visibleSize = Math.ceil(clientHeight / defaultRowHeight) + 1;
|
|
11210
11207
|
} else {
|
|
@@ -11800,11 +11797,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11800
11797
|
return colHeight + topBottomPadding;
|
|
11801
11798
|
};
|
|
11802
11799
|
const calcCellHeight = () => {
|
|
11803
|
-
const {
|
|
11804
|
-
showOverflow
|
|
11805
|
-
} = props;
|
|
11806
11800
|
const {
|
|
11807
11801
|
tableData,
|
|
11802
|
+
isAllOverflow,
|
|
11808
11803
|
scrollYLoad,
|
|
11809
11804
|
scrollXLoad
|
|
11810
11805
|
} = reactData;
|
|
@@ -11813,7 +11808,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11813
11808
|
} = internalData;
|
|
11814
11809
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
11815
11810
|
const el = refElem.value;
|
|
11816
|
-
if (!
|
|
11811
|
+
if (!isAllOverflow && scrollYLoad && el) {
|
|
11817
11812
|
tableData.forEach(row => {
|
|
11818
11813
|
const rowid = getRowid($xeTable, row);
|
|
11819
11814
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
@@ -12197,7 +12192,6 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
12197
12192
|
const updateStyle = () => {
|
|
12198
12193
|
const {
|
|
12199
12194
|
border,
|
|
12200
|
-
showOverflow: allColumnOverflow,
|
|
12201
12195
|
showHeaderOverflow: allColumnHeaderOverflow,
|
|
12202
12196
|
showFooterOverflow: allColumnFooterOverflow,
|
|
12203
12197
|
mouseConfig,
|
|
@@ -12418,7 +12412,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
12418
12412
|
let renderColumnList = tableColumn;
|
|
12419
12413
|
let isOptimizeMode = false;
|
|
12420
12414
|
// 如果是使用优化模式
|
|
12421
|
-
if (scrollXLoad || scrollYLoad ||
|
|
12415
|
+
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
12422
12416
|
if (expandColumn || spanMethod || footerSpanMethod) {
|
|
12423
12417
|
// 如果不支持优化模式
|
|
12424
12418
|
} else {
|
|
@@ -12502,7 +12496,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
12502
12496
|
} else if (layout === 'footer') {
|
|
12503
12497
|
cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showFooterOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showFooterOverflow) ? allColumnFooterOverflow : showFooterOverflow;
|
|
12504
12498
|
} else {
|
|
12505
|
-
cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showOverflow) ?
|
|
12499
|
+
cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showOverflow) ? isAllOverflow : showOverflow;
|
|
12506
12500
|
}
|
|
12507
12501
|
const showEllipsis = cellOverflow === 'ellipsis';
|
|
12508
12502
|
const showTitle = cellOverflow === 'title';
|
|
@@ -13205,8 +13199,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
13205
13199
|
const loadTableData = (datas, isReset) => {
|
|
13206
13200
|
const {
|
|
13207
13201
|
keepSource,
|
|
13208
|
-
treeConfig
|
|
13209
|
-
showOverflow
|
|
13202
|
+
treeConfig
|
|
13210
13203
|
} = props;
|
|
13211
13204
|
const {
|
|
13212
13205
|
editStore,
|
|
@@ -13219,7 +13212,6 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
13219
13212
|
lastScrollTop
|
|
13220
13213
|
} = internalData;
|
|
13221
13214
|
const treeOpts = computeTreeOpts.value;
|
|
13222
|
-
const rowOpts = computeRowOpts.value;
|
|
13223
13215
|
const {
|
|
13224
13216
|
transform
|
|
13225
13217
|
} = treeOpts;
|
|
@@ -13280,32 +13272,15 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
13280
13272
|
internalData.tableSynchData = datas;
|
|
13281
13273
|
if (isReset) {
|
|
13282
13274
|
internalData.isResizeCellHeight = false;
|
|
13275
|
+
reactData.rowExpandedMaps = {};
|
|
13276
|
+
reactData.rowExpandLazyLoadedMaps = {};
|
|
13277
|
+
reactData.treeExpandedMaps = {};
|
|
13278
|
+
reactData.treeExpandLazyLoadedMaps = {};
|
|
13283
13279
|
}
|
|
13284
13280
|
// 克隆原数据,用于显示编辑状态,与编辑值做对比
|
|
13285
13281
|
if (keepSource) {
|
|
13286
13282
|
tablePrivateMethods.cacheSourceMap(fullData);
|
|
13287
13283
|
}
|
|
13288
|
-
if (sYLoad) {
|
|
13289
|
-
if (showOverflow) {
|
|
13290
|
-
if (!rowOpts.height) {
|
|
13291
|
-
const errColumn = internalData.tableFullColumn.find(column => column.showOverflow === false);
|
|
13292
|
-
if (errColumn) {
|
|
13293
|
-
errLog('vxe.error.errProp', [`column[field="${errColumn.field}"].show-overflow=false`, 'show-overflow=true']);
|
|
13294
|
-
}
|
|
13295
|
-
}
|
|
13296
|
-
}
|
|
13297
|
-
if (true) {
|
|
13298
|
-
if (!(props.height || props.maxHeight)) {
|
|
13299
|
-
errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}']);
|
|
13300
|
-
}
|
|
13301
|
-
// if (!props.showOverflow) {
|
|
13302
|
-
// warnLog('vxe.error.reqProp', ['table.show-overflow'])
|
|
13303
|
-
// }
|
|
13304
|
-
if (props.spanMethod) {
|
|
13305
|
-
warnLog('vxe.error.scrollErrProp', ['table.span-method']);
|
|
13306
|
-
}
|
|
13307
|
-
}
|
|
13308
|
-
}
|
|
13309
13284
|
if ($xeTable.clearCellAreas && props.mouseConfig) {
|
|
13310
13285
|
$xeTable.clearCellAreas();
|
|
13311
13286
|
$xeTable.clearCopyCellArea();
|
|
@@ -13324,6 +13299,27 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
13324
13299
|
if (sYLoad) {
|
|
13325
13300
|
scrollYStore.endIndex = scrollYStore.visibleSize;
|
|
13326
13301
|
}
|
|
13302
|
+
if (sYLoad) {
|
|
13303
|
+
// if (showOverflow) {
|
|
13304
|
+
// if (!rowOpts.height) {
|
|
13305
|
+
// const errColumn = internalData.tableFullColumn.find(column => column.showOverflow === false)
|
|
13306
|
+
// if (errColumn) {
|
|
13307
|
+
// errLog('vxe.error.errProp', [`column[field="${errColumn.field}"].show-overflow=false`, 'show-overflow=true'])
|
|
13308
|
+
// }
|
|
13309
|
+
// }
|
|
13310
|
+
// }
|
|
13311
|
+
if (true) {
|
|
13312
|
+
if (!(props.height || props.maxHeight)) {
|
|
13313
|
+
errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}']);
|
|
13314
|
+
}
|
|
13315
|
+
// if (!props.showOverflow) {
|
|
13316
|
+
// warnLog('vxe.error.reqProp', ['table.show-overflow'])
|
|
13317
|
+
// }
|
|
13318
|
+
if (props.spanMethod) {
|
|
13319
|
+
warnLog('vxe.error.scrollErrProp', ['table.span-method']);
|
|
13320
|
+
}
|
|
13321
|
+
}
|
|
13322
|
+
}
|
|
13327
13323
|
handleReserveStatus();
|
|
13328
13324
|
tablePrivateMethods.checkSelectionStatus();
|
|
13329
13325
|
return new Promise(resolve => {
|
|
@@ -13774,10 +13770,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
13774
13770
|
*/
|
|
13775
13771
|
const loadScrollYData = scrollTop => {
|
|
13776
13772
|
const {
|
|
13777
|
-
|
|
13778
|
-
|
|
13779
|
-
const {
|
|
13780
|
-
mergeList
|
|
13773
|
+
mergeList,
|
|
13774
|
+
isAllOverflow
|
|
13781
13775
|
} = reactData;
|
|
13782
13776
|
const {
|
|
13783
13777
|
scrollYStore
|
|
@@ -13788,7 +13782,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
13788
13782
|
endIndex,
|
|
13789
13783
|
offsetSize
|
|
13790
13784
|
} = scrollYStore;
|
|
13791
|
-
const autoOffsetYSize =
|
|
13785
|
+
const autoOffsetYSize = isAllOverflow ? offsetSize : offsetSize + 1;
|
|
13792
13786
|
const {
|
|
13793
13787
|
toVisibleIndex,
|
|
13794
13788
|
visibleSize
|
|
@@ -16364,9 +16358,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16364
16358
|
*/
|
|
16365
16359
|
scrollToRow(row, fieldOrColumn) {
|
|
16366
16360
|
const {
|
|
16367
|
-
|
|
16368
|
-
} = props;
|
|
16369
|
-
const {
|
|
16361
|
+
isAllOverflow,
|
|
16370
16362
|
scrollYLoad,
|
|
16371
16363
|
scrollXLoad
|
|
16372
16364
|
} = reactData;
|
|
@@ -16383,7 +16375,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16383
16375
|
}
|
|
16384
16376
|
return Promise.all(rest).then(() => {
|
|
16385
16377
|
if (row) {
|
|
16386
|
-
if (!
|
|
16378
|
+
if (!isAllOverflow && (scrollYLoad || scrollXLoad)) {
|
|
16387
16379
|
calcCellHeight();
|
|
16388
16380
|
calcCellWidth();
|
|
16389
16381
|
}
|
|
@@ -20451,9 +20443,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20451
20443
|
// 更新纵向 Y 可视渲染上下剩余空间大小
|
|
20452
20444
|
updateScrollYSpace() {
|
|
20453
20445
|
const {
|
|
20454
|
-
|
|
20455
|
-
} = props;
|
|
20456
|
-
const {
|
|
20446
|
+
isAllOverflow,
|
|
20457
20447
|
scrollYLoad
|
|
20458
20448
|
} = reactData;
|
|
20459
20449
|
const {
|
|
@@ -20475,7 +20465,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20475
20465
|
let ySpaceHeight = 0;
|
|
20476
20466
|
if (scrollYLoad) {
|
|
20477
20467
|
const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height;
|
|
20478
|
-
if (!isCustomCellHeight &&
|
|
20468
|
+
if (!isCustomCellHeight && isAllOverflow) {
|
|
20479
20469
|
ySpaceHeight = afterFullData.length * defaultRowHeight;
|
|
20480
20470
|
topSpaceHeight = Math.max(0, startIndex * defaultRowHeight);
|
|
20481
20471
|
} else {
|
|
@@ -20520,13 +20510,13 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20520
20510
|
},
|
|
20521
20511
|
updateScrollXData() {
|
|
20522
20512
|
const {
|
|
20523
|
-
|
|
20524
|
-
} =
|
|
20513
|
+
isAllOverflow
|
|
20514
|
+
} = reactData;
|
|
20525
20515
|
handleTableColumn();
|
|
20526
20516
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
|
|
20527
20517
|
handleTableColumn();
|
|
20528
20518
|
$xeTable.updateScrollXSpace();
|
|
20529
|
-
if (!
|
|
20519
|
+
if (!isAllOverflow) {
|
|
20530
20520
|
$xeTable.updateScrollYSpace();
|
|
20531
20521
|
}
|
|
20532
20522
|
});
|
|
@@ -21115,7 +21105,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
21115
21105
|
if (value && value.length >= 50000) {
|
|
21116
21106
|
warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)']);
|
|
21117
21107
|
}
|
|
21118
|
-
loadTableData(value,
|
|
21108
|
+
loadTableData(value, true).then(() => {
|
|
21119
21109
|
const {
|
|
21120
21110
|
scrollXLoad,
|
|
21121
21111
|
scrollYLoad,
|