vxe-table 4.13.8 → 4.13.10
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/footer.js +13 -16
- package/es/table/src/header.js +22 -12
- package/es/table/src/table.js +12 -8
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +28 -36
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/footer.js +12 -16
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +7 -11
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +7 -7
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/table/src/footer.ts +13 -16
- package/packages/table/src/header.ts +23 -12
- package/packages/table/src/table.ts +14 -8
- /package/es/{iconfont.1745374145326.ttf → iconfont.1745546371612.ttf} +0 -0
- /package/es/{iconfont.1745374145326.woff → iconfont.1745546371612.woff} +0 -0
- /package/es/{iconfont.1745374145326.woff2 → iconfont.1745546371612.woff2} +0 -0
- /package/lib/{iconfont.1745374145326.ttf → iconfont.1745546371612.ttf} +0 -0
- /package/lib/{iconfont.1745374145326.woff → iconfont.1745546371612.woff} +0 -0
- /package/lib/{iconfont.1745374145326.woff2 → iconfont.1745546371612.woff2} +0 -0
package/es/table/src/footer.js
CHANGED
|
@@ -35,7 +35,7 @@ export default defineComponent({
|
|
|
35
35
|
const refFooterColgroup = ref();
|
|
36
36
|
const refFooterTFoot = ref();
|
|
37
37
|
const refFooterXSpace = ref();
|
|
38
|
-
const renderRows = (tableColumn, footerTableData, row, $rowIndex, _rowIndex) => {
|
|
38
|
+
const renderRows = (isOptimizeMode, tableColumn, footerTableData, row, $rowIndex, _rowIndex) => {
|
|
39
39
|
const $xeGrid = $xeTable.xeGrid;
|
|
40
40
|
const { fixedType } = props;
|
|
41
41
|
const { resizable: allResizable, border, footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, footerSpanMethod, align: allAlign, columnKey, showFooterOverflow: allColumnFooterOverflow } = tableProps;
|
|
@@ -62,10 +62,10 @@ export default defineComponent({
|
|
|
62
62
|
const isPadding = XEUtils.isBoolean(footerCellOpts.padding) ? footerCellOpts.padding : cellOpts.padding;
|
|
63
63
|
const footOverflow = XEUtils.eqNull(showFooterOverflow) ? allColumnFooterOverflow : showFooterOverflow;
|
|
64
64
|
const footAlign = footerAlign || (compConf ? compConf.tableFooterCellAlign : '') || allFooterAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
65
|
-
|
|
65
|
+
const showEllipsis = footOverflow === 'ellipsis';
|
|
66
66
|
const showTitle = footOverflow === 'title';
|
|
67
67
|
const showTooltip = footOverflow === true || footOverflow === 'tooltip';
|
|
68
|
-
|
|
68
|
+
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
69
69
|
const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable));
|
|
70
70
|
const attrs = { colid };
|
|
71
71
|
const tfOns = {};
|
|
@@ -89,10 +89,6 @@ export default defineComponent({
|
|
|
89
89
|
type: renderType,
|
|
90
90
|
data: footerTableData
|
|
91
91
|
};
|
|
92
|
-
// 纵向虚拟滚动不支持动态行高
|
|
93
|
-
if (scrollXLoad && !hasEllipsis) {
|
|
94
|
-
showEllipsis = hasEllipsis = true;
|
|
95
|
-
}
|
|
96
92
|
if (showTitle || showTooltip || showAllTip) {
|
|
97
93
|
tfOns.onMouseenter = (evnt) => {
|
|
98
94
|
if (showTitle) {
|
|
@@ -151,7 +147,7 @@ export default defineComponent({
|
|
|
151
147
|
const isLastColumn = $columnIndex === tableColumn.length - 1;
|
|
152
148
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
153
149
|
let isVNPreEmptyStatus = false;
|
|
154
|
-
if (!isMergeCell) {
|
|
150
|
+
if (isOptimizeMode && !isMergeCell) {
|
|
155
151
|
if (scrollXLoad && !column.fixed && !virtualXOpts.immediate && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
156
152
|
isVNPreEmptyStatus = true;
|
|
157
153
|
}
|
|
@@ -203,7 +199,7 @@ export default defineComponent({
|
|
|
203
199
|
]);
|
|
204
200
|
});
|
|
205
201
|
};
|
|
206
|
-
const renderHeads = (renderColumnList) => {
|
|
202
|
+
const renderHeads = (isOptimizeMode, renderColumnList) => {
|
|
207
203
|
const { fixedType, footerTableData } = props;
|
|
208
204
|
const { footerRowClassName, footerRowStyle } = tableProps;
|
|
209
205
|
const { isColLoading, isDragColMove } = tableReactData;
|
|
@@ -223,7 +219,7 @@ export default defineComponent({
|
|
|
223
219
|
],
|
|
224
220
|
style: footerRowStyle ? (XEUtils.isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle) : null
|
|
225
221
|
}, {
|
|
226
|
-
default: () => renderRows(renderColumnList, footerTableData, row, $rowIndex, _rowIndex)
|
|
222
|
+
default: () => renderRows(isOptimizeMode, renderColumnList, footerTableData, row, $rowIndex, _rowIndex)
|
|
227
223
|
});
|
|
228
224
|
}
|
|
229
225
|
return h('tr', {
|
|
@@ -233,18 +229,18 @@ export default defineComponent({
|
|
|
233
229
|
footerRowClassName ? XEUtils.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''
|
|
234
230
|
],
|
|
235
231
|
style: footerRowStyle ? (XEUtils.isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle) : null
|
|
236
|
-
}, renderRows(renderColumnList, footerTableData, row, $rowIndex, _rowIndex));
|
|
232
|
+
}, renderRows(isOptimizeMode, renderColumnList, footerTableData, row, $rowIndex, _rowIndex));
|
|
237
233
|
});
|
|
238
234
|
};
|
|
239
235
|
const renderVN = () => {
|
|
240
236
|
const { fixedType, fixedColumn, tableColumn } = props;
|
|
241
237
|
const { spanMethod, footerSpanMethod, showFooterOverflow: allColumnFooterOverflow } = tableProps;
|
|
242
238
|
const { visibleColumn, fullColumnIdData } = tableInternalData;
|
|
243
|
-
const { isGroup, isColLoading, overflowX, scrollXLoad,
|
|
239
|
+
const { isGroup, isColLoading, overflowX, scrollXLoad, dragCol } = tableReactData;
|
|
244
240
|
let renderColumnList = tableColumn;
|
|
245
241
|
let isOptimizeMode = false;
|
|
246
242
|
// 如果是使用优化模式
|
|
247
|
-
if (scrollXLoad
|
|
243
|
+
if (scrollXLoad && allColumnFooterOverflow) {
|
|
248
244
|
if (spanMethod || footerSpanMethod) {
|
|
249
245
|
// 如果不支持优化模式
|
|
250
246
|
}
|
|
@@ -252,7 +248,7 @@ export default defineComponent({
|
|
|
252
248
|
isOptimizeMode = true;
|
|
253
249
|
}
|
|
254
250
|
}
|
|
255
|
-
if (!isColLoading && (fixedType || !overflowX)) {
|
|
251
|
+
if (!isOptimizeMode || (!isColLoading && (fixedType || !overflowX))) {
|
|
256
252
|
renderColumnList = visibleColumn;
|
|
257
253
|
}
|
|
258
254
|
if (fixedType) {
|
|
@@ -309,7 +305,8 @@ export default defineComponent({
|
|
|
309
305
|
xid: xID,
|
|
310
306
|
cellspacing: 0,
|
|
311
307
|
cellpadding: 0,
|
|
312
|
-
border: 0
|
|
308
|
+
border: 0,
|
|
309
|
+
xvm: isOptimizeMode ? '1' : null
|
|
313
310
|
}, [
|
|
314
311
|
/**
|
|
315
312
|
* 列宽
|
|
@@ -330,7 +327,7 @@ export default defineComponent({
|
|
|
330
327
|
*/
|
|
331
328
|
h('tfoot', {
|
|
332
329
|
ref: refFooterTFoot
|
|
333
|
-
}, renderHeads(renderColumnList))
|
|
330
|
+
}, renderHeads(isOptimizeMode, renderColumnList))
|
|
334
331
|
])
|
|
335
332
|
])
|
|
336
333
|
]);
|
package/es/table/src/header.js
CHANGED
|
@@ -57,10 +57,10 @@ export default defineComponent({
|
|
|
57
57
|
const isPadding = XEUtils.isBoolean(headerCellOpts.padding) ? headerCellOpts.padding : cellOpts.padding;
|
|
58
58
|
const headOverflow = XEUtils.eqNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
59
59
|
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
60
|
-
|
|
60
|
+
const showEllipsis = headOverflow === 'ellipsis';
|
|
61
61
|
const showTitle = headOverflow === 'title';
|
|
62
62
|
const showTooltip = headOverflow === true || headOverflow === 'tooltip';
|
|
63
|
-
|
|
63
|
+
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
64
64
|
let hasFilter = false;
|
|
65
65
|
let firstFilterOption = null;
|
|
66
66
|
if (filters) {
|
|
@@ -69,7 +69,20 @@ export default defineComponent({
|
|
|
69
69
|
}
|
|
70
70
|
const columnIndex = colRest.index;
|
|
71
71
|
const _columnIndex = colRest._index;
|
|
72
|
-
const cellParams = {
|
|
72
|
+
const cellParams = {
|
|
73
|
+
$table: $xeTable,
|
|
74
|
+
$grid: $xeGrid,
|
|
75
|
+
$rowIndex,
|
|
76
|
+
column,
|
|
77
|
+
columnIndex,
|
|
78
|
+
$columnIndex,
|
|
79
|
+
_columnIndex,
|
|
80
|
+
firstFilterOption,
|
|
81
|
+
fixed: fixedType,
|
|
82
|
+
type: renderType,
|
|
83
|
+
isHidden: fixedHiddenColumn,
|
|
84
|
+
hasFilter
|
|
85
|
+
};
|
|
73
86
|
const thAttrs = {
|
|
74
87
|
colid,
|
|
75
88
|
colspan: column.colSpan > 1 ? column.colSpan : null,
|
|
@@ -79,10 +92,6 @@ export default defineComponent({
|
|
|
79
92
|
onClick: (evnt) => $xeTable.triggerHeaderCellClickEvent(evnt, cellParams),
|
|
80
93
|
onDblclick: (evnt) => $xeTable.triggerHeaderCellDblclickEvent(evnt, cellParams)
|
|
81
94
|
};
|
|
82
|
-
// 横向虚拟滚动不支持动态行高
|
|
83
|
-
if (scrollXLoad && !hasEllipsis) {
|
|
84
|
-
showEllipsis = hasEllipsis = true;
|
|
85
|
-
}
|
|
86
95
|
const isColDragCell = columnOpts.drag && columnDragOpts.trigger === 'cell';
|
|
87
96
|
let isDisabledDrag = false;
|
|
88
97
|
if (isColDragCell) {
|
|
@@ -105,7 +114,7 @@ export default defineComponent({
|
|
|
105
114
|
const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable));
|
|
106
115
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
107
116
|
let isVNPreEmptyStatus = false;
|
|
108
|
-
if (!isGroup) {
|
|
117
|
+
if (isOptimizeMode && !isGroup) {
|
|
109
118
|
if (!dragCol || dragCol.id !== colid) {
|
|
110
119
|
if (scrollXLoad && !column.fixed && !virtualXOpts.immediate && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
111
120
|
isVNPreEmptyStatus = true;
|
|
@@ -202,7 +211,7 @@ export default defineComponent({
|
|
|
202
211
|
const renderVN = () => {
|
|
203
212
|
const { fixedType, fixedColumn, tableColumn } = props;
|
|
204
213
|
const { mouseConfig, showHeaderOverflow: allColumnHeaderOverflow, spanMethod, footerSpanMethod } = tableProps;
|
|
205
|
-
const { isGroup, isColLoading, overflowX, scrollXLoad,
|
|
214
|
+
const { isGroup, isColLoading, overflowX, scrollXLoad, dragCol } = tableReactData;
|
|
206
215
|
const { visibleColumn, fullColumnIdData } = tableInternalData;
|
|
207
216
|
const mouseOpts = computeMouseOpts.value;
|
|
208
217
|
let renderHeaderList = headerColumn.value;
|
|
@@ -213,7 +222,7 @@ export default defineComponent({
|
|
|
213
222
|
}
|
|
214
223
|
else {
|
|
215
224
|
// 如果是使用优化模式
|
|
216
|
-
if (scrollXLoad
|
|
225
|
+
if (scrollXLoad && allColumnHeaderOverflow) {
|
|
217
226
|
if (spanMethod || footerSpanMethod) {
|
|
218
227
|
// 如果不支持优化模式
|
|
219
228
|
}
|
|
@@ -221,7 +230,7 @@ export default defineComponent({
|
|
|
221
230
|
isOptimizeMode = true;
|
|
222
231
|
}
|
|
223
232
|
}
|
|
224
|
-
if (!isColLoading && (fixedType || !overflowX)) {
|
|
233
|
+
if (!isOptimizeMode || (!isColLoading && (fixedType || !overflowX))) {
|
|
225
234
|
renderColumnList = visibleColumn;
|
|
226
235
|
}
|
|
227
236
|
if (fixedType) {
|
|
@@ -283,7 +292,8 @@ export default defineComponent({
|
|
|
283
292
|
xid: xID,
|
|
284
293
|
cellspacing: 0,
|
|
285
294
|
cellpadding: 0,
|
|
286
|
-
border: 0
|
|
295
|
+
border: 0,
|
|
296
|
+
xvm: isOptimizeMode ? '1' : null
|
|
287
297
|
}, [
|
|
288
298
|
/**
|
|
289
299
|
* 列宽
|
package/es/table/src/table.js
CHANGED
|
@@ -1963,7 +1963,7 @@ export default defineComponent({
|
|
|
1963
1963
|
};
|
|
1964
1964
|
const updateStyle = () => {
|
|
1965
1965
|
const { showHeaderOverflow: allColumnHeaderOverflow, showFooterOverflow: allColumnFooterOverflow, mouseConfig, spanMethod, footerSpanMethod } = props;
|
|
1966
|
-
const { isGroup, currentRow, tableColumn, scrollXLoad, scrollYLoad, overflowX, scrollbarWidth, overflowY, scrollbarHeight, scrollXWidth, columnStore, editStore, isAllOverflow, expandColumn } = reactData;
|
|
1966
|
+
const { isGroup, currentRow, tableColumn, scrollXLoad, scrollYLoad, overflowX, scrollbarWidth, overflowY, scrollbarHeight, scrollXWidth, columnStore, editStore, isAllOverflow, expandColumn, isColLoading } = reactData;
|
|
1967
1967
|
const { visibleColumn, tableHeight, headerHeight, footerHeight, elemStore, customHeight, customMinHeight, customMaxHeight } = internalData;
|
|
1968
1968
|
const el = refElem.value;
|
|
1969
1969
|
if (!el) {
|
|
@@ -2073,7 +2073,7 @@ export default defineComponent({
|
|
|
2073
2073
|
}
|
|
2074
2074
|
else {
|
|
2075
2075
|
// 如果是使用优化模式
|
|
2076
|
-
if (scrollXLoad
|
|
2076
|
+
if (scrollXLoad && allColumnHeaderOverflow) {
|
|
2077
2077
|
if (spanMethod || footerSpanMethod) {
|
|
2078
2078
|
// 如果不支持优化模式
|
|
2079
2079
|
}
|
|
@@ -2081,8 +2081,10 @@ export default defineComponent({
|
|
|
2081
2081
|
isOptimizeMode = true;
|
|
2082
2082
|
}
|
|
2083
2083
|
}
|
|
2084
|
-
if (fixedType) {
|
|
2084
|
+
if (!isOptimizeMode || (!isColLoading && (fixedType || !overflowX))) {
|
|
2085
2085
|
renderColumnList = visibleColumn;
|
|
2086
|
+
}
|
|
2087
|
+
if (fixedType) {
|
|
2086
2088
|
// 如果是使用优化模式
|
|
2087
2089
|
if (isOptimizeMode) {
|
|
2088
2090
|
renderColumnList = fixedColumn || [];
|
|
@@ -2174,7 +2176,7 @@ export default defineComponent({
|
|
|
2174
2176
|
let renderColumnList = tableColumn;
|
|
2175
2177
|
let isOptimizeMode = false;
|
|
2176
2178
|
// 如果是使用优化模式
|
|
2177
|
-
if (scrollXLoad
|
|
2179
|
+
if (scrollXLoad && allColumnFooterOverflow) {
|
|
2178
2180
|
if (spanMethod || footerSpanMethod) {
|
|
2179
2181
|
// 如果不支持优化模式
|
|
2180
2182
|
}
|
|
@@ -2182,8 +2184,10 @@ export default defineComponent({
|
|
|
2182
2184
|
isOptimizeMode = true;
|
|
2183
2185
|
}
|
|
2184
2186
|
}
|
|
2185
|
-
if (fixedType) {
|
|
2187
|
+
if (!isOptimizeMode || (!isColLoading && (fixedType || !overflowX))) {
|
|
2186
2188
|
renderColumnList = visibleColumn;
|
|
2189
|
+
}
|
|
2190
|
+
if (fixedType) {
|
|
2187
2191
|
if (isOptimizeMode) {
|
|
2188
2192
|
renderColumnList = fixedColumn || [];
|
|
2189
2193
|
}
|
|
@@ -9868,7 +9872,7 @@ export default defineComponent({
|
|
|
9868
9872
|
updateScrollYStatus,
|
|
9869
9873
|
// 更新横向 X 可视渲染上下剩余空间大小
|
|
9870
9874
|
updateScrollXSpace() {
|
|
9871
|
-
const {
|
|
9875
|
+
const { scrollXLoad, overflowX, scrollXWidth } = reactData;
|
|
9872
9876
|
const { visibleColumn, scrollXStore, elemStore, fullColumnIdData } = internalData;
|
|
9873
9877
|
const mouseOpts = computeMouseOpts.value;
|
|
9874
9878
|
const tableBody = refTableBody.value;
|
|
@@ -9907,13 +9911,13 @@ export default defineComponent({
|
|
|
9907
9911
|
marginLeft = `${xSpaceLeft}px`;
|
|
9908
9912
|
}
|
|
9909
9913
|
if (headerTableElem) {
|
|
9910
|
-
headerTableElem.style.marginLeft =
|
|
9914
|
+
headerTableElem.style.marginLeft = headerTableElem.getAttribute('xvm') ? marginLeft : '';
|
|
9911
9915
|
}
|
|
9912
9916
|
if (bodyTableElem) {
|
|
9913
9917
|
bodyTableElem.style.marginLeft = marginLeft;
|
|
9914
9918
|
}
|
|
9915
9919
|
if (footerTableElem) {
|
|
9916
|
-
footerTableElem.style.marginLeft = marginLeft;
|
|
9920
|
+
footerTableElem.style.marginLeft = footerTableElem.getAttribute('xvm') ? marginLeft : '';
|
|
9917
9921
|
}
|
|
9918
9922
|
reactData.isScrollXBig = isScrollXBig;
|
|
9919
9923
|
const containerList = ['main'];
|
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.13.
|
|
3141
|
+
const version = "4.13.10";
|
|
3142
3142
|
core_.VxeUI.version = version;
|
|
3143
3143
|
core_.VxeUI.tableVersion = version;
|
|
3144
3144
|
core_.VxeUI.setConfig({
|
|
@@ -3599,7 +3599,7 @@ var esnext_iterator_some = __webpack_require__(7550);
|
|
|
3599
3599
|
const {
|
|
3600
3600
|
log: log_log
|
|
3601
3601
|
} = core_.VxeUI;
|
|
3602
|
-
const log_version = `table v${"4.13.
|
|
3602
|
+
const log_version = `table v${"4.13.10"}`;
|
|
3603
3603
|
const warnLog = log_log.create('warn', log_version);
|
|
3604
3604
|
const errLog = log_log.create('error', log_version);
|
|
3605
3605
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -7443,10 +7443,10 @@ const header_renderType = 'header';
|
|
|
7443
7443
|
const isPadding = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(headerCellOpts.padding) ? headerCellOpts.padding : cellOpts.padding;
|
|
7444
7444
|
const headOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
7445
7445
|
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
7446
|
-
|
|
7446
|
+
const showEllipsis = headOverflow === 'ellipsis';
|
|
7447
7447
|
const showTitle = headOverflow === 'title';
|
|
7448
7448
|
const showTooltip = headOverflow === true || headOverflow === 'tooltip';
|
|
7449
|
-
|
|
7449
|
+
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
7450
7450
|
let hasFilter = false;
|
|
7451
7451
|
let firstFilterOption = null;
|
|
7452
7452
|
if (filters) {
|
|
@@ -7478,10 +7478,6 @@ const header_renderType = 'header';
|
|
|
7478
7478
|
onClick: evnt => $xeTable.triggerHeaderCellClickEvent(evnt, cellParams),
|
|
7479
7479
|
onDblclick: evnt => $xeTable.triggerHeaderCellDblclickEvent(evnt, cellParams)
|
|
7480
7480
|
};
|
|
7481
|
-
// 横向虚拟滚动不支持动态行高
|
|
7482
|
-
if (scrollXLoad && !hasEllipsis) {
|
|
7483
|
-
showEllipsis = hasEllipsis = true;
|
|
7484
|
-
}
|
|
7485
7481
|
const isColDragCell = columnOpts.drag && columnDragOpts.trigger === 'cell';
|
|
7486
7482
|
let isDisabledDrag = false;
|
|
7487
7483
|
if (isColDragCell) {
|
|
@@ -7504,7 +7500,7 @@ const header_renderType = 'header';
|
|
|
7504
7500
|
const showResizable = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable;
|
|
7505
7501
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
7506
7502
|
let isVNPreEmptyStatus = false;
|
|
7507
|
-
if (!isGroup) {
|
|
7503
|
+
if (isOptimizeMode && !isGroup) {
|
|
7508
7504
|
if (!dragCol || dragCol.id !== colid) {
|
|
7509
7505
|
if (scrollXLoad && !column.fixed && !virtualXOpts.immediate && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
7510
7506
|
isVNPreEmptyStatus = true;
|
|
@@ -7616,7 +7612,6 @@ const header_renderType = 'header';
|
|
|
7616
7612
|
isColLoading,
|
|
7617
7613
|
overflowX,
|
|
7618
7614
|
scrollXLoad,
|
|
7619
|
-
scrollYLoad,
|
|
7620
7615
|
dragCol
|
|
7621
7616
|
} = tableReactData;
|
|
7622
7617
|
const {
|
|
@@ -7631,14 +7626,14 @@ const header_renderType = 'header';
|
|
|
7631
7626
|
renderColumnList = visibleColumn;
|
|
7632
7627
|
} else {
|
|
7633
7628
|
// 如果是使用优化模式
|
|
7634
|
-
if (scrollXLoad
|
|
7629
|
+
if (scrollXLoad && allColumnHeaderOverflow) {
|
|
7635
7630
|
if (spanMethod || footerSpanMethod) {
|
|
7636
7631
|
// 如果不支持优化模式
|
|
7637
7632
|
} else {
|
|
7638
7633
|
isOptimizeMode = true;
|
|
7639
7634
|
}
|
|
7640
7635
|
}
|
|
7641
|
-
if (!isColLoading && (fixedType || !overflowX)) {
|
|
7636
|
+
if (!isOptimizeMode || !isColLoading && (fixedType || !overflowX)) {
|
|
7642
7637
|
renderColumnList = visibleColumn;
|
|
7643
7638
|
}
|
|
7644
7639
|
if (fixedType) {
|
|
@@ -7694,7 +7689,8 @@ const header_renderType = 'header';
|
|
|
7694
7689
|
xid: xID,
|
|
7695
7690
|
cellspacing: 0,
|
|
7696
7691
|
cellpadding: 0,
|
|
7697
|
-
border: 0
|
|
7692
|
+
border: 0,
|
|
7693
|
+
xvm: isOptimizeMode ? '1' : null
|
|
7698
7694
|
}, [
|
|
7699
7695
|
/**
|
|
7700
7696
|
* 列宽
|
|
@@ -7832,7 +7828,7 @@ const footer_renderType = 'footer';
|
|
|
7832
7828
|
const refFooterColgroup = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
7833
7829
|
const refFooterTFoot = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
7834
7830
|
const refFooterXSpace = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
7835
|
-
const renderRows = (tableColumn, footerTableData, row, $rowIndex, _rowIndex) => {
|
|
7831
|
+
const renderRows = (isOptimizeMode, tableColumn, footerTableData, row, $rowIndex, _rowIndex) => {
|
|
7836
7832
|
const $xeGrid = $xeTable.xeGrid;
|
|
7837
7833
|
const {
|
|
7838
7834
|
fixedType
|
|
@@ -7891,10 +7887,10 @@ const footer_renderType = 'footer';
|
|
|
7891
7887
|
const isPadding = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(footerCellOpts.padding) ? footerCellOpts.padding : cellOpts.padding;
|
|
7892
7888
|
const footOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(showFooterOverflow) ? allColumnFooterOverflow : showFooterOverflow;
|
|
7893
7889
|
const footAlign = footerAlign || (compConf ? compConf.tableFooterCellAlign : '') || allFooterAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
7894
|
-
|
|
7890
|
+
const showEllipsis = footOverflow === 'ellipsis';
|
|
7895
7891
|
const showTitle = footOverflow === 'title';
|
|
7896
7892
|
const showTooltip = footOverflow === true || footOverflow === 'tooltip';
|
|
7897
|
-
|
|
7893
|
+
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
7898
7894
|
const showResizable = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable;
|
|
7899
7895
|
const attrs = {
|
|
7900
7896
|
colid
|
|
@@ -7920,10 +7916,6 @@ const footer_renderType = 'footer';
|
|
|
7920
7916
|
type: footer_renderType,
|
|
7921
7917
|
data: footerTableData
|
|
7922
7918
|
};
|
|
7923
|
-
// 纵向虚拟滚动不支持动态行高
|
|
7924
|
-
if (scrollXLoad && !hasEllipsis) {
|
|
7925
|
-
showEllipsis = hasEllipsis = true;
|
|
7926
|
-
}
|
|
7927
7919
|
if (showTitle || showTooltip || showAllTip) {
|
|
7928
7920
|
tfOns.onMouseenter = evnt => {
|
|
7929
7921
|
if (showTitle) {
|
|
@@ -7990,7 +7982,7 @@ const footer_renderType = 'footer';
|
|
|
7990
7982
|
const isLastColumn = $columnIndex === tableColumn.length - 1;
|
|
7991
7983
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
7992
7984
|
let isVNPreEmptyStatus = false;
|
|
7993
|
-
if (!isMergeCell) {
|
|
7985
|
+
if (isOptimizeMode && !isMergeCell) {
|
|
7994
7986
|
if (scrollXLoad && !column.fixed && !virtualXOpts.immediate && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
7995
7987
|
isVNPreEmptyStatus = true;
|
|
7996
7988
|
}
|
|
@@ -8039,7 +8031,7 @@ const footer_renderType = 'footer';
|
|
|
8039
8031
|
}) : footer_renderEmptyElement($xeTable)]);
|
|
8040
8032
|
});
|
|
8041
8033
|
};
|
|
8042
|
-
const renderHeads = renderColumnList => {
|
|
8034
|
+
const renderHeads = (isOptimizeMode, renderColumnList) => {
|
|
8043
8035
|
const {
|
|
8044
8036
|
fixedType,
|
|
8045
8037
|
footerTableData
|
|
@@ -8072,14 +8064,14 @@ const footer_renderType = 'footer';
|
|
|
8072
8064
|
class: ['vxe-footer--row', footerRowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''],
|
|
8073
8065
|
style: footerRowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle : null
|
|
8074
8066
|
}, {
|
|
8075
|
-
default: () => renderRows(renderColumnList, footerTableData, row, $rowIndex, _rowIndex)
|
|
8067
|
+
default: () => renderRows(isOptimizeMode, renderColumnList, footerTableData, row, $rowIndex, _rowIndex)
|
|
8076
8068
|
});
|
|
8077
8069
|
}
|
|
8078
8070
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tr', {
|
|
8079
8071
|
key: $rowIndex,
|
|
8080
8072
|
class: ['vxe-footer--row', footerRowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''],
|
|
8081
8073
|
style: footerRowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle : null
|
|
8082
|
-
}, renderRows(renderColumnList, footerTableData, row, $rowIndex, _rowIndex));
|
|
8074
|
+
}, renderRows(isOptimizeMode, renderColumnList, footerTableData, row, $rowIndex, _rowIndex));
|
|
8083
8075
|
});
|
|
8084
8076
|
};
|
|
8085
8077
|
const renderVN = () => {
|
|
@@ -8102,20 +8094,19 @@ const footer_renderType = 'footer';
|
|
|
8102
8094
|
isColLoading,
|
|
8103
8095
|
overflowX,
|
|
8104
8096
|
scrollXLoad,
|
|
8105
|
-
scrollYLoad,
|
|
8106
8097
|
dragCol
|
|
8107
8098
|
} = tableReactData;
|
|
8108
8099
|
let renderColumnList = tableColumn;
|
|
8109
8100
|
let isOptimizeMode = false;
|
|
8110
8101
|
// 如果是使用优化模式
|
|
8111
|
-
if (scrollXLoad
|
|
8102
|
+
if (scrollXLoad && allColumnFooterOverflow) {
|
|
8112
8103
|
if (spanMethod || footerSpanMethod) {
|
|
8113
8104
|
// 如果不支持优化模式
|
|
8114
8105
|
} else {
|
|
8115
8106
|
isOptimizeMode = true;
|
|
8116
8107
|
}
|
|
8117
8108
|
}
|
|
8118
|
-
if (!isColLoading && (fixedType || !overflowX)) {
|
|
8109
|
+
if (!isOptimizeMode || !isColLoading && (fixedType || !overflowX)) {
|
|
8119
8110
|
renderColumnList = visibleColumn;
|
|
8120
8111
|
}
|
|
8121
8112
|
if (fixedType) {
|
|
@@ -8166,7 +8157,8 @@ const footer_renderType = 'footer';
|
|
|
8166
8157
|
xid: xID,
|
|
8167
8158
|
cellspacing: 0,
|
|
8168
8159
|
cellpadding: 0,
|
|
8169
|
-
border: 0
|
|
8160
|
+
border: 0,
|
|
8161
|
+
xvm: isOptimizeMode ? '1' : null
|
|
8170
8162
|
}, [
|
|
8171
8163
|
/**
|
|
8172
8164
|
* 列宽
|
|
@@ -8187,7 +8179,7 @@ const footer_renderType = 'footer';
|
|
|
8187
8179
|
*/
|
|
8188
8180
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tfoot', {
|
|
8189
8181
|
ref: refFooterTFoot
|
|
8190
|
-
}, renderHeads(renderColumnList))])])]);
|
|
8182
|
+
}, renderHeads(isOptimizeMode, renderColumnList))])])]);
|
|
8191
8183
|
};
|
|
8192
8184
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
|
|
8193
8185
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
|
|
@@ -10747,18 +10739,18 @@ if(allSortMethod){const sortRests=allSortMethod({data:tableTree,sortList:orderCo
|
|
|
10747
10739
|
if(allSortMethod){const sortRests=allSortMethod({data:tableTree,sortList:orderColumns,$table:$xeTable});tableTree=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(sortRests)?sortRests:tableTree;}else{const treeList=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toTreeArray(tableTree,{children:mapChildrenField});tableTree=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArrayTree(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(treeList,orderColumns.map(({column,order})=>[getOrderField(column),order])),{key:rowField,parentKey:parentField,children:childrenField,mapChildren:mapChildrenField});}tableData=tableTree;}else{if(allSortMethod){const sortRests=allSortMethod({data:tableData,sortList:orderColumns,$table:$xeTable});tableData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(sortRests)?sortRests:tableData;}else{tableData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(tableData,orderColumns.map(({column,order})=>[getOrderField(column),order]));}tableTree=tableData;}}}else{if(isRowGroupStatus){// 还原行分组
|
|
10748
10740
|
// 还原虚拟树
|
|
10749
10741
|
tableTree=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(tableFullGroupData,()=>true,{original:true,isEvery:true,children:rowGroupOpts.mapChildrenField,mapChildren:rowGroupOpts.childrenField});tableData=tableTree;}else if(treeConfig&&transform){// 还原虚拟树
|
|
10750
|
-
tableTree=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(tableFullTreeData,()=>true,{original:true,isEvery,children:mapChildrenField,mapChildren:childrenField});tableData=tableTree;}else{tableData=treeConfig?tableFullTreeData.slice(0):tableFullData.slice(0);tableTree=tableData;}}internalData.afterFullData=tableData;internalData.afterTreeFullData=tableTree;internalData.afterGroupFullData=tableTree;updateAfterDataIndex();};const updateStyle=()=>{const{showHeaderOverflow:allColumnHeaderOverflow,showFooterOverflow:allColumnFooterOverflow,mouseConfig,spanMethod,footerSpanMethod}=props;const{isGroup,currentRow,tableColumn,scrollXLoad,scrollYLoad,overflowX,scrollbarWidth,overflowY,scrollbarHeight,scrollXWidth,columnStore,editStore,isAllOverflow,expandColumn}=reactData;const{visibleColumn,tableHeight,headerHeight,footerHeight,elemStore,customHeight,customMinHeight,customMaxHeight}=internalData;const el=refElem.value;if(!el){return;}const containerList=['main','left','right'];const osbWidth=overflowY?scrollbarWidth:0;const osbHeight=overflowX?scrollbarHeight:0;const emptyPlaceholderElem=refEmptyPlaceholder.value;const mouseOpts=computeMouseOpts.value;const expandOpts=computeExpandOpts.value;const bodyWrapperElem=getRefElem(elemStore['main-body-wrapper']);const bodyTableElem=getRefElem(elemStore['main-body-table']);if(emptyPlaceholderElem){emptyPlaceholderElem.style.top=`${headerHeight}px`;emptyPlaceholderElem.style.height=bodyWrapperElem?`${bodyWrapperElem.offsetHeight-osbHeight}px`:'';}let bodyHeight=0;let bodyMaxHeight=0;const bodyMinHeight=customMinHeight-headerHeight-footerHeight-osbHeight;if(customMaxHeight){bodyMaxHeight=Math.max(bodyMinHeight,customMaxHeight-headerHeight-footerHeight-osbHeight);}if(customHeight){bodyHeight=customHeight-headerHeight-footerHeight-osbHeight;}if(!bodyHeight){if(bodyTableElem){bodyHeight=bodyTableElem.clientHeight;}}if(bodyHeight){if(bodyMaxHeight){bodyHeight=Math.min(bodyMaxHeight,bodyHeight);}bodyHeight=Math.max(bodyMinHeight,bodyHeight);}const scrollbarXToTop=computeScrollbarXToTop.value;const xLeftCornerEl=refScrollXLeftCornerElem.value;const xRightCornerEl=refScrollXRightCornerElem.value;const scrollXVirtualEl=refScrollXVirtualElem.value;if(scrollXVirtualEl){scrollXVirtualEl.style.height=`${osbHeight}px`;scrollXVirtualEl.style.visibility=overflowX?'visible':'hidden';}const xWrapperEl=refScrollXWrapperElem.value;if(xWrapperEl){xWrapperEl.style.left=scrollbarXToTop?`${osbWidth}px`:'';xWrapperEl.style.width=`${el.clientWidth-osbWidth}px`;}if(xLeftCornerEl){xLeftCornerEl.style.width=scrollbarXToTop?`${osbWidth}px`:'';xLeftCornerEl.style.display=scrollbarXToTop?overflowX&&osbHeight?'block':'':'';}if(xRightCornerEl){xRightCornerEl.style.width=scrollbarXToTop?'':`${osbWidth}px`;xRightCornerEl.style.display=scrollbarXToTop?'':overflowX&&osbHeight?'block':'';}const scrollYVirtualEl=refScrollYVirtualElem.value;if(scrollYVirtualEl){scrollYVirtualEl.style.width=`${osbWidth}px`;scrollYVirtualEl.style.height=`${bodyHeight+headerHeight+footerHeight}px`;scrollYVirtualEl.style.visibility=overflowY?'visible':'hidden';}const yTopCornerEl=refScrollYTopCornerElem.value;if(yTopCornerEl){yTopCornerEl.style.height=`${headerHeight}px`;yTopCornerEl.style.display=overflowY&&headerHeight?'block':'';}const yWrapperEl=refScrollYWrapperElem.value;if(yWrapperEl){yWrapperEl.style.height=`${bodyHeight}px`;yWrapperEl.style.top=`${headerHeight}px`;}const yBottomCornerEl=refScrollYBottomCornerElem.value;if(yBottomCornerEl){yBottomCornerEl.style.height=`${footerHeight}px`;yBottomCornerEl.style.top=`${headerHeight+bodyHeight}px`;yBottomCornerEl.style.display=overflowY&&footerHeight?'block':'';}const rowExpandEl=refRowExpandElem.value;if(rowExpandEl){rowExpandEl.style.height=`${bodyHeight}px`;rowExpandEl.style.top=`${headerHeight}px`;}containerList.forEach((name,index)=>{const fixedType=index>0?name:'';const layoutList=['header','body','footer'];const isFixedLeft=fixedType==='left';let fixedColumn=[];let fixedWrapperElem;if(fixedType){fixedColumn=isFixedLeft?columnStore.leftList:columnStore.rightList;fixedWrapperElem=isFixedLeft?refLeftContainer.value:refRightContainer.value;}layoutList.forEach(layout=>{const wrapperElem=getRefElem(elemStore[`${name}-${layout}-wrapper`]);const currScrollElem=getRefElem(elemStore[`${name}-${layout}-scroll`]);const tableElem=getRefElem(elemStore[`${name}-${layout}-table`]);if(layout==='header'){// 表头体样式处理
|
|
10742
|
+
tableTree=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(tableFullTreeData,()=>true,{original:true,isEvery,children:mapChildrenField,mapChildren:childrenField});tableData=tableTree;}else{tableData=treeConfig?tableFullTreeData.slice(0):tableFullData.slice(0);tableTree=tableData;}}internalData.afterFullData=tableData;internalData.afterTreeFullData=tableTree;internalData.afterGroupFullData=tableTree;updateAfterDataIndex();};const updateStyle=()=>{const{showHeaderOverflow:allColumnHeaderOverflow,showFooterOverflow:allColumnFooterOverflow,mouseConfig,spanMethod,footerSpanMethod}=props;const{isGroup,currentRow,tableColumn,scrollXLoad,scrollYLoad,overflowX,scrollbarWidth,overflowY,scrollbarHeight,scrollXWidth,columnStore,editStore,isAllOverflow,expandColumn,isColLoading}=reactData;const{visibleColumn,tableHeight,headerHeight,footerHeight,elemStore,customHeight,customMinHeight,customMaxHeight}=internalData;const el=refElem.value;if(!el){return;}const containerList=['main','left','right'];const osbWidth=overflowY?scrollbarWidth:0;const osbHeight=overflowX?scrollbarHeight:0;const emptyPlaceholderElem=refEmptyPlaceholder.value;const mouseOpts=computeMouseOpts.value;const expandOpts=computeExpandOpts.value;const bodyWrapperElem=getRefElem(elemStore['main-body-wrapper']);const bodyTableElem=getRefElem(elemStore['main-body-table']);if(emptyPlaceholderElem){emptyPlaceholderElem.style.top=`${headerHeight}px`;emptyPlaceholderElem.style.height=bodyWrapperElem?`${bodyWrapperElem.offsetHeight-osbHeight}px`:'';}let bodyHeight=0;let bodyMaxHeight=0;const bodyMinHeight=customMinHeight-headerHeight-footerHeight-osbHeight;if(customMaxHeight){bodyMaxHeight=Math.max(bodyMinHeight,customMaxHeight-headerHeight-footerHeight-osbHeight);}if(customHeight){bodyHeight=customHeight-headerHeight-footerHeight-osbHeight;}if(!bodyHeight){if(bodyTableElem){bodyHeight=bodyTableElem.clientHeight;}}if(bodyHeight){if(bodyMaxHeight){bodyHeight=Math.min(bodyMaxHeight,bodyHeight);}bodyHeight=Math.max(bodyMinHeight,bodyHeight);}const scrollbarXToTop=computeScrollbarXToTop.value;const xLeftCornerEl=refScrollXLeftCornerElem.value;const xRightCornerEl=refScrollXRightCornerElem.value;const scrollXVirtualEl=refScrollXVirtualElem.value;if(scrollXVirtualEl){scrollXVirtualEl.style.height=`${osbHeight}px`;scrollXVirtualEl.style.visibility=overflowX?'visible':'hidden';}const xWrapperEl=refScrollXWrapperElem.value;if(xWrapperEl){xWrapperEl.style.left=scrollbarXToTop?`${osbWidth}px`:'';xWrapperEl.style.width=`${el.clientWidth-osbWidth}px`;}if(xLeftCornerEl){xLeftCornerEl.style.width=scrollbarXToTop?`${osbWidth}px`:'';xLeftCornerEl.style.display=scrollbarXToTop?overflowX&&osbHeight?'block':'':'';}if(xRightCornerEl){xRightCornerEl.style.width=scrollbarXToTop?'':`${osbWidth}px`;xRightCornerEl.style.display=scrollbarXToTop?'':overflowX&&osbHeight?'block':'';}const scrollYVirtualEl=refScrollYVirtualElem.value;if(scrollYVirtualEl){scrollYVirtualEl.style.width=`${osbWidth}px`;scrollYVirtualEl.style.height=`${bodyHeight+headerHeight+footerHeight}px`;scrollYVirtualEl.style.visibility=overflowY?'visible':'hidden';}const yTopCornerEl=refScrollYTopCornerElem.value;if(yTopCornerEl){yTopCornerEl.style.height=`${headerHeight}px`;yTopCornerEl.style.display=overflowY&&headerHeight?'block':'';}const yWrapperEl=refScrollYWrapperElem.value;if(yWrapperEl){yWrapperEl.style.height=`${bodyHeight}px`;yWrapperEl.style.top=`${headerHeight}px`;}const yBottomCornerEl=refScrollYBottomCornerElem.value;if(yBottomCornerEl){yBottomCornerEl.style.height=`${footerHeight}px`;yBottomCornerEl.style.top=`${headerHeight+bodyHeight}px`;yBottomCornerEl.style.display=overflowY&&footerHeight?'block':'';}const rowExpandEl=refRowExpandElem.value;if(rowExpandEl){rowExpandEl.style.height=`${bodyHeight}px`;rowExpandEl.style.top=`${headerHeight}px`;}containerList.forEach((name,index)=>{const fixedType=index>0?name:'';const layoutList=['header','body','footer'];const isFixedLeft=fixedType==='left';let fixedColumn=[];let fixedWrapperElem;if(fixedType){fixedColumn=isFixedLeft?columnStore.leftList:columnStore.rightList;fixedWrapperElem=isFixedLeft?refLeftContainer.value:refRightContainer.value;}layoutList.forEach(layout=>{const wrapperElem=getRefElem(elemStore[`${name}-${layout}-wrapper`]);const currScrollElem=getRefElem(elemStore[`${name}-${layout}-scroll`]);const tableElem=getRefElem(elemStore[`${name}-${layout}-table`]);if(layout==='header'){// 表头体样式处理
|
|
10751
10743
|
// 横向滚动渲染
|
|
10752
10744
|
let renderColumnList=tableColumn;let isOptimizeMode=false;if(isGroup){renderColumnList=visibleColumn;}else{// 如果是使用优化模式
|
|
10753
|
-
if(scrollXLoad
|
|
10754
|
-
}else{isOptimizeMode=true;}}if(fixedType){renderColumnList=visibleColumn
|
|
10745
|
+
if(scrollXLoad&&allColumnHeaderOverflow){if(spanMethod||footerSpanMethod){// 如果不支持优化模式
|
|
10746
|
+
}else{isOptimizeMode=true;}}if(!isOptimizeMode||!isColLoading&&(fixedType||!overflowX)){renderColumnList=visibleColumn;}if(fixedType){// 如果是使用优化模式
|
|
10755
10747
|
if(isOptimizeMode){renderColumnList=fixedColumn||[];}}}const tWidth=renderColumnList.reduce((previous,column)=>previous+column.renderWidth,0);if(fixedType){if(isGroup){if(wrapperElem){wrapperElem.style.width=scrollXWidth?`${scrollXWidth}px`:'';}}else{if(isOptimizeMode){if(wrapperElem){wrapperElem.style.width=tWidth?`${tWidth}px`:'';}}else{if(wrapperElem){wrapperElem.style.width=scrollXWidth?`${scrollXWidth}px`:'';}}}}if(currScrollElem){currScrollElem.style.height=`${headerHeight}px`;}if(tableElem){tableElem.style.width=tWidth?`${tWidth}px`:'';}}else if(layout==='body'){if(currScrollElem){currScrollElem.style.maxHeight=customMaxHeight?`${bodyMaxHeight}px`:'';currScrollElem.style.height=customHeight?`${bodyHeight}px`:'';currScrollElem.style.minHeight=`${bodyMinHeight}px`;}// 如果是固定列
|
|
10756
10748
|
if(fixedWrapperElem){if(wrapperElem){wrapperElem.style.top=`${headerHeight}px`;}fixedWrapperElem.style.height=`${customHeight>0?customHeight:tableHeight+headerHeight+footerHeight+osbHeight}px`;fixedWrapperElem.style.width=`${fixedColumn.reduce((previous,column)=>previous+column.renderWidth,0)}px`;}let renderColumnList=tableColumn;let isOptimizeMode=false;// 如果是使用优化模式
|
|
10757
10749
|
if(scrollXLoad||scrollYLoad||isAllOverflow){if(expandColumn&&expandOpts.mode!=='fixed'||spanMethod||footerSpanMethod){// 如果不支持优化模式
|
|
10758
10750
|
}else{isOptimizeMode=true;}}if(fixedType){renderColumnList=visibleColumn;if(isOptimizeMode){renderColumnList=fixedColumn||[];}}const tWidth=renderColumnList.reduce((previous,column)=>previous+column.renderWidth,0);if(fixedType){if(isOptimizeMode){if(wrapperElem){wrapperElem.style.width=tWidth?`${tWidth}px`:'';}}else{if(wrapperElem){wrapperElem.style.width=scrollXWidth?`${scrollXWidth}px`:'';}}}if(tableElem){tableElem.style.width=tWidth?`${tWidth}px`:'';// 兼容性处理
|
|
10759
10751
|
tableElem.style.paddingRight=osbWidth&&fixedType&&(browseObj['-moz']||browseObj.safari)?`${osbWidth}px`:'';}const emptyBlockElem=getRefElem(elemStore[`${name}-${layout}-emptyBlock`]);if(emptyBlockElem){emptyBlockElem.style.width=tWidth?`${tWidth}px`:'';}}else if(layout==='footer'){let renderColumnList=tableColumn;let isOptimizeMode=false;// 如果是使用优化模式
|
|
10760
|
-
if(scrollXLoad
|
|
10761
|
-
}else{isOptimizeMode=true;}}if(fixedType){renderColumnList=visibleColumn;if(isOptimizeMode){renderColumnList=fixedColumn||[];}}const tWidth=renderColumnList.reduce((previous,column)=>previous+column.renderWidth,0);if(fixedType){if(isOptimizeMode){if(wrapperElem){wrapperElem.style.width=tWidth?`${tWidth}px`:'';}}else{if(wrapperElem){wrapperElem.style.width=scrollXWidth?`${scrollXWidth}px`:'';}}}if(currScrollElem){currScrollElem.style.height=`${footerHeight}px`;// 如果是固定列
|
|
10752
|
+
if(scrollXLoad&&allColumnFooterOverflow){if(spanMethod||footerSpanMethod){// 如果不支持优化模式
|
|
10753
|
+
}else{isOptimizeMode=true;}}if(!isOptimizeMode||!isColLoading&&(fixedType||!overflowX)){renderColumnList=visibleColumn;}if(fixedType){if(isOptimizeMode){renderColumnList=fixedColumn||[];}}const tWidth=renderColumnList.reduce((previous,column)=>previous+column.renderWidth,0);if(fixedType){if(isOptimizeMode){if(wrapperElem){wrapperElem.style.width=tWidth?`${tWidth}px`:'';}}else{if(wrapperElem){wrapperElem.style.width=scrollXWidth?`${scrollXWidth}px`:'';}}}if(currScrollElem){currScrollElem.style.height=`${footerHeight}px`;// 如果是固定列
|
|
10762
10754
|
if(fixedWrapperElem){if(wrapperElem){wrapperElem.style.top=`${customHeight>0?customHeight-footerHeight-osbHeight:tableHeight+headerHeight}px`;}}}if(tableElem){tableElem.style.width=tWidth?`${tWidth}px`:'';}}});});if(currentRow){$xeTable.setCurrentRow(currentRow);}if(mouseConfig&&mouseOpts.selected&&editStore.selected.row&&editStore.selected.column){$xeTable.addCellSelectedClass();}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();};const checkValidate=type=>{if($xeTable.triggerValidate){return $xeTable.triggerValidate(type);}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();};/**
|
|
10763
10755
|
* 当单元格发生改变时
|
|
10764
10756
|
* 如果存在规则,则校验
|
|
@@ -11431,9 +11423,9 @@ if(isRollX){evnt.preventDefault();internalData.inWheelScroll=true;wheelScrollLef
|
|
|
11431
11423
|
* 对于某些特定的场景可能会用到,比如定位到某一节点
|
|
11432
11424
|
* @param {Row} row 行对象
|
|
11433
11425
|
*/scrollToTreeRow(row){const{treeConfig}=props;const{isRowGroupStatus}=reactData;const{tableFullData}=internalData;const rests=[];if(treeConfig||isRowGroupStatus){const rowGroupOpts=computeRowGroupOpts.value;const treeOpts=computeTreeOpts.value;const childrenField=treeOpts.children||treeOpts.childrenField;const matchObj=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(tableFullData,item=>$xeTable.eqRow(item,row),{children:isRowGroupStatus?rowGroupOpts.mapChildrenField:childrenField});if(matchObj){const nodes=matchObj.nodes;nodes.forEach((row,index)=>{if(index<nodes.length-1&&!$xeTable.isTreeExpandByRow(row)){rests.push($xeTable.setTreeExpand(row,true));}});}}return Promise.all(rests).then(()=>rowToVisible($xeTable,row));},updateScrollYStatus,// 更新横向 X 可视渲染上下剩余空间大小
|
|
11434
|
-
updateScrollXSpace(){const{
|
|
11426
|
+
updateScrollXSpace(){const{scrollXLoad,overflowX,scrollXWidth}=reactData;const{visibleColumn,scrollXStore,elemStore,fullColumnIdData}=internalData;const mouseOpts=computeMouseOpts.value;const tableBody=refTableBody.value;const tableBodyElem=tableBody?tableBody.$el:null;if(tableBodyElem){const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);const bodyTableElem=getRefElem(elemStore['main-body-table']);const headerTableElem=getRefElem(elemStore['main-header-table']);const footerTableElem=getRefElem(elemStore['main-footer-table']);let xSpaceLeft=0;const firstColumn=visibleColumn[scrollXStore.startIndex];if(firstColumn){const colRest=fullColumnIdData[firstColumn.id]||{};xSpaceLeft=colRest.oLeft;}let clientWidth=0;if(bodyScrollElem){clientWidth=bodyScrollElem.clientWidth;}// 虚拟渲染
|
|
11435
11427
|
let isScrollXBig=false;let ySpaceWidth=scrollXWidth;if(scrollXWidth>maxXWidth){// 触右
|
|
11436
|
-
if(bodyScrollElem&&bodyTableElem&&bodyScrollElem.scrollLeft+clientWidth>=maxXWidth){xSpaceLeft=maxXWidth-bodyTableElem.clientWidth;}else{xSpaceLeft=(maxXWidth-clientWidth)*(xSpaceLeft/(scrollXWidth-clientWidth));}ySpaceWidth=maxXWidth;isScrollXBig=true;}let marginLeft='';if(scrollXLoad&&overflowX){marginLeft=`${xSpaceLeft}px`;}if(headerTableElem){headerTableElem.style.marginLeft=
|
|
11428
|
+
if(bodyScrollElem&&bodyTableElem&&bodyScrollElem.scrollLeft+clientWidth>=maxXWidth){xSpaceLeft=maxXWidth-bodyTableElem.clientWidth;}else{xSpaceLeft=(maxXWidth-clientWidth)*(xSpaceLeft/(scrollXWidth-clientWidth));}ySpaceWidth=maxXWidth;isScrollXBig=true;}let marginLeft='';if(scrollXLoad&&overflowX){marginLeft=`${xSpaceLeft}px`;}if(headerTableElem){headerTableElem.style.marginLeft=headerTableElem.getAttribute('xvm')?marginLeft:'';}if(bodyTableElem){bodyTableElem.style.marginLeft=marginLeft;}if(footerTableElem){footerTableElem.style.marginLeft=footerTableElem.getAttribute('xvm')?marginLeft:'';}reactData.isScrollXBig=isScrollXBig;const containerList=['main'];containerList.forEach(name=>{const layoutList=['header','body','footer'];layoutList.forEach(layout=>{const xSpaceElem=getRefElem(elemStore[`${name}-${layout}-xSpace`]);if(xSpaceElem){xSpaceElem.style.width=scrollXLoad?`${ySpaceWidth}px`:'';}});});const scrollXSpaceEl=refScrollXSpaceElem.value;if(scrollXSpaceEl){scrollXSpaceEl.style.width=`${ySpaceWidth}px`;}if(isScrollXBig&&mouseOpts.area){errLog('vxe.error.notProp',['mouse-config.area']);}calcScrollbar();return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(()=>{updateStyle();});}},// 更新纵向 Y 可视渲染上下剩余空间大小
|
|
11437
11429
|
updateScrollYSpace(){const{isAllOverflow,scrollYLoad,expandColumn}=reactData;const{scrollYStore,elemStore,isResizeCellHeight,afterFullData,fullAllDataRowIdData,rowExpandedMaps}=internalData;const{startIndex}=scrollYStore;const mouseOpts=computeMouseOpts.value;const expandOpts=computeExpandOpts.value;const rowOpts=computeRowOpts.value;const cellOpts=computeCellOpts.value;const defaultRowHeight=computeDefaultRowHeight.value;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);const bodyTableElem=getRefElem(elemStore['main-body-table']);const containerList=['main','left','right'];let ySpaceTop=0;let scrollYHeight=0;let isScrollYBig=false;if(scrollYLoad){const isCustomCellHeight=isResizeCellHeight||cellOpts.height||rowOpts.height;if(!isCustomCellHeight&&!expandColumn&&isAllOverflow){scrollYHeight=afterFullData.length*defaultRowHeight;if(scrollYHeight>maxYHeight){isScrollYBig=true;}ySpaceTop=Math.max(0,startIndex*defaultRowHeight);}else{const firstRow=afterFullData[startIndex];let rowid=getRowid($xeTable,firstRow);let rowRest=fullAllDataRowIdData[rowid]||{};ySpaceTop=rowRest.oTop||0;const lastRow=afterFullData[afterFullData.length-1];rowid=getRowid($xeTable,lastRow);rowRest=fullAllDataRowIdData[rowid]||{};scrollYHeight=(rowRest.oTop||0)+(rowRest.resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight);// 是否展开行
|
|
11438
11430
|
if(expandColumn&&rowExpandedMaps[rowid]){scrollYHeight+=rowRest.expandHeight||expandOpts.height||0;}if(scrollYHeight>maxYHeight){isScrollYBig=true;}}}else{if(bodyTableElem){scrollYHeight=bodyTableElem.clientHeight;}}let clientHeight=0;if(bodyScrollElem){clientHeight=bodyScrollElem.clientHeight;}// 虚拟渲染
|
|
11439
11431
|
let ySpaceHeight=scrollYHeight;let scrollYTop=ySpaceTop;if(isScrollYBig){// 触底
|