vxe-table 3.19.5 → 3.19.7
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/module/export/mixin.js +5 -3
- package/es/table/src/body.js +9 -19
- package/es/table/src/cell.js +49 -42
- package/es/table/src/footer.js +2 -12
- package/es/table/src/header.js +3 -11
- package/es/table/src/methods.js +29 -48
- package/es/table/src/table.js +89 -6
- package/es/toolbar/src/toolbar.js +3 -3
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +187 -121
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/export/mixin.js +5 -3
- package/lib/table/module/export/mixin.min.js +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 +14 -7
- 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 +32 -51
- 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/toolbar/src/toolbar.js +3 -3
- package/lib/toolbar/src/toolbar.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/module/export/mixin.ts +5 -3
- package/packages/table/src/body.ts +9 -19
- package/packages/table/src/cell.ts +51 -44
- package/packages/table/src/footer.ts +2 -11
- package/packages/table/src/header.ts +3 -11
- package/packages/table/src/methods.ts +29 -47
- package/packages/table/src/table.ts +89 -6
- package/packages/toolbar/src/toolbar.ts +3 -3
- package/packages/ui/index.ts +1 -1
- /package/es/{iconfont.1761784799557.ttf → iconfont.1762136064244.ttf} +0 -0
- /package/es/{iconfont.1761784799557.woff → iconfont.1762136064244.woff} +0 -0
- /package/es/{iconfont.1761784799557.woff2 → iconfont.1762136064244.woff2} +0 -0
- /package/lib/{iconfont.1761784799557.ttf → iconfont.1762136064244.ttf} +0 -0
- /package/lib/{iconfont.1761784799557.woff → iconfont.1762136064244.woff} +0 -0
- /package/lib/{iconfont.1761784799557.woff2 → iconfont.1762136064244.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.7";
|
|
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.7"}`;
|
|
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 {
|
|
@@ -4479,8 +4481,8 @@ const Cell = {
|
|
|
4479
4481
|
const {
|
|
4480
4482
|
seq
|
|
4481
4483
|
} = params;
|
|
4482
|
-
const
|
|
4483
|
-
return renderCellBaseVNs(h, params, [h('span', `${formatText(
|
|
4484
|
+
const seqMd = seqOpts.seqMethod;
|
|
4485
|
+
return renderCellBaseVNs(h, params, [h('span', `${formatText(seqMd ? seqMd(params) : treeConfig ? seq : (seqOpts.startIndex || 0) + seq, 1)}`)]);
|
|
4484
4486
|
},
|
|
4485
4487
|
renderDeepIndexCell(h, params) {
|
|
4486
4488
|
return Cell.renderDeepNodeBtn(h, params, Cell.renderSeqCell(h, params));
|
|
@@ -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
|
}
|
|
@@ -19039,7 +19019,9 @@ const Methods = {
|
|
|
19039
19019
|
const internalData = $xeTable;
|
|
19040
19020
|
const {
|
|
19041
19021
|
isAllOverflow,
|
|
19022
|
+
overflowY,
|
|
19042
19023
|
scrollYLoad,
|
|
19024
|
+
scrollYHeight,
|
|
19043
19025
|
expandColumn
|
|
19044
19026
|
} = reactData;
|
|
19045
19027
|
const {
|
|
@@ -19065,13 +19047,13 @@ const Methods = {
|
|
|
19065
19047
|
const rightbodyTableElem = getRefElem(elemStore['right-body-table']);
|
|
19066
19048
|
const containerList = ['main', 'left', 'right'];
|
|
19067
19049
|
let ySpaceTop = 0;
|
|
19068
|
-
let
|
|
19050
|
+
let sYHeight = scrollYHeight;
|
|
19069
19051
|
let isScrollYBig = false;
|
|
19070
19052
|
if (scrollYLoad) {
|
|
19071
19053
|
const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height;
|
|
19072
19054
|
if (!isCustomCellHeight && !expandColumn && isAllOverflow) {
|
|
19073
|
-
|
|
19074
|
-
if (
|
|
19055
|
+
sYHeight = afterFullData.length * defaultRowHeight;
|
|
19056
|
+
if (sYHeight > maxYHeight) {
|
|
19075
19057
|
isScrollYBig = true;
|
|
19076
19058
|
}
|
|
19077
19059
|
ySpaceTop = Math.max(0, startIndex * defaultRowHeight);
|
|
@@ -19083,18 +19065,21 @@ const Methods = {
|
|
|
19083
19065
|
const lastRow = afterFullData[afterFullData.length - 1];
|
|
19084
19066
|
rowid = getRowid($xeTable, lastRow);
|
|
19085
19067
|
rowRest = fullAllDataRowIdData[rowid] || {};
|
|
19086
|
-
|
|
19087
|
-
|
|
19088
|
-
|
|
19089
|
-
|
|
19068
|
+
// 如果为空时还没计算完数据,保持原高度不变
|
|
19069
|
+
if (rowRest.oTop) {
|
|
19070
|
+
sYHeight = (rowRest.oTop || 0) + (rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight);
|
|
19071
|
+
// 是否展开行
|
|
19072
|
+
if (expandColumn && rowExpandedMaps[rowid]) {
|
|
19073
|
+
sYHeight += rowRest.expandHeight || expandOpts.height || 0;
|
|
19074
|
+
}
|
|
19090
19075
|
}
|
|
19091
|
-
if (
|
|
19076
|
+
if (sYHeight > maxYHeight) {
|
|
19092
19077
|
isScrollYBig = true;
|
|
19093
19078
|
}
|
|
19094
19079
|
}
|
|
19095
19080
|
} else {
|
|
19096
19081
|
if (bodyTableElem) {
|
|
19097
|
-
|
|
19082
|
+
sYHeight = bodyTableElem.clientHeight;
|
|
19098
19083
|
}
|
|
19099
19084
|
}
|
|
19100
19085
|
let clientHeight = 0;
|
|
@@ -19102,7 +19087,7 @@ const Methods = {
|
|
|
19102
19087
|
clientHeight = bodyScrollElem.clientHeight;
|
|
19103
19088
|
}
|
|
19104
19089
|
// 虚拟渲染
|
|
19105
|
-
let ySpaceHeight =
|
|
19090
|
+
let ySpaceHeight = sYHeight;
|
|
19106
19091
|
let scrollYTop = ySpaceTop;
|
|
19107
19092
|
if (isScrollYBig) {
|
|
19108
19093
|
// 触底
|
|
@@ -19113,6 +19098,9 @@ const Methods = {
|
|
|
19113
19098
|
}
|
|
19114
19099
|
ySpaceHeight = maxYHeight;
|
|
19115
19100
|
}
|
|
19101
|
+
if (!(scrollYLoad && overflowY)) {
|
|
19102
|
+
scrollYTop = 0;
|
|
19103
|
+
}
|
|
19116
19104
|
if (leftBodyTableElem) {
|
|
19117
19105
|
leftBodyTableElem.style.transform = `translate(0px, ${scrollYTop}px)`;
|
|
19118
19106
|
}
|
|
@@ -19140,7 +19128,7 @@ const Methods = {
|
|
|
19140
19128
|
rowExpandYSpaceEl.style.height = ySpaceHeight ? `${ySpaceHeight}px` : '';
|
|
19141
19129
|
}
|
|
19142
19130
|
reactData.scrollYTop = scrollYTop;
|
|
19143
|
-
reactData.scrollYHeight =
|
|
19131
|
+
reactData.scrollYHeight = ySpaceHeight;
|
|
19144
19132
|
reactData.isScrollYBig = isScrollYBig;
|
|
19145
19133
|
calcScrollbar($xeTable);
|
|
19146
19134
|
if (isScrollYBig && mouseOpts.area) {
|
|
@@ -20509,8 +20497,6 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
20509
20497
|
tableColumn
|
|
20510
20498
|
} = props;
|
|
20511
20499
|
const {
|
|
20512
|
-
spanMethod,
|
|
20513
|
-
footerSpanMethod,
|
|
20514
20500
|
mouseConfig
|
|
20515
20501
|
} = tableProps;
|
|
20516
20502
|
const {
|
|
@@ -20520,8 +20506,6 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
20520
20506
|
overflowX,
|
|
20521
20507
|
scrollXLoad,
|
|
20522
20508
|
scrollYLoad,
|
|
20523
|
-
isAllOverflow,
|
|
20524
|
-
expandColumn,
|
|
20525
20509
|
dragRow,
|
|
20526
20510
|
dragCol
|
|
20527
20511
|
} = tableReactData;
|
|
@@ -20532,18 +20516,10 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
20532
20516
|
} = tableInternalData;
|
|
20533
20517
|
const emptyOpts = $xeTable.computeEmptyOpts;
|
|
20534
20518
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
20535
|
-
const
|
|
20519
|
+
const isBodyRenderOptimize = $xeTable.computeIsBodyRenderOptimize;
|
|
20536
20520
|
let renderDataList = tableData;
|
|
20537
20521
|
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
|
-
}
|
|
20522
|
+
const isOptimizeMode = isBodyRenderOptimize;
|
|
20547
20523
|
if (!isColLoading && (fixedType || !overflowX)) {
|
|
20548
20524
|
renderColumnList = visibleColumn;
|
|
20549
20525
|
}
|
|
@@ -20616,11 +20592,6 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
20616
20592
|
emptyContent = tableProps.emptyText || body_getI18n('vxe.table.emptyText');
|
|
20617
20593
|
}
|
|
20618
20594
|
}
|
|
20619
|
-
const ons = {
|
|
20620
|
-
scroll(evnt) {
|
|
20621
|
-
$xeTable.triggerBodyScrollEvent(evnt, fixedType);
|
|
20622
|
-
}
|
|
20623
|
-
};
|
|
20624
20595
|
return h('div', {
|
|
20625
20596
|
ref: 'refElem',
|
|
20626
20597
|
class: ['vxe-table--body-wrapper', fixedType ? `fixed-${fixedType}--wrapper` : 'body--wrapper'],
|
|
@@ -20630,7 +20601,11 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
20630
20601
|
}, [h('div', {
|
|
20631
20602
|
ref: 'refBodyScroll',
|
|
20632
20603
|
class: 'vxe-table--body-inner-wrapper',
|
|
20633
|
-
on:
|
|
20604
|
+
on: {
|
|
20605
|
+
scroll(evnt) {
|
|
20606
|
+
$xeTable.triggerBodyScrollEvent(evnt, fixedType);
|
|
20607
|
+
}
|
|
20608
|
+
}
|
|
20634
20609
|
}, [fixedType ? body_renderEmptyElement($xeTable) : h('div', {
|
|
20635
20610
|
ref: 'refBodyXSpace',
|
|
20636
20611
|
class: 'vxe-body--x-space'
|
|
@@ -21214,10 +21189,7 @@ function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups) {
|
|
|
21214
21189
|
headerColumn
|
|
21215
21190
|
} = _vm;
|
|
21216
21191
|
const {
|
|
21217
|
-
mouseConfig
|
|
21218
|
-
showHeaderOverflow: allColumnHeaderOverflow,
|
|
21219
|
-
spanMethod,
|
|
21220
|
-
footerSpanMethod
|
|
21192
|
+
mouseConfig
|
|
21221
21193
|
} = tableProps;
|
|
21222
21194
|
const {
|
|
21223
21195
|
isGroup,
|
|
@@ -21231,20 +21203,13 @@ function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups) {
|
|
|
21231
21203
|
fullColumnIdData
|
|
21232
21204
|
} = tableInternalData;
|
|
21233
21205
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
21206
|
+
const isHeaderRenderOptimize = $xeTable.computeIsHeaderRenderOptimize;
|
|
21234
21207
|
let renderHeaderList = headerColumn;
|
|
21235
21208
|
let renderColumnList = tableColumn;
|
|
21236
|
-
|
|
21209
|
+
const isOptimizeMode = isHeaderRenderOptimize;
|
|
21237
21210
|
if (isGroup) {
|
|
21238
21211
|
renderColumnList = visibleColumn;
|
|
21239
21212
|
} else {
|
|
21240
|
-
// 如果是使用优化模式
|
|
21241
|
-
if (scrollXLoad && allColumnHeaderOverflow) {
|
|
21242
|
-
if (spanMethod || footerSpanMethod) {
|
|
21243
|
-
// 如果不支持优化模式
|
|
21244
|
-
} else {
|
|
21245
|
-
isOptimizeMode = true;
|
|
21246
|
-
}
|
|
21247
|
-
}
|
|
21248
21213
|
if (!isOptimizeMode || !isColLoading && (fixedType || !overflowX)) {
|
|
21249
21214
|
renderColumnList = visibleColumn;
|
|
21250
21215
|
}
|
|
@@ -21704,7 +21669,6 @@ function footer_renderHeads(h, _vm, isOptimizeMode, renderColumnList) {
|
|
|
21704
21669
|
const _vm = this;
|
|
21705
21670
|
const props = _vm;
|
|
21706
21671
|
const $xeTable = _vm.$parent;
|
|
21707
|
-
const tableProps = $xeTable;
|
|
21708
21672
|
const tableReactData = $xeTable;
|
|
21709
21673
|
const tableInternalData = $xeTable;
|
|
21710
21674
|
const {
|
|
@@ -21715,11 +21679,6 @@ function footer_renderHeads(h, _vm, isOptimizeMode, renderColumnList) {
|
|
|
21715
21679
|
fixedColumn,
|
|
21716
21680
|
tableColumn
|
|
21717
21681
|
} = props;
|
|
21718
|
-
const {
|
|
21719
|
-
spanMethod,
|
|
21720
|
-
footerSpanMethod,
|
|
21721
|
-
showFooterOverflow: allColumnFooterOverflow
|
|
21722
|
-
} = tableProps;
|
|
21723
21682
|
const {
|
|
21724
21683
|
visibleColumn,
|
|
21725
21684
|
fullColumnIdData
|
|
@@ -21731,16 +21690,9 @@ function footer_renderHeads(h, _vm, isOptimizeMode, renderColumnList) {
|
|
|
21731
21690
|
scrollXLoad,
|
|
21732
21691
|
dragCol
|
|
21733
21692
|
} = tableReactData;
|
|
21693
|
+
const isFooterRenderOptimize = $xeTable.computeIsFooterRenderOptimize;
|
|
21734
21694
|
let renderColumnList = tableColumn;
|
|
21735
|
-
|
|
21736
|
-
// 如果是使用优化模式
|
|
21737
|
-
if (scrollXLoad && allColumnFooterOverflow) {
|
|
21738
|
-
if (spanMethod || footerSpanMethod) {
|
|
21739
|
-
// 如果不支持优化模式
|
|
21740
|
-
} else {
|
|
21741
|
-
isOptimizeMode = true;
|
|
21742
|
-
}
|
|
21743
|
-
}
|
|
21695
|
+
const isOptimizeMode = isFooterRenderOptimize;
|
|
21744
21696
|
if (!isOptimizeMode || !isColLoading && (fixedType || !overflowX)) {
|
|
21745
21697
|
renderColumnList = visibleColumn;
|
|
21746
21698
|
}
|
|
@@ -26676,15 +26628,17 @@ function hasTreeChildren($xeTable, row) {
|
|
|
26676
26628
|
}
|
|
26677
26629
|
function getSeq($xeTable, cellValue, row, $rowIndex, column, $columnIndex) {
|
|
26678
26630
|
const seqOpts = $xeTable.computeSeqOpts;
|
|
26679
|
-
const
|
|
26680
|
-
if (
|
|
26681
|
-
return
|
|
26631
|
+
const seqMd = seqOpts.seqMethod || column.seqMethod;
|
|
26632
|
+
if (seqMd) {
|
|
26633
|
+
return seqMd({
|
|
26682
26634
|
$table: $xeTable,
|
|
26683
26635
|
row,
|
|
26684
26636
|
rowIndex: $xeTable.getRowIndex(row),
|
|
26637
|
+
_rowIndex: $xeTable.getVTRowIndex(row),
|
|
26685
26638
|
$rowIndex,
|
|
26686
26639
|
column,
|
|
26687
26640
|
columnIndex: $xeTable.getColumnIndex(column),
|
|
26641
|
+
_columnIndex: $xeTable.getVTColumnIndex(column),
|
|
26688
26642
|
$columnIndex
|
|
26689
26643
|
});
|
|
26690
26644
|
}
|
|
@@ -31459,6 +31413,118 @@ function renderBody(h, $xeTable) {
|
|
|
31459
31413
|
}
|
|
31460
31414
|
return leftWidth;
|
|
31461
31415
|
},
|
|
31416
|
+
computeBodyMergeCoverFixed() {
|
|
31417
|
+
const $xeTable = this;
|
|
31418
|
+
const reactData = $xeTable;
|
|
31419
|
+
const internalData = $xeTable;
|
|
31420
|
+
const {
|
|
31421
|
+
columnStore,
|
|
31422
|
+
mergeBodyFlag
|
|
31423
|
+
} = reactData;
|
|
31424
|
+
const {
|
|
31425
|
+
mergeBodyList,
|
|
31426
|
+
visibleColumn
|
|
31427
|
+
} = internalData;
|
|
31428
|
+
const {
|
|
31429
|
+
leftList,
|
|
31430
|
+
rightList
|
|
31431
|
+
} = columnStore;
|
|
31432
|
+
const rscIndex = visibleColumn.length - rightList.length;
|
|
31433
|
+
if (mergeBodyFlag && (leftList.length || rightList.length)) {
|
|
31434
|
+
const lecIndex = leftList.length;
|
|
31435
|
+
for (let i = 0; i < mergeBodyList.length; i++) {
|
|
31436
|
+
const {
|
|
31437
|
+
col,
|
|
31438
|
+
colspan
|
|
31439
|
+
} = mergeBodyList[i];
|
|
31440
|
+
if (col < lecIndex || col + colspan > rscIndex) {
|
|
31441
|
+
return true;
|
|
31442
|
+
}
|
|
31443
|
+
}
|
|
31444
|
+
}
|
|
31445
|
+
return false;
|
|
31446
|
+
},
|
|
31447
|
+
computeIsHeaderRenderOptimize() {
|
|
31448
|
+
const $xeTable = this;
|
|
31449
|
+
const props = $xeTable;
|
|
31450
|
+
const reactData = $xeTable;
|
|
31451
|
+
const {
|
|
31452
|
+
spanMethod,
|
|
31453
|
+
footerSpanMethod,
|
|
31454
|
+
showHeaderOverflow: allColumnHeaderOverflow
|
|
31455
|
+
} = props;
|
|
31456
|
+
const {
|
|
31457
|
+
isGroup,
|
|
31458
|
+
scrollXLoad
|
|
31459
|
+
} = reactData;
|
|
31460
|
+
let isOptimizeMode = false;
|
|
31461
|
+
if (isGroup) {
|
|
31462
|
+
// 分组表头
|
|
31463
|
+
} else {
|
|
31464
|
+
// 如果是使用优化模式
|
|
31465
|
+
if (scrollXLoad && allColumnHeaderOverflow) {
|
|
31466
|
+
if (spanMethod || footerSpanMethod) {
|
|
31467
|
+
// 如果不支持优化模式
|
|
31468
|
+
} else {
|
|
31469
|
+
isOptimizeMode = true;
|
|
31470
|
+
}
|
|
31471
|
+
}
|
|
31472
|
+
}
|
|
31473
|
+
return isOptimizeMode;
|
|
31474
|
+
},
|
|
31475
|
+
computeIsBodyRenderOptimize() {
|
|
31476
|
+
const $xeTable = this;
|
|
31477
|
+
const props = $xeTable;
|
|
31478
|
+
const reactData = $xeTable;
|
|
31479
|
+
const {
|
|
31480
|
+
spanMethod,
|
|
31481
|
+
footerSpanMethod
|
|
31482
|
+
} = props;
|
|
31483
|
+
const {
|
|
31484
|
+
scrollXLoad,
|
|
31485
|
+
scrollYLoad,
|
|
31486
|
+
isAllOverflow,
|
|
31487
|
+
expandColumn
|
|
31488
|
+
} = reactData;
|
|
31489
|
+
const bodyMergeCoverFixed = $xeTable.computeBodyMergeCoverFixed;
|
|
31490
|
+
const expandOpts = $xeTable.computeExpandOpts;
|
|
31491
|
+
let isOptimizeMode = false;
|
|
31492
|
+
// 如果是使用优化模式
|
|
31493
|
+
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
31494
|
+
// 如果是展开行,内联模式,不支持优化
|
|
31495
|
+
// 如果是方法合并,不支持优化
|
|
31496
|
+
// 如果固定列且配置式合并,不支持优化
|
|
31497
|
+
if (expandColumn && expandOpts.mode !== 'fixed' || bodyMergeCoverFixed || spanMethod || footerSpanMethod) {
|
|
31498
|
+
// 如果不支持优化模式
|
|
31499
|
+
} else {
|
|
31500
|
+
isOptimizeMode = true;
|
|
31501
|
+
}
|
|
31502
|
+
}
|
|
31503
|
+
return isOptimizeMode;
|
|
31504
|
+
},
|
|
31505
|
+
computeIsFooterRenderOptimize() {
|
|
31506
|
+
const $xeTable = this;
|
|
31507
|
+
const props = $xeTable;
|
|
31508
|
+
const reactData = $xeTable;
|
|
31509
|
+
const {
|
|
31510
|
+
spanMethod,
|
|
31511
|
+
footerSpanMethod,
|
|
31512
|
+
showFooterOverflow: allColumnFooterOverflow
|
|
31513
|
+
} = props;
|
|
31514
|
+
const {
|
|
31515
|
+
scrollXLoad
|
|
31516
|
+
} = reactData;
|
|
31517
|
+
let isOptimizeMode = false;
|
|
31518
|
+
// 如果是使用优化模式
|
|
31519
|
+
if (scrollXLoad && allColumnFooterOverflow) {
|
|
31520
|
+
if (spanMethod || footerSpanMethod) {
|
|
31521
|
+
// 如果不支持优化模式
|
|
31522
|
+
} else {
|
|
31523
|
+
isOptimizeMode = true;
|
|
31524
|
+
}
|
|
31525
|
+
}
|
|
31526
|
+
return isOptimizeMode;
|
|
31527
|
+
},
|
|
31462
31528
|
exportOpts() {
|
|
31463
31529
|
return this.computeExportOpts;
|
|
31464
31530
|
},
|
|
@@ -31902,12 +31968,12 @@ function renderBody(h, $xeTable) {
|
|
|
31902
31968
|
if (props.resizable) {
|
|
31903
31969
|
warnLog('vxe.error.delProp', ['resizable', 'column-config.resizable']);
|
|
31904
31970
|
}
|
|
31905
|
-
if (props.virtualXConfig && props.scrollX) {
|
|
31906
|
-
|
|
31907
|
-
}
|
|
31908
|
-
if (props.virtualYConfig && props.scrollY) {
|
|
31909
|
-
|
|
31910
|
-
}
|
|
31971
|
+
// if (props.virtualXConfig && props.scrollX) {
|
|
31972
|
+
// warnLog('vxe.error.notSupportProp', ['virtual-x-config', 'scroll-x', 'scroll-x=null'])
|
|
31973
|
+
// }
|
|
31974
|
+
// if (props.virtualYConfig && props.scrollY) {
|
|
31975
|
+
// warnLog('vxe.error.notSupportProp', ['virtual-y-config', 'scroll-y', 'scroll-y=null'])
|
|
31976
|
+
// }
|
|
31911
31977
|
if (props.aggregateConfig && props.rowGroupConfig) {
|
|
31912
31978
|
warnLog('vxe.error.notSupportProp', ['aggregate-config', 'row-group-config', 'row-group-config=null']);
|
|
31913
31979
|
}
|
|
@@ -33117,7 +33183,7 @@ function toolbar_createInternalData() {
|
|
|
33117
33183
|
return VxeUIButtonComponent ? h(VxeUIButtonComponent, {
|
|
33118
33184
|
key: index,
|
|
33119
33185
|
props: Object.assign({}, child, {
|
|
33120
|
-
content: child.name,
|
|
33186
|
+
content: child.content || child.name,
|
|
33121
33187
|
options: undefined
|
|
33122
33188
|
}),
|
|
33123
33189
|
on: {
|
|
@@ -33181,7 +33247,7 @@ function toolbar_createInternalData() {
|
|
|
33181
33247
|
if (VxeUIButtonComponent) {
|
|
33182
33248
|
btnVNs.push(h(VxeUIButtonComponent, {
|
|
33183
33249
|
props: Object.assign({}, item, {
|
|
33184
|
-
content: item.name,
|
|
33250
|
+
content: item.content || item.name,
|
|
33185
33251
|
options: undefined
|
|
33186
33252
|
}),
|
|
33187
33253
|
on: {
|
|
@@ -33262,7 +33328,7 @@ function toolbar_createInternalData() {
|
|
|
33262
33328
|
btnVNs.push(h(VxeUIButtonComponent, {
|
|
33263
33329
|
key: tIndex,
|
|
33264
33330
|
props: Object.assign({}, item, {
|
|
33265
|
-
content: item.name,
|
|
33331
|
+
content: item.content || item.name,
|
|
33266
33332
|
options: undefined
|
|
33267
33333
|
}),
|
|
33268
33334
|
on: {
|