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
|
@@ -16,15 +16,17 @@ function hasTreeChildren($xeTable, row) {
|
|
|
16
16
|
}
|
|
17
17
|
function getSeq($xeTable, cellValue, row, $rowIndex, column, $columnIndex) {
|
|
18
18
|
const seqOpts = $xeTable.computeSeqOpts;
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
21
|
-
return
|
|
19
|
+
const seqMd = seqOpts.seqMethod || column.seqMethod;
|
|
20
|
+
if (seqMd) {
|
|
21
|
+
return seqMd({
|
|
22
22
|
$table: $xeTable,
|
|
23
23
|
row,
|
|
24
24
|
rowIndex: $xeTable.getRowIndex(row),
|
|
25
|
+
_rowIndex: $xeTable.getVTRowIndex(row),
|
|
25
26
|
$rowIndex,
|
|
26
27
|
column,
|
|
27
28
|
columnIndex: $xeTable.getColumnIndex(column),
|
|
29
|
+
_columnIndex: $xeTable.getVTColumnIndex(column),
|
|
28
30
|
$columnIndex
|
|
29
31
|
});
|
|
30
32
|
}
|
package/es/table/src/body.js
CHANGED
|
@@ -702,24 +702,15 @@ export default {
|
|
|
702
702
|
const slots = $xeTable.$scopedSlots;
|
|
703
703
|
const { xID } = $xeTable;
|
|
704
704
|
const { fixedColumn, fixedType, tableColumn } = props;
|
|
705
|
-
const {
|
|
706
|
-
const { isGroup, tableData, isColLoading, overflowX, scrollXLoad, scrollYLoad,
|
|
705
|
+
const { mouseConfig } = tableProps;
|
|
706
|
+
const { isGroup, tableData, isColLoading, overflowX, scrollXLoad, scrollYLoad, dragRow, dragCol } = tableReactData;
|
|
707
707
|
const { visibleColumn, fullAllDataRowIdData, fullColumnIdData } = tableInternalData;
|
|
708
708
|
const emptyOpts = $xeTable.computeEmptyOpts;
|
|
709
709
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
710
|
-
const
|
|
710
|
+
const isBodyRenderOptimize = $xeTable.computeIsBodyRenderOptimize;
|
|
711
711
|
let renderDataList = tableData;
|
|
712
712
|
let renderColumnList = tableColumn;
|
|
713
|
-
|
|
714
|
-
// 如果是使用优化模式
|
|
715
|
-
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
716
|
-
if ((expandColumn && expandOpts.mode !== 'fixed') || spanMethod || footerSpanMethod) {
|
|
717
|
-
// 如果不支持优化模式
|
|
718
|
-
}
|
|
719
|
-
else {
|
|
720
|
-
isOptimizeMode = true;
|
|
721
|
-
}
|
|
722
|
-
}
|
|
713
|
+
const isOptimizeMode = isBodyRenderOptimize;
|
|
723
714
|
if (!isColLoading && (fixedType || !overflowX)) {
|
|
724
715
|
renderColumnList = visibleColumn;
|
|
725
716
|
}
|
|
@@ -792,11 +783,6 @@ export default {
|
|
|
792
783
|
emptyContent = tableProps.emptyText || getI18n('vxe.table.emptyText');
|
|
793
784
|
}
|
|
794
785
|
}
|
|
795
|
-
const ons = {
|
|
796
|
-
scroll(evnt) {
|
|
797
|
-
$xeTable.triggerBodyScrollEvent(evnt, fixedType);
|
|
798
|
-
}
|
|
799
|
-
};
|
|
800
786
|
return h('div', {
|
|
801
787
|
ref: 'refElem',
|
|
802
788
|
class: ['vxe-table--body-wrapper', fixedType ? `fixed-${fixedType}--wrapper` : 'body--wrapper'],
|
|
@@ -807,7 +793,11 @@ export default {
|
|
|
807
793
|
h('div', {
|
|
808
794
|
ref: 'refBodyScroll',
|
|
809
795
|
class: 'vxe-table--body-inner-wrapper',
|
|
810
|
-
on:
|
|
796
|
+
on: {
|
|
797
|
+
scroll(evnt) {
|
|
798
|
+
$xeTable.triggerBodyScrollEvent(evnt, fixedType);
|
|
799
|
+
}
|
|
800
|
+
}
|
|
811
801
|
}, [
|
|
812
802
|
fixedType
|
|
813
803
|
? renderEmptyElement($xeTable)
|
package/es/table/src/cell.js
CHANGED
|
@@ -170,7 +170,8 @@ function renderTitleContent(h, params, content) {
|
|
|
170
170
|
const tableReactData = $table;
|
|
171
171
|
const { showHeaderOverflow: allColumnHeaderOverflow } = tableProps;
|
|
172
172
|
const { isRowGroupStatus } = tableReactData;
|
|
173
|
-
const { showHeaderOverflow } = column;
|
|
173
|
+
const { showHeaderOverflow, slots } = column;
|
|
174
|
+
const titleSlot = slots ? slots.title : null;
|
|
174
175
|
const headerTooltipOpts = $table.computeHeaderTooltipOpts;
|
|
175
176
|
const showAllTip = headerTooltipOpts.showAll;
|
|
176
177
|
const headOverflow = XEUtils.eqNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
@@ -207,9 +208,11 @@ function renderTitleContent(h, params, content) {
|
|
|
207
208
|
on: ons
|
|
208
209
|
}, isRowGroupStatus && column.aggFunc && $table.getPivotTableAggregateRenderColTitles
|
|
209
210
|
? $table.getPivotTableAggregateRenderColTitles(h, column, titleVN)
|
|
210
|
-
:
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
: titleSlot
|
|
212
|
+
? $table.callSlot(titleSlot, params, h)
|
|
213
|
+
: [
|
|
214
|
+
titleVN
|
|
215
|
+
])
|
|
213
216
|
];
|
|
214
217
|
}
|
|
215
218
|
function getFooterContent(h, params) {
|
|
@@ -613,9 +616,9 @@ export const Cell = {
|
|
|
613
616
|
return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h));
|
|
614
617
|
}
|
|
615
618
|
const { seq } = params;
|
|
616
|
-
const
|
|
619
|
+
const seqMd = seqOpts.seqMethod;
|
|
617
620
|
return renderCellBaseVNs(h, params, [
|
|
618
|
-
h('span', `${formatText(
|
|
621
|
+
h('span', `${formatText(seqMd ? seqMd(params) : treeConfig ? seq : (seqOpts.startIndex || 0) + seq, 1)}`)
|
|
619
622
|
]);
|
|
620
623
|
},
|
|
621
624
|
renderDeepIndexCell(h, params) {
|
|
@@ -1001,45 +1004,49 @@ export const Cell = {
|
|
|
1001
1004
|
const { $table, column } = params;
|
|
1002
1005
|
const sortOpts = $table.computeSortOpts;
|
|
1003
1006
|
const { showIcon, allowBtn, ascTitle, descTitle, iconLayout, iconAsc, iconDesc, iconVisibleMethod } = sortOpts;
|
|
1007
|
+
const { order, slots } = column;
|
|
1004
1008
|
if (showIcon && (!iconVisibleMethod || iconVisibleMethod(params))) {
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
h('
|
|
1010
|
-
class: ['vxe-sort
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1009
|
+
const sortSlot = slots ? slots.sort : null;
|
|
1010
|
+
return sortSlot
|
|
1011
|
+
? getSlotVNs($table.callSlot(sortSlot, params, h))
|
|
1012
|
+
: [
|
|
1013
|
+
h('span', {
|
|
1014
|
+
class: ['vxe-cell--sort', `vxe-cell--sort-${iconLayout}-layout`]
|
|
1015
|
+
}, [
|
|
1016
|
+
h('i', {
|
|
1017
|
+
class: ['vxe-sort--asc-btn', iconAsc || getIcon().TABLE_SORT_ASC, {
|
|
1018
|
+
'sort--active': order === 'asc'
|
|
1019
|
+
}],
|
|
1020
|
+
attrs: {
|
|
1021
|
+
title: XEUtils.eqNull(ascTitle) ? getI18n('vxe.table.sortAsc') : `${ascTitle || ''}`
|
|
1022
|
+
},
|
|
1023
|
+
on: allowBtn
|
|
1024
|
+
? {
|
|
1025
|
+
click(evnt) {
|
|
1026
|
+
evnt.stopPropagation();
|
|
1027
|
+
$table.triggerSortEvent(evnt, column, 'asc');
|
|
1028
|
+
}
|
|
1021
1029
|
}
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1030
|
+
: undefined
|
|
1031
|
+
}),
|
|
1032
|
+
h('i', {
|
|
1033
|
+
class: ['vxe-sort--desc-btn', iconDesc || getIcon().TABLE_SORT_DESC, {
|
|
1034
|
+
'sort--active': order === 'desc'
|
|
1035
|
+
}],
|
|
1036
|
+
attrs: {
|
|
1037
|
+
title: XEUtils.eqNull(descTitle) ? getI18n('vxe.table.sortDesc') : `${descTitle || ''}`
|
|
1038
|
+
},
|
|
1039
|
+
on: allowBtn
|
|
1040
|
+
? {
|
|
1041
|
+
click(evnt) {
|
|
1042
|
+
evnt.stopPropagation();
|
|
1043
|
+
$table.triggerSortEvent(evnt, column, 'desc');
|
|
1044
|
+
}
|
|
1037
1045
|
}
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
]
|
|
1042
|
-
];
|
|
1046
|
+
: undefined
|
|
1047
|
+
})
|
|
1048
|
+
])
|
|
1049
|
+
];
|
|
1043
1050
|
}
|
|
1044
1051
|
return [];
|
|
1045
1052
|
},
|
package/es/table/src/footer.js
CHANGED
|
@@ -260,25 +260,15 @@ export default {
|
|
|
260
260
|
const _vm = this;
|
|
261
261
|
const props = _vm;
|
|
262
262
|
const $xeTable = _vm.$parent;
|
|
263
|
-
const tableProps = $xeTable;
|
|
264
263
|
const tableReactData = $xeTable;
|
|
265
264
|
const tableInternalData = $xeTable;
|
|
266
265
|
const { xID } = $xeTable;
|
|
267
266
|
const { fixedType, fixedColumn, tableColumn } = props;
|
|
268
|
-
const { spanMethod, footerSpanMethod, showFooterOverflow: allColumnFooterOverflow } = tableProps;
|
|
269
267
|
const { visibleColumn, fullColumnIdData } = tableInternalData;
|
|
270
268
|
const { isGroup, isColLoading, overflowX, scrollXLoad, dragCol } = tableReactData;
|
|
269
|
+
const isFooterRenderOptimize = $xeTable.computeIsFooterRenderOptimize;
|
|
271
270
|
let renderColumnList = tableColumn;
|
|
272
|
-
|
|
273
|
-
// 如果是使用优化模式
|
|
274
|
-
if (scrollXLoad && allColumnFooterOverflow) {
|
|
275
|
-
if (spanMethod || footerSpanMethod) {
|
|
276
|
-
// 如果不支持优化模式
|
|
277
|
-
}
|
|
278
|
-
else {
|
|
279
|
-
isOptimizeMode = true;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
271
|
+
const isOptimizeMode = isFooterRenderOptimize;
|
|
282
272
|
if (!isOptimizeMode || (!isColLoading && (fixedType || !overflowX))) {
|
|
283
273
|
renderColumnList = visibleColumn;
|
|
284
274
|
}
|
package/es/table/src/header.js
CHANGED
|
@@ -428,26 +428,18 @@ export default {
|
|
|
428
428
|
const { xID } = $xeTable;
|
|
429
429
|
const { fixedType, fixedColumn, tableColumn } = props;
|
|
430
430
|
const { headerColumn } = _vm;
|
|
431
|
-
const { mouseConfig
|
|
431
|
+
const { mouseConfig } = tableProps;
|
|
432
432
|
const { isGroup, isColLoading, overflowX, scrollXLoad, dragCol } = tableReactData;
|
|
433
433
|
const { visibleColumn, fullColumnIdData } = tableInternalData;
|
|
434
434
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
435
|
+
const isHeaderRenderOptimize = $xeTable.computeIsHeaderRenderOptimize;
|
|
435
436
|
let renderHeaderList = headerColumn;
|
|
436
437
|
let renderColumnList = tableColumn;
|
|
437
|
-
|
|
438
|
+
const isOptimizeMode = isHeaderRenderOptimize;
|
|
438
439
|
if (isGroup) {
|
|
439
440
|
renderColumnList = visibleColumn;
|
|
440
441
|
}
|
|
441
442
|
else {
|
|
442
|
-
// 如果是使用优化模式
|
|
443
|
-
if (scrollXLoad && allColumnHeaderOverflow) {
|
|
444
|
-
if (spanMethod || footerSpanMethod) {
|
|
445
|
-
// 如果不支持优化模式
|
|
446
|
-
}
|
|
447
|
-
else {
|
|
448
|
-
isOptimizeMode = true;
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
443
|
if (!isOptimizeMode || (!isColLoading && (fixedType || !overflowX))) {
|
|
452
444
|
renderColumnList = visibleColumn;
|
|
453
445
|
}
|
package/es/table/src/methods.js
CHANGED
|
@@ -493,8 +493,7 @@ function handleVirtualTreeExpand($xeTable, rows, expanded) {
|
|
|
493
493
|
updateAfterDataIndex($xeTable);
|
|
494
494
|
return $xeTable.$nextTick();
|
|
495
495
|
}).then(() => {
|
|
496
|
-
|
|
497
|
-
return handleLazyRecalculate($xeTable, true, true, true);
|
|
496
|
+
return handleRecalculateStyle($xeTable, true, true, true);
|
|
498
497
|
}).then(() => {
|
|
499
498
|
updateTreeLineStyle($xeTable);
|
|
500
499
|
setTimeout(() => {
|
|
@@ -953,8 +952,8 @@ function updateStyle($xeTable) {
|
|
|
953
952
|
const props = $xeTable;
|
|
954
953
|
const reactData = $xeTable;
|
|
955
954
|
const internalData = $xeTable;
|
|
956
|
-
const {
|
|
957
|
-
const { isGroup, currentRow, tableColumn,
|
|
955
|
+
const { mouseConfig } = props;
|
|
956
|
+
const { isGroup, currentRow, tableColumn, overflowX, scrollbarWidth, overflowY, scrollbarHeight, scrollXWidth, columnStore, editStore, isColLoading } = reactData;
|
|
958
957
|
const { visibleColumn, tableHeight, elemStore, customHeight, customMinHeight, customMaxHeight, tHeaderHeight, tFooterHeight } = internalData;
|
|
959
958
|
const $xeGanttView = internalData.xeGanttView;
|
|
960
959
|
const el = $xeTable.$refs.refElem;
|
|
@@ -962,12 +961,15 @@ function updateStyle($xeTable) {
|
|
|
962
961
|
return;
|
|
963
962
|
}
|
|
964
963
|
const containerList = ['main', 'left', 'right'];
|
|
964
|
+
const { leftList, rightList } = columnStore;
|
|
965
965
|
let osbWidth = overflowY ? scrollbarWidth : 0;
|
|
966
966
|
let osbHeight = overflowX ? scrollbarHeight : 0;
|
|
967
967
|
const emptyPlaceholderElem = $xeTable.$refs.refEmptyPlaceholder;
|
|
968
|
+
const isHeaderRenderOptimize = $xeTable.computeIsHeaderRenderOptimize;
|
|
969
|
+
const isBodyRenderOptimize = $xeTable.computeIsBodyRenderOptimize;
|
|
970
|
+
const isFooterRenderOptimize = $xeTable.computeIsFooterRenderOptimize;
|
|
968
971
|
const scrollbarOpts = $xeTable.computeScrollbarOpts;
|
|
969
972
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
970
|
-
const expandOpts = $xeTable.computeExpandOpts;
|
|
971
973
|
const bodyWrapperElem = getRefElem(elemStore['main-body-wrapper']);
|
|
972
974
|
const bodyTableElem = getRefElem(elemStore['main-body-table']);
|
|
973
975
|
if (emptyPlaceholderElem) {
|
|
@@ -1085,7 +1087,7 @@ function updateStyle($xeTable) {
|
|
|
1085
1087
|
let fixedColumn = [];
|
|
1086
1088
|
let fixedWrapperElem;
|
|
1087
1089
|
if (fixedType) {
|
|
1088
|
-
fixedColumn = isFixedLeft ?
|
|
1090
|
+
fixedColumn = isFixedLeft ? leftList : rightList;
|
|
1089
1091
|
fixedWrapperElem = (isFixedLeft ? $xeTable.$refs.refLeftContainer : $xeTable.$refs.refRightContainer);
|
|
1090
1092
|
}
|
|
1091
1093
|
layoutList.forEach(layout => {
|
|
@@ -1096,20 +1098,11 @@ function updateStyle($xeTable) {
|
|
|
1096
1098
|
// 表头体样式处理
|
|
1097
1099
|
// 横向滚动渲染
|
|
1098
1100
|
let renderColumnList = tableColumn;
|
|
1099
|
-
|
|
1101
|
+
const isOptimizeMode = isHeaderRenderOptimize;
|
|
1100
1102
|
if (isGroup) {
|
|
1101
1103
|
renderColumnList = visibleColumn;
|
|
1102
1104
|
}
|
|
1103
1105
|
else {
|
|
1104
|
-
// 如果是使用优化模式
|
|
1105
|
-
if (scrollXLoad && allColumnHeaderOverflow) {
|
|
1106
|
-
if (spanMethod || footerSpanMethod) {
|
|
1107
|
-
// 如果不支持优化模式
|
|
1108
|
-
}
|
|
1109
|
-
else {
|
|
1110
|
-
isOptimizeMode = true;
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
1106
|
if (!isOptimizeMode || (!isColLoading && (fixedType || !overflowX))) {
|
|
1114
1107
|
renderColumnList = visibleColumn;
|
|
1115
1108
|
}
|
|
@@ -1162,16 +1155,7 @@ function updateStyle($xeTable) {
|
|
|
1162
1155
|
fixedWrapperElem.style.width = `${fixedColumn.reduce((previous, column) => previous + column.renderWidth, 0)}px`;
|
|
1163
1156
|
}
|
|
1164
1157
|
let renderColumnList = tableColumn;
|
|
1165
|
-
|
|
1166
|
-
// 如果是使用优化模式
|
|
1167
|
-
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
1168
|
-
if ((expandColumn && expandOpts.mode !== 'fixed') || spanMethod || footerSpanMethod) {
|
|
1169
|
-
// 如果不支持优化模式
|
|
1170
|
-
}
|
|
1171
|
-
else {
|
|
1172
|
-
isOptimizeMode = true;
|
|
1173
|
-
}
|
|
1174
|
-
}
|
|
1158
|
+
const isOptimizeMode = isBodyRenderOptimize;
|
|
1175
1159
|
if (fixedType) {
|
|
1176
1160
|
renderColumnList = visibleColumn;
|
|
1177
1161
|
if (isOptimizeMode) {
|
|
@@ -1203,16 +1187,7 @@ function updateStyle($xeTable) {
|
|
|
1203
1187
|
}
|
|
1204
1188
|
else if (layout === 'footer') {
|
|
1205
1189
|
let renderColumnList = tableColumn;
|
|
1206
|
-
|
|
1207
|
-
// 如果是使用优化模式
|
|
1208
|
-
if (scrollXLoad && allColumnFooterOverflow) {
|
|
1209
|
-
if (spanMethod || footerSpanMethod) {
|
|
1210
|
-
// 如果不支持优化模式
|
|
1211
|
-
}
|
|
1212
|
-
else {
|
|
1213
|
-
isOptimizeMode = true;
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1190
|
+
const isOptimizeMode = isFooterRenderOptimize;
|
|
1216
1191
|
if (!isOptimizeMode || (!isColLoading && (fixedType || !overflowX))) {
|
|
1217
1192
|
renderColumnList = visibleColumn;
|
|
1218
1193
|
}
|
|
@@ -11273,7 +11248,7 @@ const Methods = {
|
|
|
11273
11248
|
const $xeTable = this;
|
|
11274
11249
|
const reactData = $xeTable;
|
|
11275
11250
|
const internalData = $xeTable;
|
|
11276
|
-
const { isAllOverflow, scrollYLoad, expandColumn } = reactData;
|
|
11251
|
+
const { isAllOverflow, overflowY, scrollYLoad, scrollYHeight, expandColumn } = reactData;
|
|
11277
11252
|
const { scrollYStore, elemStore, isResizeCellHeight, afterFullData, fullAllDataRowIdData, rowExpandedMaps } = internalData;
|
|
11278
11253
|
const $xeGanttView = internalData.xeGanttView;
|
|
11279
11254
|
const { startIndex } = scrollYStore;
|
|
@@ -11288,13 +11263,13 @@ const Methods = {
|
|
|
11288
11263
|
const rightbodyTableElem = getRefElem(elemStore['right-body-table']);
|
|
11289
11264
|
const containerList = ['main', 'left', 'right'];
|
|
11290
11265
|
let ySpaceTop = 0;
|
|
11291
|
-
let
|
|
11266
|
+
let sYHeight = scrollYHeight;
|
|
11292
11267
|
let isScrollYBig = false;
|
|
11293
11268
|
if (scrollYLoad) {
|
|
11294
11269
|
const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height;
|
|
11295
11270
|
if (!isCustomCellHeight && !expandColumn && isAllOverflow) {
|
|
11296
|
-
|
|
11297
|
-
if (
|
|
11271
|
+
sYHeight = afterFullData.length * defaultRowHeight;
|
|
11272
|
+
if (sYHeight > maxYHeight) {
|
|
11298
11273
|
isScrollYBig = true;
|
|
11299
11274
|
}
|
|
11300
11275
|
ySpaceTop = Math.max(0, startIndex * defaultRowHeight);
|
|
@@ -11307,19 +11282,22 @@ const Methods = {
|
|
|
11307
11282
|
const lastRow = afterFullData[afterFullData.length - 1];
|
|
11308
11283
|
rowid = getRowid($xeTable, lastRow);
|
|
11309
11284
|
rowRest = fullAllDataRowIdData[rowid] || {};
|
|
11310
|
-
|
|
11311
|
-
|
|
11312
|
-
|
|
11313
|
-
|
|
11285
|
+
// 如果为空时还没计算完数据,保持原高度不变
|
|
11286
|
+
if (rowRest.oTop) {
|
|
11287
|
+
sYHeight = (rowRest.oTop || 0) + (rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight);
|
|
11288
|
+
// 是否展开行
|
|
11289
|
+
if (expandColumn && rowExpandedMaps[rowid]) {
|
|
11290
|
+
sYHeight += rowRest.expandHeight || expandOpts.height || 0;
|
|
11291
|
+
}
|
|
11314
11292
|
}
|
|
11315
|
-
if (
|
|
11293
|
+
if (sYHeight > maxYHeight) {
|
|
11316
11294
|
isScrollYBig = true;
|
|
11317
11295
|
}
|
|
11318
11296
|
}
|
|
11319
11297
|
}
|
|
11320
11298
|
else {
|
|
11321
11299
|
if (bodyTableElem) {
|
|
11322
|
-
|
|
11300
|
+
sYHeight = bodyTableElem.clientHeight;
|
|
11323
11301
|
}
|
|
11324
11302
|
}
|
|
11325
11303
|
let clientHeight = 0;
|
|
@@ -11327,7 +11305,7 @@ const Methods = {
|
|
|
11327
11305
|
clientHeight = bodyScrollElem.clientHeight;
|
|
11328
11306
|
}
|
|
11329
11307
|
// 虚拟渲染
|
|
11330
|
-
let ySpaceHeight =
|
|
11308
|
+
let ySpaceHeight = sYHeight;
|
|
11331
11309
|
let scrollYTop = ySpaceTop;
|
|
11332
11310
|
if (isScrollYBig) {
|
|
11333
11311
|
// 触底
|
|
@@ -11339,6 +11317,9 @@ const Methods = {
|
|
|
11339
11317
|
}
|
|
11340
11318
|
ySpaceHeight = maxYHeight;
|
|
11341
11319
|
}
|
|
11320
|
+
if (!(scrollYLoad && overflowY)) {
|
|
11321
|
+
scrollYTop = 0;
|
|
11322
|
+
}
|
|
11342
11323
|
if (leftBodyTableElem) {
|
|
11343
11324
|
leftBodyTableElem.style.transform = `translate(0px, ${scrollYTop}px)`;
|
|
11344
11325
|
}
|
|
@@ -11366,7 +11347,7 @@ const Methods = {
|
|
|
11366
11347
|
rowExpandYSpaceEl.style.height = ySpaceHeight ? `${ySpaceHeight}px` : '';
|
|
11367
11348
|
}
|
|
11368
11349
|
reactData.scrollYTop = scrollYTop;
|
|
11369
|
-
reactData.scrollYHeight =
|
|
11350
|
+
reactData.scrollYHeight = ySpaceHeight;
|
|
11370
11351
|
reactData.isScrollYBig = isScrollYBig;
|
|
11371
11352
|
calcScrollbar($xeTable);
|
|
11372
11353
|
if (isScrollYBig && mouseOpts.area) {
|
package/es/table/src/table.js
CHANGED
|
@@ -1197,6 +1197,89 @@ export default {
|
|
|
1197
1197
|
}
|
|
1198
1198
|
return leftWidth;
|
|
1199
1199
|
},
|
|
1200
|
+
computeBodyMergeCoverFixed() {
|
|
1201
|
+
const $xeTable = this;
|
|
1202
|
+
const reactData = $xeTable;
|
|
1203
|
+
const internalData = $xeTable;
|
|
1204
|
+
const { columnStore, mergeBodyFlag } = reactData;
|
|
1205
|
+
const { mergeBodyList, visibleColumn } = internalData;
|
|
1206
|
+
const { leftList, rightList } = columnStore;
|
|
1207
|
+
const rscIndex = visibleColumn.length - rightList.length;
|
|
1208
|
+
if (mergeBodyFlag && (leftList.length || rightList.length)) {
|
|
1209
|
+
const lecIndex = leftList.length;
|
|
1210
|
+
for (let i = 0; i < mergeBodyList.length; i++) {
|
|
1211
|
+
const { col, colspan } = mergeBodyList[i];
|
|
1212
|
+
if (col < lecIndex || (col + colspan) > rscIndex) {
|
|
1213
|
+
return true;
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
return false;
|
|
1218
|
+
},
|
|
1219
|
+
computeIsHeaderRenderOptimize() {
|
|
1220
|
+
const $xeTable = this;
|
|
1221
|
+
const props = $xeTable;
|
|
1222
|
+
const reactData = $xeTable;
|
|
1223
|
+
const { spanMethod, footerSpanMethod, showHeaderOverflow: allColumnHeaderOverflow } = props;
|
|
1224
|
+
const { isGroup, scrollXLoad } = reactData;
|
|
1225
|
+
let isOptimizeMode = false;
|
|
1226
|
+
if (isGroup) {
|
|
1227
|
+
// 分组表头
|
|
1228
|
+
}
|
|
1229
|
+
else {
|
|
1230
|
+
// 如果是使用优化模式
|
|
1231
|
+
if (scrollXLoad && allColumnHeaderOverflow) {
|
|
1232
|
+
if (spanMethod || footerSpanMethod) {
|
|
1233
|
+
// 如果不支持优化模式
|
|
1234
|
+
}
|
|
1235
|
+
else {
|
|
1236
|
+
isOptimizeMode = true;
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
return isOptimizeMode;
|
|
1241
|
+
},
|
|
1242
|
+
computeIsBodyRenderOptimize() {
|
|
1243
|
+
const $xeTable = this;
|
|
1244
|
+
const props = $xeTable;
|
|
1245
|
+
const reactData = $xeTable;
|
|
1246
|
+
const { spanMethod, footerSpanMethod } = props;
|
|
1247
|
+
const { scrollXLoad, scrollYLoad, isAllOverflow, expandColumn } = reactData;
|
|
1248
|
+
const bodyMergeCoverFixed = $xeTable.computeBodyMergeCoverFixed;
|
|
1249
|
+
const expandOpts = $xeTable.computeExpandOpts;
|
|
1250
|
+
let isOptimizeMode = false;
|
|
1251
|
+
// 如果是使用优化模式
|
|
1252
|
+
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
1253
|
+
// 如果是展开行,内联模式,不支持优化
|
|
1254
|
+
// 如果是方法合并,不支持优化
|
|
1255
|
+
// 如果固定列且配置式合并,不支持优化
|
|
1256
|
+
if ((expandColumn && expandOpts.mode !== 'fixed') || bodyMergeCoverFixed || spanMethod || footerSpanMethod) {
|
|
1257
|
+
// 如果不支持优化模式
|
|
1258
|
+
}
|
|
1259
|
+
else {
|
|
1260
|
+
isOptimizeMode = true;
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
return isOptimizeMode;
|
|
1264
|
+
},
|
|
1265
|
+
computeIsFooterRenderOptimize() {
|
|
1266
|
+
const $xeTable = this;
|
|
1267
|
+
const props = $xeTable;
|
|
1268
|
+
const reactData = $xeTable;
|
|
1269
|
+
const { spanMethod, footerSpanMethod, showFooterOverflow: allColumnFooterOverflow } = props;
|
|
1270
|
+
const { scrollXLoad } = reactData;
|
|
1271
|
+
let isOptimizeMode = false;
|
|
1272
|
+
// 如果是使用优化模式
|
|
1273
|
+
if (scrollXLoad && allColumnFooterOverflow) {
|
|
1274
|
+
if (spanMethod || footerSpanMethod) {
|
|
1275
|
+
// 如果不支持优化模式
|
|
1276
|
+
}
|
|
1277
|
+
else {
|
|
1278
|
+
isOptimizeMode = true;
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
return isOptimizeMode;
|
|
1282
|
+
},
|
|
1200
1283
|
exportOpts() {
|
|
1201
1284
|
return this.computeExportOpts;
|
|
1202
1285
|
},
|
|
@@ -1579,12 +1662,12 @@ export default {
|
|
|
1579
1662
|
if (props.resizable) {
|
|
1580
1663
|
warnLog('vxe.error.delProp', ['resizable', 'column-config.resizable']);
|
|
1581
1664
|
}
|
|
1582
|
-
if (props.virtualXConfig && props.scrollX) {
|
|
1583
|
-
|
|
1584
|
-
}
|
|
1585
|
-
if (props.virtualYConfig && props.scrollY) {
|
|
1586
|
-
|
|
1587
|
-
}
|
|
1665
|
+
// if (props.virtualXConfig && props.scrollX) {
|
|
1666
|
+
// warnLog('vxe.error.notSupportProp', ['virtual-x-config', 'scroll-x', 'scroll-x=null'])
|
|
1667
|
+
// }
|
|
1668
|
+
// if (props.virtualYConfig && props.scrollY) {
|
|
1669
|
+
// warnLog('vxe.error.notSupportProp', ['virtual-y-config', 'scroll-y', 'scroll-y=null'])
|
|
1670
|
+
// }
|
|
1588
1671
|
if (props.aggregateConfig && props.rowGroupConfig) {
|
|
1589
1672
|
warnLog('vxe.error.notSupportProp', ['aggregate-config', 'row-group-config', 'row-group-config=null']);
|
|
1590
1673
|
}
|
|
@@ -406,7 +406,7 @@ export default {
|
|
|
406
406
|
? h(VxeUIButtonComponent, {
|
|
407
407
|
key: index,
|
|
408
408
|
props: Object.assign({}, child, {
|
|
409
|
-
content: child.name,
|
|
409
|
+
content: child.content || child.name,
|
|
410
410
|
options: undefined
|
|
411
411
|
}),
|
|
412
412
|
on: {
|
|
@@ -455,7 +455,7 @@ export default {
|
|
|
455
455
|
if (VxeUIButtonComponent) {
|
|
456
456
|
btnVNs.push(h(VxeUIButtonComponent, {
|
|
457
457
|
props: Object.assign({}, item, {
|
|
458
|
-
content: item.name,
|
|
458
|
+
content: item.content || item.name,
|
|
459
459
|
options: undefined
|
|
460
460
|
}),
|
|
461
461
|
on: {
|
|
@@ -517,7 +517,7 @@ export default {
|
|
|
517
517
|
btnVNs.push(h(VxeUIButtonComponent, {
|
|
518
518
|
key: tIndex,
|
|
519
519
|
props: Object.assign({}, item, {
|
|
520
|
-
content: item.name,
|
|
520
|
+
content: item.content || item.name,
|
|
521
521
|
options: undefined
|
|
522
522
|
}),
|
|
523
523
|
on: {
|
package/es/ui/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VxeUI } from '@vxe-ui/core';
|
|
2
2
|
import { getFuncText } from './src/utils';
|
|
3
|
-
export const version = "3.19.
|
|
3
|
+
export const version = "3.19.7";
|
|
4
4
|
VxeUI.version = version;
|
|
5
5
|
VxeUI.tableVersion = version;
|
|
6
6
|
VxeUI.setConfig({
|
|
@@ -12,7 +12,7 @@ VxeUI.setConfig({
|
|
|
12
12
|
delayHover: 250,
|
|
13
13
|
autoResize: true,
|
|
14
14
|
padding: true,
|
|
15
|
-
minHeight:
|
|
15
|
+
// minHeight: null,
|
|
16
16
|
// keepSource: false,
|
|
17
17
|
// showOverflow: null,
|
|
18
18
|
// showHeaderOverflow: null,
|
package/es/ui/src/log.js
CHANGED