vxe-table 3.19.6 → 3.19.8
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 +9 -19
- package/es/table/src/cell.js +47 -40
- package/es/table/src/footer.js +2 -12
- package/es/table/src/header.js +3 -11
- package/es/table/src/methods.js +51 -56
- package/es/table/src/table.js +89 -6
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +201 -121
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/body.js +7 -20
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +12 -5
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/footer.js +2 -15
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +3 -13
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +56 -59
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +118 -6
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +2 -2
- 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/table/src/body.ts +9 -19
- package/packages/table/src/cell.ts +49 -42
- package/packages/table/src/footer.ts +2 -11
- package/packages/table/src/header.ts +3 -11
- package/packages/table/src/methods.ts +52 -55
- package/packages/table/src/table.ts +89 -6
- package/packages/ui/index.ts +1 -1
- /package/es/{iconfont.1761877353318.ttf → iconfont.1762324067655.ttf} +0 -0
- /package/es/{iconfont.1761877353318.woff → iconfont.1762324067655.woff} +0 -0
- /package/es/{iconfont.1761877353318.woff2 → iconfont.1762324067655.woff2} +0 -0
- /package/lib/{iconfont.1761877353318.ttf → iconfont.1762324067655.ttf} +0 -0
- /package/lib/{iconfont.1761877353318.woff → iconfont.1762324067655.woff} +0 -0
- /package/lib/{iconfont.1761877353318.woff2 → iconfont.1762324067655.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -2005,7 +2005,7 @@ function getClass(property, params) {
|
|
|
2005
2005
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2006
2006
|
|
|
2007
2007
|
|
|
2008
|
-
const version = "3.19.
|
|
2008
|
+
const version = "3.19.8";
|
|
2009
2009
|
core_.VxeUI.version = version;
|
|
2010
2010
|
core_.VxeUI.tableVersion = version;
|
|
2011
2011
|
core_.VxeUI.setConfig({
|
|
@@ -2017,7 +2017,7 @@ core_.VxeUI.setConfig({
|
|
|
2017
2017
|
delayHover: 250,
|
|
2018
2018
|
autoResize: true,
|
|
2019
2019
|
padding: true,
|
|
2020
|
-
minHeight:
|
|
2020
|
+
// minHeight: null,
|
|
2021
2021
|
// keepSource: false,
|
|
2022
2022
|
// showOverflow: null,
|
|
2023
2023
|
// showHeaderOverflow: null,
|
|
@@ -2713,7 +2713,7 @@ function isNodeElement(elem) {
|
|
|
2713
2713
|
const {
|
|
2714
2714
|
log: log_log
|
|
2715
2715
|
} = core_.VxeUI;
|
|
2716
|
-
const log_version = `table v${"3.19.
|
|
2716
|
+
const log_version = `table v${"3.19.8"}`;
|
|
2717
2717
|
const warnLog = log_log.create('warn', log_version);
|
|
2718
2718
|
const errLog = log_log.create('error', log_version);
|
|
2719
2719
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -3938,8 +3938,10 @@ function renderTitleContent(h, params, content) {
|
|
|
3938
3938
|
isRowGroupStatus
|
|
3939
3939
|
} = tableReactData;
|
|
3940
3940
|
const {
|
|
3941
|
-
showHeaderOverflow
|
|
3941
|
+
showHeaderOverflow,
|
|
3942
|
+
slots
|
|
3942
3943
|
} = column;
|
|
3944
|
+
const titleSlot = slots ? slots.title : null;
|
|
3943
3945
|
const headerTooltipOpts = $table.computeHeaderTooltipOpts;
|
|
3944
3946
|
const showAllTip = headerTooltipOpts.showAll;
|
|
3945
3947
|
const headOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
@@ -3972,7 +3974,7 @@ function renderTitleContent(h, params, content) {
|
|
|
3972
3974
|
return [h('span', {
|
|
3973
3975
|
class: 'vxe-cell--title',
|
|
3974
3976
|
on: ons
|
|
3975
|
-
}, isRowGroupStatus && column.aggFunc && $table.getPivotTableAggregateRenderColTitles ? $table.getPivotTableAggregateRenderColTitles(h, column, titleVN) : [titleVN])];
|
|
3977
|
+
}, isRowGroupStatus && column.aggFunc && $table.getPivotTableAggregateRenderColTitles ? $table.getPivotTableAggregateRenderColTitles(h, column, titleVN) : titleSlot ? $table.callSlot(titleSlot, params, h) : [titleVN])];
|
|
3976
3978
|
}
|
|
3977
3979
|
function getFooterContent(h, params) {
|
|
3978
3980
|
const {
|
|
@@ -4995,12 +4997,17 @@ const Cell = {
|
|
|
4995
4997
|
iconDesc,
|
|
4996
4998
|
iconVisibleMethod
|
|
4997
4999
|
} = sortOpts;
|
|
5000
|
+
const {
|
|
5001
|
+
order,
|
|
5002
|
+
slots
|
|
5003
|
+
} = column;
|
|
4998
5004
|
if (showIcon && (!iconVisibleMethod || iconVisibleMethod(params))) {
|
|
4999
|
-
|
|
5005
|
+
const sortSlot = slots ? slots.sort : null;
|
|
5006
|
+
return sortSlot ? getSlotVNs($table.callSlot(sortSlot, params, h)) : [h('span', {
|
|
5000
5007
|
class: ['vxe-cell--sort', `vxe-cell--sort-${iconLayout}-layout`]
|
|
5001
5008
|
}, [h('i', {
|
|
5002
5009
|
class: ['vxe-sort--asc-btn', iconAsc || cell_getIcon().TABLE_SORT_ASC, {
|
|
5003
|
-
'sort--active':
|
|
5010
|
+
'sort--active': order === 'asc'
|
|
5004
5011
|
}],
|
|
5005
5012
|
attrs: {
|
|
5006
5013
|
title: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(ascTitle) ? cell_getI18n('vxe.table.sortAsc') : `${ascTitle || ''}`
|
|
@@ -5013,7 +5020,7 @@ const Cell = {
|
|
|
5013
5020
|
} : undefined
|
|
5014
5021
|
}), h('i', {
|
|
5015
5022
|
class: ['vxe-sort--desc-btn', iconDesc || cell_getIcon().TABLE_SORT_DESC, {
|
|
5016
|
-
'sort--active':
|
|
5023
|
+
'sort--active': order === 'desc'
|
|
5017
5024
|
}],
|
|
5018
5025
|
attrs: {
|
|
5019
5026
|
title: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(descTitle) ? cell_getI18n('vxe.table.sortDesc') : `${descTitle || ''}`
|
|
@@ -6489,8 +6496,7 @@ function handleVirtualTreeExpand($xeTable, rows, expanded) {
|
|
|
6489
6496
|
updateAfterDataIndex($xeTable);
|
|
6490
6497
|
return $xeTable.$nextTick();
|
|
6491
6498
|
}).then(() => {
|
|
6492
|
-
|
|
6493
|
-
return handleLazyRecalculate($xeTable, true, true, true);
|
|
6499
|
+
return handleRecalculateStyle($xeTable, true, true, true);
|
|
6494
6500
|
}).then(() => {
|
|
6495
6501
|
updateTreeLineStyle($xeTable);
|
|
6496
6502
|
setTimeout(() => {
|
|
@@ -7112,18 +7118,12 @@ function updateStyle($xeTable) {
|
|
|
7112
7118
|
const reactData = $xeTable;
|
|
7113
7119
|
const internalData = $xeTable;
|
|
7114
7120
|
const {
|
|
7115
|
-
|
|
7116
|
-
showFooterOverflow: allColumnFooterOverflow,
|
|
7117
|
-
mouseConfig,
|
|
7118
|
-
spanMethod,
|
|
7119
|
-
footerSpanMethod
|
|
7121
|
+
mouseConfig
|
|
7120
7122
|
} = props;
|
|
7121
7123
|
const {
|
|
7122
7124
|
isGroup,
|
|
7123
7125
|
currentRow,
|
|
7124
7126
|
tableColumn,
|
|
7125
|
-
scrollXLoad,
|
|
7126
|
-
scrollYLoad,
|
|
7127
7127
|
overflowX,
|
|
7128
7128
|
scrollbarWidth,
|
|
7129
7129
|
overflowY,
|
|
@@ -7131,8 +7131,6 @@ function updateStyle($xeTable) {
|
|
|
7131
7131
|
scrollXWidth,
|
|
7132
7132
|
columnStore,
|
|
7133
7133
|
editStore,
|
|
7134
|
-
isAllOverflow,
|
|
7135
|
-
expandColumn,
|
|
7136
7134
|
isColLoading
|
|
7137
7135
|
} = reactData;
|
|
7138
7136
|
const {
|
|
@@ -7151,12 +7149,18 @@ function updateStyle($xeTable) {
|
|
|
7151
7149
|
return;
|
|
7152
7150
|
}
|
|
7153
7151
|
const containerList = ['main', 'left', 'right'];
|
|
7152
|
+
const {
|
|
7153
|
+
leftList,
|
|
7154
|
+
rightList
|
|
7155
|
+
} = columnStore;
|
|
7154
7156
|
let osbWidth = overflowY ? scrollbarWidth : 0;
|
|
7155
7157
|
let osbHeight = overflowX ? scrollbarHeight : 0;
|
|
7156
7158
|
const emptyPlaceholderElem = $xeTable.$refs.refEmptyPlaceholder;
|
|
7159
|
+
const isHeaderRenderOptimize = $xeTable.computeIsHeaderRenderOptimize;
|
|
7160
|
+
const isBodyRenderOptimize = $xeTable.computeIsBodyRenderOptimize;
|
|
7161
|
+
const isFooterRenderOptimize = $xeTable.computeIsFooterRenderOptimize;
|
|
7157
7162
|
const scrollbarOpts = $xeTable.computeScrollbarOpts;
|
|
7158
7163
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
7159
|
-
const expandOpts = $xeTable.computeExpandOpts;
|
|
7160
7164
|
const bodyWrapperElem = getRefElem(elemStore['main-body-wrapper']);
|
|
7161
7165
|
const bodyTableElem = getRefElem(elemStore['main-body-table']);
|
|
7162
7166
|
if (emptyPlaceholderElem) {
|
|
@@ -7269,7 +7273,7 @@ function updateStyle($xeTable) {
|
|
|
7269
7273
|
let fixedColumn = [];
|
|
7270
7274
|
let fixedWrapperElem;
|
|
7271
7275
|
if (fixedType) {
|
|
7272
|
-
fixedColumn = isFixedLeft ?
|
|
7276
|
+
fixedColumn = isFixedLeft ? leftList : rightList;
|
|
7273
7277
|
fixedWrapperElem = isFixedLeft ? $xeTable.$refs.refLeftContainer : $xeTable.$refs.refRightContainer;
|
|
7274
7278
|
}
|
|
7275
7279
|
layoutList.forEach(layout => {
|
|
@@ -7280,18 +7284,10 @@ function updateStyle($xeTable) {
|
|
|
7280
7284
|
// 表头体样式处理
|
|
7281
7285
|
// 横向滚动渲染
|
|
7282
7286
|
let renderColumnList = tableColumn;
|
|
7283
|
-
|
|
7287
|
+
const isOptimizeMode = isHeaderRenderOptimize;
|
|
7284
7288
|
if (isGroup) {
|
|
7285
7289
|
renderColumnList = visibleColumn;
|
|
7286
7290
|
} else {
|
|
7287
|
-
// 如果是使用优化模式
|
|
7288
|
-
if (scrollXLoad && allColumnHeaderOverflow) {
|
|
7289
|
-
if (spanMethod || footerSpanMethod) {
|
|
7290
|
-
// 如果不支持优化模式
|
|
7291
|
-
} else {
|
|
7292
|
-
isOptimizeMode = true;
|
|
7293
|
-
}
|
|
7294
|
-
}
|
|
7295
7291
|
if (!isOptimizeMode || !isColLoading && (fixedType || !overflowX)) {
|
|
7296
7292
|
renderColumnList = visibleColumn;
|
|
7297
7293
|
}
|
|
@@ -7341,15 +7337,7 @@ function updateStyle($xeTable) {
|
|
|
7341
7337
|
fixedWrapperElem.style.width = `${fixedColumn.reduce((previous, column) => previous + column.renderWidth, 0)}px`;
|
|
7342
7338
|
}
|
|
7343
7339
|
let renderColumnList = tableColumn;
|
|
7344
|
-
|
|
7345
|
-
// 如果是使用优化模式
|
|
7346
|
-
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
7347
|
-
if (expandColumn && expandOpts.mode !== 'fixed' || spanMethod || footerSpanMethod) {
|
|
7348
|
-
// 如果不支持优化模式
|
|
7349
|
-
} else {
|
|
7350
|
-
isOptimizeMode = true;
|
|
7351
|
-
}
|
|
7352
|
-
}
|
|
7340
|
+
const isOptimizeMode = isBodyRenderOptimize;
|
|
7353
7341
|
if (fixedType) {
|
|
7354
7342
|
renderColumnList = visibleColumn;
|
|
7355
7343
|
if (isOptimizeMode) {
|
|
@@ -7379,15 +7367,7 @@ function updateStyle($xeTable) {
|
|
|
7379
7367
|
}
|
|
7380
7368
|
} else if (layout === 'footer') {
|
|
7381
7369
|
let renderColumnList = tableColumn;
|
|
7382
|
-
|
|
7383
|
-
// 如果是使用优化模式
|
|
7384
|
-
if (scrollXLoad && allColumnFooterOverflow) {
|
|
7385
|
-
if (spanMethod || footerSpanMethod) {
|
|
7386
|
-
// 如果不支持优化模式
|
|
7387
|
-
} else {
|
|
7388
|
-
isOptimizeMode = true;
|
|
7389
|
-
}
|
|
7390
|
-
}
|
|
7370
|
+
const isOptimizeMode = isFooterRenderOptimize;
|
|
7391
7371
|
if (!isOptimizeMode || !isColLoading && (fixedType || !overflowX)) {
|
|
7392
7372
|
renderColumnList = visibleColumn;
|
|
7393
7373
|
}
|
|
@@ -8820,20 +8800,32 @@ function autoCellWidth($xeTable) {
|
|
|
8820
8800
|
/**
|
|
8821
8801
|
* 计算自适应行高
|
|
8822
8802
|
*/
|
|
8823
|
-
const calcCellAutoHeight = (rowRest, wrapperEl) => {
|
|
8824
|
-
const
|
|
8803
|
+
const calcCellAutoHeight = ($xeTable, rowRest, wrapperEl) => {
|
|
8804
|
+
const reactData = $xeTable;
|
|
8805
|
+
const {
|
|
8806
|
+
scrollXLoad
|
|
8807
|
+
} = reactData;
|
|
8808
|
+
const wrapperElemList = wrapperEl.querySelectorAll(`.vxe-cell--wrapper[rowid="${rowRest.rowid}"]`);
|
|
8825
8809
|
let colHeight = rowRest.height;
|
|
8826
8810
|
let firstCellStyle = null;
|
|
8827
8811
|
let topBottomPadding = 0;
|
|
8828
|
-
for (let i = 0; i <
|
|
8829
|
-
const wrapperElem =
|
|
8812
|
+
for (let i = 0; i < wrapperElemList.length; i++) {
|
|
8813
|
+
const wrapperElem = wrapperElemList[i];
|
|
8830
8814
|
const cellElem = wrapperElem.parentElement;
|
|
8831
8815
|
if (!firstCellStyle) {
|
|
8816
|
+
const cellStyle = cellElem.style;
|
|
8817
|
+
const orHeight = cellStyle.height;
|
|
8818
|
+
if (!scrollXLoad) {
|
|
8819
|
+
cellStyle.height = '';
|
|
8820
|
+
}
|
|
8832
8821
|
firstCellStyle = getComputedStyle(cellElem);
|
|
8833
8822
|
topBottomPadding = firstCellStyle ? Math.ceil(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(firstCellStyle.paddingTop) + external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(firstCellStyle.paddingBottom)) : 0;
|
|
8823
|
+
if (!scrollXLoad) {
|
|
8824
|
+
cellStyle.height = orHeight;
|
|
8825
|
+
}
|
|
8834
8826
|
}
|
|
8835
8827
|
const cellHeight = wrapperElem ? wrapperElem.clientHeight : 0;
|
|
8836
|
-
colHeight = Math.max(colHeight, Math.ceil(cellHeight + topBottomPadding));
|
|
8828
|
+
colHeight = scrollXLoad ? Math.max(colHeight, Math.ceil(cellHeight + topBottomPadding)) : Math.ceil(cellHeight + topBottomPadding);
|
|
8837
8829
|
}
|
|
8838
8830
|
return colHeight;
|
|
8839
8831
|
};
|
|
@@ -8863,13 +8855,15 @@ const calcCellHeight = $xeTable => {
|
|
|
8863
8855
|
const {
|
|
8864
8856
|
handleGetRowId
|
|
8865
8857
|
} = createHandleGetRowId($xeTable);
|
|
8858
|
+
el.setAttribute('data-calc-row', 'Y');
|
|
8866
8859
|
tableData.forEach(row => {
|
|
8867
8860
|
const rowid = handleGetRowId(row);
|
|
8868
8861
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
8869
8862
|
if (rowRest) {
|
|
8870
|
-
const height = calcCellAutoHeight(rowRest, el);
|
|
8863
|
+
const height = calcCellAutoHeight($xeTable, rowRest, el);
|
|
8871
8864
|
rowRest.height = Math.max(defaultRowHeight, scrollXLoad ? Math.max(rowRest.height, height) : height);
|
|
8872
8865
|
}
|
|
8866
|
+
el.removeAttribute('data-calc-row');
|
|
8873
8867
|
});
|
|
8874
8868
|
reactData.calcCellHeightFlag++;
|
|
8875
8869
|
}
|
|
@@ -13059,7 +13053,9 @@ const Methods = {
|
|
|
13059
13053
|
return;
|
|
13060
13054
|
}
|
|
13061
13055
|
const handleRsHeight = () => {
|
|
13062
|
-
|
|
13056
|
+
el.setAttribute('data-calc-row', 'Y');
|
|
13057
|
+
const resizeHeight = calcCellAutoHeight($xeTable, rowRest, el);
|
|
13058
|
+
el.removeAttribute('data-calc-row');
|
|
13063
13059
|
const resizeParams = {
|
|
13064
13060
|
...params,
|
|
13065
13061
|
resizeHeight,
|
|
@@ -13159,7 +13155,7 @@ const Methods = {
|
|
|
13159
13155
|
const rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(row) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(row) ? row : handleGetRowId(row);
|
|
13160
13156
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
13161
13157
|
if (rowRest) {
|
|
13162
|
-
rowRest.resizeHeight = calcCellAutoHeight(rowRest, el);
|
|
13158
|
+
rowRest.resizeHeight = calcCellAutoHeight($xeTable, rowRest, el);
|
|
13163
13159
|
}
|
|
13164
13160
|
el.removeAttribute('data-calc-row');
|
|
13165
13161
|
});
|
|
@@ -19039,7 +19035,9 @@ const Methods = {
|
|
|
19039
19035
|
const internalData = $xeTable;
|
|
19040
19036
|
const {
|
|
19041
19037
|
isAllOverflow,
|
|
19038
|
+
overflowY,
|
|
19042
19039
|
scrollYLoad,
|
|
19040
|
+
scrollYHeight,
|
|
19043
19041
|
expandColumn
|
|
19044
19042
|
} = reactData;
|
|
19045
19043
|
const {
|
|
@@ -19065,13 +19063,13 @@ const Methods = {
|
|
|
19065
19063
|
const rightbodyTableElem = getRefElem(elemStore['right-body-table']);
|
|
19066
19064
|
const containerList = ['main', 'left', 'right'];
|
|
19067
19065
|
let ySpaceTop = 0;
|
|
19068
|
-
let
|
|
19066
|
+
let sYHeight = scrollYHeight;
|
|
19069
19067
|
let isScrollYBig = false;
|
|
19070
19068
|
if (scrollYLoad) {
|
|
19071
19069
|
const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height;
|
|
19072
19070
|
if (!isCustomCellHeight && !expandColumn && isAllOverflow) {
|
|
19073
|
-
|
|
19074
|
-
if (
|
|
19071
|
+
sYHeight = afterFullData.length * defaultRowHeight;
|
|
19072
|
+
if (sYHeight > maxYHeight) {
|
|
19075
19073
|
isScrollYBig = true;
|
|
19076
19074
|
}
|
|
19077
19075
|
ySpaceTop = Math.max(0, startIndex * defaultRowHeight);
|
|
@@ -19083,18 +19081,21 @@ const Methods = {
|
|
|
19083
19081
|
const lastRow = afterFullData[afterFullData.length - 1];
|
|
19084
19082
|
rowid = getRowid($xeTable, lastRow);
|
|
19085
19083
|
rowRest = fullAllDataRowIdData[rowid] || {};
|
|
19086
|
-
|
|
19087
|
-
|
|
19088
|
-
|
|
19089
|
-
|
|
19084
|
+
// 如果为空时还没计算完数据,保持原高度不变
|
|
19085
|
+
if (rowRest.oTop) {
|
|
19086
|
+
sYHeight = (rowRest.oTop || 0) + (rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight);
|
|
19087
|
+
// 是否展开行
|
|
19088
|
+
if (expandColumn && rowExpandedMaps[rowid]) {
|
|
19089
|
+
sYHeight += rowRest.expandHeight || expandOpts.height || 0;
|
|
19090
|
+
}
|
|
19090
19091
|
}
|
|
19091
|
-
if (
|
|
19092
|
+
if (sYHeight > maxYHeight) {
|
|
19092
19093
|
isScrollYBig = true;
|
|
19093
19094
|
}
|
|
19094
19095
|
}
|
|
19095
19096
|
} else {
|
|
19096
19097
|
if (bodyTableElem) {
|
|
19097
|
-
|
|
19098
|
+
sYHeight = bodyTableElem.clientHeight;
|
|
19098
19099
|
}
|
|
19099
19100
|
}
|
|
19100
19101
|
let clientHeight = 0;
|
|
@@ -19102,7 +19103,7 @@ const Methods = {
|
|
|
19102
19103
|
clientHeight = bodyScrollElem.clientHeight;
|
|
19103
19104
|
}
|
|
19104
19105
|
// 虚拟渲染
|
|
19105
|
-
let ySpaceHeight =
|
|
19106
|
+
let ySpaceHeight = sYHeight;
|
|
19106
19107
|
let scrollYTop = ySpaceTop;
|
|
19107
19108
|
if (isScrollYBig) {
|
|
19108
19109
|
// 触底
|
|
@@ -19113,6 +19114,9 @@ const Methods = {
|
|
|
19113
19114
|
}
|
|
19114
19115
|
ySpaceHeight = maxYHeight;
|
|
19115
19116
|
}
|
|
19117
|
+
if (!(scrollYLoad && overflowY)) {
|
|
19118
|
+
scrollYTop = 0;
|
|
19119
|
+
}
|
|
19116
19120
|
if (leftBodyTableElem) {
|
|
19117
19121
|
leftBodyTableElem.style.transform = `translate(0px, ${scrollYTop}px)`;
|
|
19118
19122
|
}
|
|
@@ -19140,7 +19144,7 @@ const Methods = {
|
|
|
19140
19144
|
rowExpandYSpaceEl.style.height = ySpaceHeight ? `${ySpaceHeight}px` : '';
|
|
19141
19145
|
}
|
|
19142
19146
|
reactData.scrollYTop = scrollYTop;
|
|
19143
|
-
reactData.scrollYHeight =
|
|
19147
|
+
reactData.scrollYHeight = ySpaceHeight;
|
|
19144
19148
|
reactData.isScrollYBig = isScrollYBig;
|
|
19145
19149
|
calcScrollbar($xeTable);
|
|
19146
19150
|
if (isScrollYBig && mouseOpts.area) {
|
|
@@ -20509,8 +20513,6 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
20509
20513
|
tableColumn
|
|
20510
20514
|
} = props;
|
|
20511
20515
|
const {
|
|
20512
|
-
spanMethod,
|
|
20513
|
-
footerSpanMethod,
|
|
20514
20516
|
mouseConfig
|
|
20515
20517
|
} = tableProps;
|
|
20516
20518
|
const {
|
|
@@ -20520,8 +20522,6 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
20520
20522
|
overflowX,
|
|
20521
20523
|
scrollXLoad,
|
|
20522
20524
|
scrollYLoad,
|
|
20523
|
-
isAllOverflow,
|
|
20524
|
-
expandColumn,
|
|
20525
20525
|
dragRow,
|
|
20526
20526
|
dragCol
|
|
20527
20527
|
} = tableReactData;
|
|
@@ -20532,18 +20532,10 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
20532
20532
|
} = tableInternalData;
|
|
20533
20533
|
const emptyOpts = $xeTable.computeEmptyOpts;
|
|
20534
20534
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
20535
|
-
const
|
|
20535
|
+
const isBodyRenderOptimize = $xeTable.computeIsBodyRenderOptimize;
|
|
20536
20536
|
let renderDataList = tableData;
|
|
20537
20537
|
let renderColumnList = tableColumn;
|
|
20538
|
-
|
|
20539
|
-
// 如果是使用优化模式
|
|
20540
|
-
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
20541
|
-
if (expandColumn && expandOpts.mode !== 'fixed' || spanMethod || footerSpanMethod) {
|
|
20542
|
-
// 如果不支持优化模式
|
|
20543
|
-
} else {
|
|
20544
|
-
isOptimizeMode = true;
|
|
20545
|
-
}
|
|
20546
|
-
}
|
|
20538
|
+
const isOptimizeMode = isBodyRenderOptimize;
|
|
20547
20539
|
if (!isColLoading && (fixedType || !overflowX)) {
|
|
20548
20540
|
renderColumnList = visibleColumn;
|
|
20549
20541
|
}
|
|
@@ -20616,11 +20608,6 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
20616
20608
|
emptyContent = tableProps.emptyText || body_getI18n('vxe.table.emptyText');
|
|
20617
20609
|
}
|
|
20618
20610
|
}
|
|
20619
|
-
const ons = {
|
|
20620
|
-
scroll(evnt) {
|
|
20621
|
-
$xeTable.triggerBodyScrollEvent(evnt, fixedType);
|
|
20622
|
-
}
|
|
20623
|
-
};
|
|
20624
20611
|
return h('div', {
|
|
20625
20612
|
ref: 'refElem',
|
|
20626
20613
|
class: ['vxe-table--body-wrapper', fixedType ? `fixed-${fixedType}--wrapper` : 'body--wrapper'],
|
|
@@ -20630,7 +20617,11 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
20630
20617
|
}, [h('div', {
|
|
20631
20618
|
ref: 'refBodyScroll',
|
|
20632
20619
|
class: 'vxe-table--body-inner-wrapper',
|
|
20633
|
-
on:
|
|
20620
|
+
on: {
|
|
20621
|
+
scroll(evnt) {
|
|
20622
|
+
$xeTable.triggerBodyScrollEvent(evnt, fixedType);
|
|
20623
|
+
}
|
|
20624
|
+
}
|
|
20634
20625
|
}, [fixedType ? body_renderEmptyElement($xeTable) : h('div', {
|
|
20635
20626
|
ref: 'refBodyXSpace',
|
|
20636
20627
|
class: 'vxe-body--x-space'
|
|
@@ -21214,10 +21205,7 @@ function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups) {
|
|
|
21214
21205
|
headerColumn
|
|
21215
21206
|
} = _vm;
|
|
21216
21207
|
const {
|
|
21217
|
-
mouseConfig
|
|
21218
|
-
showHeaderOverflow: allColumnHeaderOverflow,
|
|
21219
|
-
spanMethod,
|
|
21220
|
-
footerSpanMethod
|
|
21208
|
+
mouseConfig
|
|
21221
21209
|
} = tableProps;
|
|
21222
21210
|
const {
|
|
21223
21211
|
isGroup,
|
|
@@ -21231,20 +21219,13 @@ function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups) {
|
|
|
21231
21219
|
fullColumnIdData
|
|
21232
21220
|
} = tableInternalData;
|
|
21233
21221
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
21222
|
+
const isHeaderRenderOptimize = $xeTable.computeIsHeaderRenderOptimize;
|
|
21234
21223
|
let renderHeaderList = headerColumn;
|
|
21235
21224
|
let renderColumnList = tableColumn;
|
|
21236
|
-
|
|
21225
|
+
const isOptimizeMode = isHeaderRenderOptimize;
|
|
21237
21226
|
if (isGroup) {
|
|
21238
21227
|
renderColumnList = visibleColumn;
|
|
21239
21228
|
} else {
|
|
21240
|
-
// 如果是使用优化模式
|
|
21241
|
-
if (scrollXLoad && allColumnHeaderOverflow) {
|
|
21242
|
-
if (spanMethod || footerSpanMethod) {
|
|
21243
|
-
// 如果不支持优化模式
|
|
21244
|
-
} else {
|
|
21245
|
-
isOptimizeMode = true;
|
|
21246
|
-
}
|
|
21247
|
-
}
|
|
21248
21229
|
if (!isOptimizeMode || !isColLoading && (fixedType || !overflowX)) {
|
|
21249
21230
|
renderColumnList = visibleColumn;
|
|
21250
21231
|
}
|
|
@@ -21704,7 +21685,6 @@ function footer_renderHeads(h, _vm, isOptimizeMode, renderColumnList) {
|
|
|
21704
21685
|
const _vm = this;
|
|
21705
21686
|
const props = _vm;
|
|
21706
21687
|
const $xeTable = _vm.$parent;
|
|
21707
|
-
const tableProps = $xeTable;
|
|
21708
21688
|
const tableReactData = $xeTable;
|
|
21709
21689
|
const tableInternalData = $xeTable;
|
|
21710
21690
|
const {
|
|
@@ -21715,11 +21695,6 @@ function footer_renderHeads(h, _vm, isOptimizeMode, renderColumnList) {
|
|
|
21715
21695
|
fixedColumn,
|
|
21716
21696
|
tableColumn
|
|
21717
21697
|
} = props;
|
|
21718
|
-
const {
|
|
21719
|
-
spanMethod,
|
|
21720
|
-
footerSpanMethod,
|
|
21721
|
-
showFooterOverflow: allColumnFooterOverflow
|
|
21722
|
-
} = tableProps;
|
|
21723
21698
|
const {
|
|
21724
21699
|
visibleColumn,
|
|
21725
21700
|
fullColumnIdData
|
|
@@ -21731,16 +21706,9 @@ function footer_renderHeads(h, _vm, isOptimizeMode, renderColumnList) {
|
|
|
21731
21706
|
scrollXLoad,
|
|
21732
21707
|
dragCol
|
|
21733
21708
|
} = tableReactData;
|
|
21709
|
+
const isFooterRenderOptimize = $xeTable.computeIsFooterRenderOptimize;
|
|
21734
21710
|
let renderColumnList = tableColumn;
|
|
21735
|
-
|
|
21736
|
-
// 如果是使用优化模式
|
|
21737
|
-
if (scrollXLoad && allColumnFooterOverflow) {
|
|
21738
|
-
if (spanMethod || footerSpanMethod) {
|
|
21739
|
-
// 如果不支持优化模式
|
|
21740
|
-
} else {
|
|
21741
|
-
isOptimizeMode = true;
|
|
21742
|
-
}
|
|
21743
|
-
}
|
|
21711
|
+
const isOptimizeMode = isFooterRenderOptimize;
|
|
21744
21712
|
if (!isOptimizeMode || !isColLoading && (fixedType || !overflowX)) {
|
|
21745
21713
|
renderColumnList = visibleColumn;
|
|
21746
21714
|
}
|
|
@@ -31461,6 +31429,118 @@ function renderBody(h, $xeTable) {
|
|
|
31461
31429
|
}
|
|
31462
31430
|
return leftWidth;
|
|
31463
31431
|
},
|
|
31432
|
+
computeBodyMergeCoverFixed() {
|
|
31433
|
+
const $xeTable = this;
|
|
31434
|
+
const reactData = $xeTable;
|
|
31435
|
+
const internalData = $xeTable;
|
|
31436
|
+
const {
|
|
31437
|
+
columnStore,
|
|
31438
|
+
mergeBodyFlag
|
|
31439
|
+
} = reactData;
|
|
31440
|
+
const {
|
|
31441
|
+
mergeBodyList,
|
|
31442
|
+
visibleColumn
|
|
31443
|
+
} = internalData;
|
|
31444
|
+
const {
|
|
31445
|
+
leftList,
|
|
31446
|
+
rightList
|
|
31447
|
+
} = columnStore;
|
|
31448
|
+
const rscIndex = visibleColumn.length - rightList.length;
|
|
31449
|
+
if (mergeBodyFlag && (leftList.length || rightList.length)) {
|
|
31450
|
+
const lecIndex = leftList.length;
|
|
31451
|
+
for (let i = 0; i < mergeBodyList.length; i++) {
|
|
31452
|
+
const {
|
|
31453
|
+
col,
|
|
31454
|
+
colspan
|
|
31455
|
+
} = mergeBodyList[i];
|
|
31456
|
+
if (col < lecIndex || col + colspan > rscIndex) {
|
|
31457
|
+
return true;
|
|
31458
|
+
}
|
|
31459
|
+
}
|
|
31460
|
+
}
|
|
31461
|
+
return false;
|
|
31462
|
+
},
|
|
31463
|
+
computeIsHeaderRenderOptimize() {
|
|
31464
|
+
const $xeTable = this;
|
|
31465
|
+
const props = $xeTable;
|
|
31466
|
+
const reactData = $xeTable;
|
|
31467
|
+
const {
|
|
31468
|
+
spanMethod,
|
|
31469
|
+
footerSpanMethod,
|
|
31470
|
+
showHeaderOverflow: allColumnHeaderOverflow
|
|
31471
|
+
} = props;
|
|
31472
|
+
const {
|
|
31473
|
+
isGroup,
|
|
31474
|
+
scrollXLoad
|
|
31475
|
+
} = reactData;
|
|
31476
|
+
let isOptimizeMode = false;
|
|
31477
|
+
if (isGroup) {
|
|
31478
|
+
// 分组表头
|
|
31479
|
+
} else {
|
|
31480
|
+
// 如果是使用优化模式
|
|
31481
|
+
if (scrollXLoad && allColumnHeaderOverflow) {
|
|
31482
|
+
if (spanMethod || footerSpanMethod) {
|
|
31483
|
+
// 如果不支持优化模式
|
|
31484
|
+
} else {
|
|
31485
|
+
isOptimizeMode = true;
|
|
31486
|
+
}
|
|
31487
|
+
}
|
|
31488
|
+
}
|
|
31489
|
+
return isOptimizeMode;
|
|
31490
|
+
},
|
|
31491
|
+
computeIsBodyRenderOptimize() {
|
|
31492
|
+
const $xeTable = this;
|
|
31493
|
+
const props = $xeTable;
|
|
31494
|
+
const reactData = $xeTable;
|
|
31495
|
+
const {
|
|
31496
|
+
spanMethod,
|
|
31497
|
+
footerSpanMethod
|
|
31498
|
+
} = props;
|
|
31499
|
+
const {
|
|
31500
|
+
scrollXLoad,
|
|
31501
|
+
scrollYLoad,
|
|
31502
|
+
isAllOverflow,
|
|
31503
|
+
expandColumn
|
|
31504
|
+
} = reactData;
|
|
31505
|
+
const bodyMergeCoverFixed = $xeTable.computeBodyMergeCoverFixed;
|
|
31506
|
+
const expandOpts = $xeTable.computeExpandOpts;
|
|
31507
|
+
let isOptimizeMode = false;
|
|
31508
|
+
// 如果是使用优化模式
|
|
31509
|
+
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
31510
|
+
// 如果是展开行,内联模式,不支持优化
|
|
31511
|
+
// 如果是方法合并,不支持优化
|
|
31512
|
+
// 如果固定列且配置式合并,不支持优化
|
|
31513
|
+
if (expandColumn && expandOpts.mode !== 'fixed' || bodyMergeCoverFixed || spanMethod || footerSpanMethod) {
|
|
31514
|
+
// 如果不支持优化模式
|
|
31515
|
+
} else {
|
|
31516
|
+
isOptimizeMode = true;
|
|
31517
|
+
}
|
|
31518
|
+
}
|
|
31519
|
+
return isOptimizeMode;
|
|
31520
|
+
},
|
|
31521
|
+
computeIsFooterRenderOptimize() {
|
|
31522
|
+
const $xeTable = this;
|
|
31523
|
+
const props = $xeTable;
|
|
31524
|
+
const reactData = $xeTable;
|
|
31525
|
+
const {
|
|
31526
|
+
spanMethod,
|
|
31527
|
+
footerSpanMethod,
|
|
31528
|
+
showFooterOverflow: allColumnFooterOverflow
|
|
31529
|
+
} = props;
|
|
31530
|
+
const {
|
|
31531
|
+
scrollXLoad
|
|
31532
|
+
} = reactData;
|
|
31533
|
+
let isOptimizeMode = false;
|
|
31534
|
+
// 如果是使用优化模式
|
|
31535
|
+
if (scrollXLoad && allColumnFooterOverflow) {
|
|
31536
|
+
if (spanMethod || footerSpanMethod) {
|
|
31537
|
+
// 如果不支持优化模式
|
|
31538
|
+
} else {
|
|
31539
|
+
isOptimizeMode = true;
|
|
31540
|
+
}
|
|
31541
|
+
}
|
|
31542
|
+
return isOptimizeMode;
|
|
31543
|
+
},
|
|
31464
31544
|
exportOpts() {
|
|
31465
31545
|
return this.computeExportOpts;
|
|
31466
31546
|
},
|
|
@@ -31904,12 +31984,12 @@ function renderBody(h, $xeTable) {
|
|
|
31904
31984
|
if (props.resizable) {
|
|
31905
31985
|
warnLog('vxe.error.delProp', ['resizable', 'column-config.resizable']);
|
|
31906
31986
|
}
|
|
31907
|
-
if (props.virtualXConfig && props.scrollX) {
|
|
31908
|
-
|
|
31909
|
-
}
|
|
31910
|
-
if (props.virtualYConfig && props.scrollY) {
|
|
31911
|
-
|
|
31912
|
-
}
|
|
31987
|
+
// if (props.virtualXConfig && props.scrollX) {
|
|
31988
|
+
// warnLog('vxe.error.notSupportProp', ['virtual-x-config', 'scroll-x', 'scroll-x=null'])
|
|
31989
|
+
// }
|
|
31990
|
+
// if (props.virtualYConfig && props.scrollY) {
|
|
31991
|
+
// warnLog('vxe.error.notSupportProp', ['virtual-y-config', 'scroll-y', 'scroll-y=null'])
|
|
31992
|
+
// }
|
|
31913
31993
|
if (props.aggregateConfig && props.rowGroupConfig) {
|
|
31914
31994
|
warnLog('vxe.error.notSupportProp', ['aggregate-config', 'row-group-config', 'row-group-config=null']);
|
|
31915
31995
|
}
|