vxe-table 4.11.0-beta.1 → 4.11.0-beta.11
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/README.md +18 -13
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/id-ID.js +695 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/edit/hook.js +1 -7
- package/es/table/module/export/export-panel.js +8 -0
- package/es/table/module/export/hook.js +30 -11
- package/es/table/render/index.js +10 -0
- package/es/table/src/body.js +4 -2
- package/es/table/src/cell.js +3 -0
- package/es/table/src/footer.js +4 -2
- package/es/table/src/header.js +6 -4
- package/es/table/src/table.js +55 -27
- package/es/table/style.css +1 -1
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +1 -1
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +134 -53
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/id-ID.js +701 -0
- package/lib/locale/lang/id-ID.min.js +1 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/edit/hook.js +1 -9
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/export-panel.js +8 -0
- package/lib/table/module/export/hook.js +33 -10
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/render/index.js +10 -0
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +4 -1
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +3 -0
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/footer.js +4 -1
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +6 -3
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +63 -27
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +1 -1
- package/lib/table/style/style.min.css +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/lib/vxe-table/style/style.css +1 -1
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/id-ID.ts +695 -0
- package/packages/table/module/edit/hook.ts +1 -7
- package/packages/table/module/export/export-panel.ts +9 -0
- package/packages/table/module/export/hook.ts +37 -20
- package/packages/table/render/index.ts +10 -0
- package/packages/table/src/body.ts +5 -2
- package/packages/table/src/cell.ts +3 -0
- package/packages/table/src/footer.ts +5 -2
- package/packages/table/src/header.ts +7 -4
- package/packages/table/src/table.ts +59 -28
- package/styles/components/table.scss +1 -1
- /package/es/{iconfont.1739435040353.ttf → iconfont.1739840929802.ttf} +0 -0
- /package/es/{iconfont.1739435040353.woff → iconfont.1739840929802.woff} +0 -0
- /package/es/{iconfont.1739435040353.woff2 → iconfont.1739840929802.woff2} +0 -0
- /package/lib/{iconfont.1739435040353.ttf → iconfont.1739840929802.ttf} +0 -0
- /package/lib/{iconfont.1739435040353.woff → iconfont.1739840929802.woff} +0 -0
- /package/lib/{iconfont.1739435040353.woff2 → iconfont.1739840929802.woff2} +0 -0
|
@@ -1078,24 +1078,28 @@ hooks.add('tableExportModule', {
|
|
|
1078
1078
|
* @param {Object} options 参数
|
|
1079
1079
|
*/
|
|
1080
1080
|
exportData(options) {
|
|
1081
|
-
const { treeConfig } = props;
|
|
1082
|
-
const { isGroup, tableGroupColumn } = reactData;
|
|
1081
|
+
const { treeConfig, showHeader, showFooter } = props;
|
|
1082
|
+
const { mergeList, mergeFooterList, isGroup, tableGroupColumn } = reactData;
|
|
1083
1083
|
const { tableFullColumn, afterFullData } = internalData;
|
|
1084
1084
|
const exportOpts = computeExportOpts.value;
|
|
1085
1085
|
const treeOpts = computeTreeOpts.value;
|
|
1086
|
+
const proxyOpts = $xeGrid ? $xeGrid.getComputeMaps().computeProxyOpts.value : {};
|
|
1087
|
+
const hasMerge = !!(mergeList.length || mergeFooterList.length);
|
|
1086
1088
|
const opts = Object.assign({
|
|
1089
|
+
message: true,
|
|
1090
|
+
isHeader: showHeader,
|
|
1091
|
+
isFooter: showFooter,
|
|
1092
|
+
isColgroup: isGroup,
|
|
1093
|
+
isMerge: hasMerge,
|
|
1094
|
+
useStyle: true,
|
|
1095
|
+
current: 'current',
|
|
1096
|
+
modes: ['current', 'selected'].concat(proxyOpts.ajax && proxyOpts.ajax.queryAll ? ['all'] : []),
|
|
1097
|
+
download: true,
|
|
1098
|
+
type: 'csv'
|
|
1087
1099
|
// filename: '',
|
|
1088
1100
|
// sheetName: '',
|
|
1089
1101
|
// original: false,
|
|
1090
|
-
// message: false,
|
|
1091
|
-
isHeader: true,
|
|
1092
|
-
isFooter: true,
|
|
1093
|
-
isColgroup: true,
|
|
1094
|
-
// isMerge: false,
|
|
1095
1102
|
// isAllExpand: false,
|
|
1096
|
-
download: true,
|
|
1097
|
-
type: 'csv',
|
|
1098
|
-
mode: 'current'
|
|
1099
1103
|
// data: null,
|
|
1100
1104
|
// remote: false,
|
|
1101
1105
|
// dataFilterMethod: null,
|
|
@@ -1107,7 +1111,22 @@ hooks.add('tableExportModule', {
|
|
|
1107
1111
|
}, exportOpts, options);
|
|
1108
1112
|
const { filename, sheetName, type, mode, columns, original, columnFilterMethod, beforeExportMethod, includeFields, excludeFields } = opts;
|
|
1109
1113
|
let groups = [];
|
|
1110
|
-
const customCols = columns && columns.length
|
|
1114
|
+
const customCols = columns && columns.length
|
|
1115
|
+
? columns
|
|
1116
|
+
: XEUtils.searchTree(tableGroupColumn, column => {
|
|
1117
|
+
const isColGroup = column.children && column.children.length;
|
|
1118
|
+
let isChecked = false;
|
|
1119
|
+
if (columns && columns.length) {
|
|
1120
|
+
isChecked = handleFilterColumns(opts, column, columns);
|
|
1121
|
+
}
|
|
1122
|
+
else if (excludeFields || includeFields) {
|
|
1123
|
+
isChecked = handleFilterFields(opts, column, includeFields, excludeFields);
|
|
1124
|
+
}
|
|
1125
|
+
else {
|
|
1126
|
+
isChecked = column.visible && (isColGroup || defaultFilterExportColumn(column));
|
|
1127
|
+
}
|
|
1128
|
+
return isChecked;
|
|
1129
|
+
}, { children: 'children', mapChildren: 'childNodes', original: true });
|
|
1111
1130
|
const handleOptions = Object.assign({}, opts, { filename: '', sheetName: '' });
|
|
1112
1131
|
// 如果设置源数据,则默认导出设置了字段的列
|
|
1113
1132
|
if (!customCols && !columnFilterMethod) {
|
package/es/table/render/index.js
CHANGED
|
@@ -700,6 +700,11 @@ renderer.mixin({
|
|
|
700
700
|
tableFilterDefaultMethod: handleFilterMethod,
|
|
701
701
|
tableExportMethod: handleExportSelectMethod
|
|
702
702
|
},
|
|
703
|
+
formatOption: {
|
|
704
|
+
renderTableDefault(renderOpts, params) {
|
|
705
|
+
return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params));
|
|
706
|
+
}
|
|
707
|
+
},
|
|
703
708
|
VxeTreeSelect: {
|
|
704
709
|
tableAutoFocus: 'input',
|
|
705
710
|
renderTableEdit: defaultTableOrTreeSelectEditRender,
|
|
@@ -708,6 +713,11 @@ renderer.mixin({
|
|
|
708
713
|
},
|
|
709
714
|
tableExportMethod: handleExportTreeSelectMethod
|
|
710
715
|
},
|
|
716
|
+
formatTree: {
|
|
717
|
+
renderTableDefault(renderOpts, params) {
|
|
718
|
+
return getCellLabelVNs(renderOpts, params, getTreeSelectCellValue(renderOpts, params));
|
|
719
|
+
}
|
|
720
|
+
},
|
|
711
721
|
VxeTableSelect: {
|
|
712
722
|
tableAutoFocus: 'input',
|
|
713
723
|
renderTableEdit: defaultTableOrTreeSelectEditRender,
|
package/es/table/src/body.js
CHANGED
|
@@ -563,7 +563,7 @@ export default defineComponent({
|
|
|
563
563
|
const { slots } = tableContext;
|
|
564
564
|
const { fixedColumn, fixedType, tableColumn } = props;
|
|
565
565
|
const { spanMethod, footerSpanMethod, mouseConfig } = tableProps;
|
|
566
|
-
const { isGroup, tableData, isRowLoading, isColLoading, scrollXLoad, scrollYLoad, isAllOverflow, isDragRowMove, expandColumn, dragRow, dragCol } = tableReactData;
|
|
566
|
+
const { isGroup, tableData, isRowLoading, isColLoading, overflowX, scrollXLoad, scrollYLoad, isAllOverflow, isDragRowMove, expandColumn, dragRow, dragCol } = tableReactData;
|
|
567
567
|
const { visibleColumn, fullAllDataRowIdData, fullColumnIdData } = tableInternalData;
|
|
568
568
|
const rowOpts = computeRowOpts.value;
|
|
569
569
|
const emptyOpts = computeEmptyOpts.value;
|
|
@@ -582,8 +582,10 @@ export default defineComponent({
|
|
|
582
582
|
isOptimizeMode = true;
|
|
583
583
|
}
|
|
584
584
|
}
|
|
585
|
-
if (fixedType) {
|
|
585
|
+
if (fixedType || !overflowX) {
|
|
586
586
|
renderColumnList = visibleColumn;
|
|
587
|
+
}
|
|
588
|
+
if (fixedType) {
|
|
587
589
|
if (isOptimizeMode) {
|
|
588
590
|
renderColumnList = fixedColumn || [];
|
|
589
591
|
}
|
package/es/table/src/cell.js
CHANGED
package/es/table/src/footer.js
CHANGED
|
@@ -245,7 +245,7 @@ export default defineComponent({
|
|
|
245
245
|
const { fixedType, fixedColumn, tableColumn } = props;
|
|
246
246
|
const { spanMethod, footerSpanMethod, showFooterOverflow: allColumnFooterOverflow } = tableProps;
|
|
247
247
|
const { visibleColumn, fullColumnIdData } = tableInternalData;
|
|
248
|
-
const { isGroup, scrollXLoad, scrollYLoad, dragCol } = tableReactData;
|
|
248
|
+
const { isGroup, overflowX, scrollXLoad, scrollYLoad, dragCol } = tableReactData;
|
|
249
249
|
let renderColumnList = tableColumn;
|
|
250
250
|
let isOptimizeMode = false;
|
|
251
251
|
// 如果是使用优化模式
|
|
@@ -257,8 +257,10 @@ export default defineComponent({
|
|
|
257
257
|
isOptimizeMode = true;
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
if (fixedType) {
|
|
260
|
+
if (fixedType || !overflowX) {
|
|
261
261
|
renderColumnList = visibleColumn;
|
|
262
|
+
}
|
|
263
|
+
if (fixedType) {
|
|
262
264
|
if (isOptimizeMode) {
|
|
263
265
|
renderColumnList = fixedColumn || [];
|
|
264
266
|
}
|
package/es/table/src/header.js
CHANGED
|
@@ -127,8 +127,8 @@ export default defineComponent({
|
|
|
127
127
|
'is--sortable': column.sortable,
|
|
128
128
|
'col--filter': !!filters,
|
|
129
129
|
'is--filter-active': hasFilter,
|
|
130
|
-
'is--drag-active': !column.fixed && !isDisabledDrag && (isCrossDrag || isPeerDrag || !column.parentId),
|
|
131
|
-
'is--drag-disabled': isDisabledDrag,
|
|
130
|
+
'is--drag-active': columnOpts.drag && !column.fixed && !isDisabledDrag && (isCrossDrag || isPeerDrag || !column.parentId),
|
|
131
|
+
'is--drag-disabled': columnOpts.drag && isDisabledDrag,
|
|
132
132
|
'col--current': currentColumn === column
|
|
133
133
|
},
|
|
134
134
|
headerClassName ? (XEUtils.isFunction(headerClassName) ? headerClassName(cellParams) : headerClassName) : '',
|
|
@@ -199,7 +199,7 @@ export default defineComponent({
|
|
|
199
199
|
const renderVN = () => {
|
|
200
200
|
const { fixedType, fixedColumn, tableColumn } = props;
|
|
201
201
|
const { mouseConfig, showHeaderOverflow: allColumnHeaderOverflow, spanMethod, footerSpanMethod } = tableProps;
|
|
202
|
-
const { isGroup, scrollXLoad, scrollYLoad, dragCol } = tableReactData;
|
|
202
|
+
const { isGroup, overflowX, scrollXLoad, scrollYLoad, dragCol } = tableReactData;
|
|
203
203
|
const { visibleColumn, fullColumnIdData } = tableInternalData;
|
|
204
204
|
const mouseOpts = computeMouseOpts.value;
|
|
205
205
|
let renderHeaderList = headerColumn.value;
|
|
@@ -218,8 +218,10 @@ export default defineComponent({
|
|
|
218
218
|
isOptimizeMode = true;
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
-
if (fixedType) {
|
|
221
|
+
if (fixedType || !overflowX) {
|
|
222
222
|
renderColumnList = visibleColumn;
|
|
223
|
+
}
|
|
224
|
+
if (fixedType) {
|
|
223
225
|
// 如果是使用优化模式
|
|
224
226
|
if (isOptimizeMode) {
|
|
225
227
|
renderColumnList = fixedColumn || [];
|
package/es/table/src/table.js
CHANGED
|
@@ -1142,6 +1142,7 @@ export default defineComponent({
|
|
|
1142
1142
|
const fullColumnIdData = internalData.fullColumnIdData = {};
|
|
1143
1143
|
const fullColumnFieldData = internalData.fullColumnFieldData = {};
|
|
1144
1144
|
const mouseOpts = computeMouseOpts.value;
|
|
1145
|
+
const expandOpts = computeExpandOpts.value;
|
|
1145
1146
|
const columnOpts = computeColumnOpts.value;
|
|
1146
1147
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
1147
1148
|
const { isCrossDrag, isSelfToChildDrag } = columnDragOpts;
|
|
@@ -1231,10 +1232,8 @@ export default defineComponent({
|
|
|
1231
1232
|
else {
|
|
1232
1233
|
tableFullColumn.forEach(handleFunc);
|
|
1233
1234
|
}
|
|
1234
|
-
if (
|
|
1235
|
-
|
|
1236
|
-
errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand']);
|
|
1237
|
-
}
|
|
1235
|
+
if ((expandColumn && expandOpts.mode !== 'fixed') && mouseOpts.area) {
|
|
1236
|
+
errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand']);
|
|
1238
1237
|
}
|
|
1239
1238
|
if (process.env.NODE_ENV === 'development') {
|
|
1240
1239
|
if (htmlColumn) {
|
|
@@ -1475,6 +1474,7 @@ export default defineComponent({
|
|
|
1475
1474
|
};
|
|
1476
1475
|
};
|
|
1477
1476
|
const updateAfterListIndex = () => {
|
|
1477
|
+
const { treeConfig } = props;
|
|
1478
1478
|
const { afterFullData, fullDataRowIdData, fullAllDataRowIdData } = internalData;
|
|
1479
1479
|
const fullMaps = {};
|
|
1480
1480
|
afterFullData.forEach((row, index) => {
|
|
@@ -1482,7 +1482,9 @@ export default defineComponent({
|
|
|
1482
1482
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
1483
1483
|
const seq = index + 1;
|
|
1484
1484
|
if (rowRest) {
|
|
1485
|
-
|
|
1485
|
+
if (!treeConfig) {
|
|
1486
|
+
rowRest.seq = seq;
|
|
1487
|
+
}
|
|
1486
1488
|
rowRest._index = index;
|
|
1487
1489
|
}
|
|
1488
1490
|
else {
|
|
@@ -2472,7 +2474,10 @@ export default defineComponent({
|
|
|
2472
2474
|
delete rExpandLazyLoadedMaps[rowid];
|
|
2473
2475
|
}
|
|
2474
2476
|
reactData.rowExpandLazyLoadedMaps = rExpandLazyLoadedMaps;
|
|
2475
|
-
nextTick()
|
|
2477
|
+
nextTick()
|
|
2478
|
+
.then(() => $xeTable.recalculate())
|
|
2479
|
+
.then(() => $xeTable.updateCellAreas())
|
|
2480
|
+
.then(() => resolve());
|
|
2476
2481
|
});
|
|
2477
2482
|
}
|
|
2478
2483
|
else {
|
|
@@ -2950,6 +2955,7 @@ export default defineComponent({
|
|
|
2950
2955
|
});
|
|
2951
2956
|
};
|
|
2952
2957
|
const handleColumn = (collectColumn) => {
|
|
2958
|
+
const expandOpts = computeExpandOpts.value;
|
|
2953
2959
|
internalData.collectColumn = collectColumn;
|
|
2954
2960
|
const tableFullColumn = getColumnList(collectColumn);
|
|
2955
2961
|
internalData.tableFullColumn = tableFullColumn;
|
|
@@ -2957,6 +2963,7 @@ export default defineComponent({
|
|
|
2957
2963
|
reactData.isDragColMove = false;
|
|
2958
2964
|
initColumnSort();
|
|
2959
2965
|
return Promise.resolve(restoreCustomStorage()).then(() => {
|
|
2966
|
+
const { scrollXLoad, scrollYLoad, expandColumn } = reactData;
|
|
2960
2967
|
cacheColumnMap();
|
|
2961
2968
|
parseColumns(true).then(() => {
|
|
2962
2969
|
if (reactData.scrollXLoad) {
|
|
@@ -2966,11 +2973,9 @@ export default defineComponent({
|
|
|
2966
2973
|
$xeTable.clearMergeCells();
|
|
2967
2974
|
$xeTable.clearMergeFooterItems();
|
|
2968
2975
|
$xeTable.handleTableData(true);
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
// }
|
|
2973
|
-
// }
|
|
2976
|
+
if ((scrollXLoad || scrollYLoad) && (expandColumn && expandOpts.mode !== 'fixed')) {
|
|
2977
|
+
warnLog('vxe.error.scrollErrProp', ['column.type=expand']);
|
|
2978
|
+
}
|
|
2974
2979
|
return nextTick().then(() => {
|
|
2975
2980
|
if ($xeToolbar) {
|
|
2976
2981
|
$xeToolbar.syncUpdate({
|
|
@@ -3342,6 +3347,14 @@ export default defineComponent({
|
|
|
3342
3347
|
}
|
|
3343
3348
|
}
|
|
3344
3349
|
};
|
|
3350
|
+
const handleRowExpandScroll = () => {
|
|
3351
|
+
const { elemStore } = internalData;
|
|
3352
|
+
const rowExpandEl = refRowExpandElem.value;
|
|
3353
|
+
const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
|
|
3354
|
+
if (rowExpandEl && bodyScrollElem) {
|
|
3355
|
+
rowExpandEl.scrollTop = bodyScrollElem.scrollTop;
|
|
3356
|
+
}
|
|
3357
|
+
};
|
|
3345
3358
|
tableMethods = {
|
|
3346
3359
|
dispatchEvent,
|
|
3347
3360
|
/**
|
|
@@ -5076,14 +5089,14 @@ export default defineComponent({
|
|
|
5076
5089
|
* @param {Boolean} expanded 是否展开
|
|
5077
5090
|
*/
|
|
5078
5091
|
setRowExpand(rows, expanded) {
|
|
5079
|
-
const { rowExpandedMaps, rowExpandLazyLoadedMaps, expandColumn
|
|
5092
|
+
const { rowExpandedMaps, rowExpandLazyLoadedMaps, expandColumn } = reactData;
|
|
5080
5093
|
const { fullAllDataRowIdData } = internalData;
|
|
5081
5094
|
let rExpandedMaps = Object.assign({}, rowExpandedMaps);
|
|
5082
5095
|
const expandOpts = computeExpandOpts.value;
|
|
5083
5096
|
const { reserve, lazy, accordion, toggleMethod } = expandOpts;
|
|
5084
5097
|
const lazyRests = [];
|
|
5085
|
-
const columnIndex =
|
|
5086
|
-
const $columnIndex =
|
|
5098
|
+
const columnIndex = $xeTable.getColumnIndex(expandColumn);
|
|
5099
|
+
const $columnIndex = $xeTable.getVMColumnIndex(expandColumn);
|
|
5087
5100
|
if (rows) {
|
|
5088
5101
|
if (!XEUtils.isArray(rows)) {
|
|
5089
5102
|
rows = [rows];
|
|
@@ -5093,7 +5106,7 @@ export default defineComponent({
|
|
|
5093
5106
|
rExpandedMaps = {};
|
|
5094
5107
|
rows = rows.slice(rows.length - 1, rows.length);
|
|
5095
5108
|
}
|
|
5096
|
-
const validRows = toggleMethod ? rows.filter((row) => toggleMethod({ $table: $xeTable, expanded, column, columnIndex, $columnIndex, row, rowIndex: tableMethods.getRowIndex(row), $rowIndex: tableMethods.getVMRowIndex(row) })) : rows;
|
|
5109
|
+
const validRows = toggleMethod ? rows.filter((row) => toggleMethod({ $table: $xeTable, expanded, column: expandColumn, columnIndex, $columnIndex, row, rowIndex: tableMethods.getRowIndex(row), $rowIndex: tableMethods.getVMRowIndex(row) })) : rows;
|
|
5097
5110
|
if (expanded) {
|
|
5098
5111
|
validRows.forEach((row) => {
|
|
5099
5112
|
const rowid = getRowid($xeTable, row);
|
|
@@ -5122,7 +5135,15 @@ export default defineComponent({
|
|
|
5122
5135
|
}
|
|
5123
5136
|
}
|
|
5124
5137
|
reactData.rowExpandedMaps = rExpandedMaps;
|
|
5125
|
-
return Promise.all(lazyRests)
|
|
5138
|
+
return Promise.all(lazyRests)
|
|
5139
|
+
.then(() => $xeTable.recalculate())
|
|
5140
|
+
.then(() => {
|
|
5141
|
+
if (expandColumn) {
|
|
5142
|
+
updateRowExpandStyle();
|
|
5143
|
+
handleRowExpandScroll();
|
|
5144
|
+
}
|
|
5145
|
+
return $xeTable.updateCellAreas();
|
|
5146
|
+
});
|
|
5126
5147
|
},
|
|
5127
5148
|
/**
|
|
5128
5149
|
* 判断行是否为展开状态
|
|
@@ -5156,7 +5177,7 @@ export default defineComponent({
|
|
|
5156
5177
|
if (expList.length) {
|
|
5157
5178
|
tableMethods.recalculate();
|
|
5158
5179
|
}
|
|
5159
|
-
});
|
|
5180
|
+
}).then(() => $xeTable.updateCellAreas());
|
|
5160
5181
|
},
|
|
5161
5182
|
clearRowExpandReserve() {
|
|
5162
5183
|
internalData.rowExpandedReserveRowMap = {};
|
|
@@ -5576,8 +5597,8 @@ export default defineComponent({
|
|
|
5576
5597
|
updateCellAreas() {
|
|
5577
5598
|
const { mouseConfig } = props;
|
|
5578
5599
|
const mouseOpts = computeMouseOpts.value;
|
|
5579
|
-
if (mouseConfig && mouseOpts.area && $xeTable.
|
|
5580
|
-
return $xeTable.
|
|
5600
|
+
if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
|
|
5601
|
+
return $xeTable.handleRecalculateCellAreaEvent();
|
|
5581
5602
|
}
|
|
5582
5603
|
return nextTick();
|
|
5583
5604
|
},
|
|
@@ -7204,7 +7225,7 @@ export default defineComponent({
|
|
|
7204
7225
|
const isSelected = sLen >= vLen;
|
|
7205
7226
|
const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
|
|
7206
7227
|
if (checkField) {
|
|
7207
|
-
XEUtils.
|
|
7228
|
+
XEUtils.set(row, checkField, isSelected);
|
|
7208
7229
|
}
|
|
7209
7230
|
if (isSelected) {
|
|
7210
7231
|
if (!checkField) {
|
|
@@ -7277,7 +7298,7 @@ export default defineComponent({
|
|
|
7277
7298
|
}
|
|
7278
7299
|
vLen++;
|
|
7279
7300
|
});
|
|
7280
|
-
const isSelected = vLen > 0 ? sLen >= vLen : sLen >= rootList.length;
|
|
7301
|
+
const isSelected = rootList.length > 0 ? (vLen > 0 ? (sLen >= vLen) : (sLen >= rootList.length)) : false;
|
|
7281
7302
|
const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
|
|
7282
7303
|
reactData.isAllSelected = isSelected;
|
|
7283
7304
|
reactData.isIndeterminate = halfSelect;
|
|
@@ -8926,7 +8947,7 @@ export default defineComponent({
|
|
|
8926
8947
|
updateScrollYStatus,
|
|
8927
8948
|
// 更新横向 X 可视渲染上下剩余空间大小
|
|
8928
8949
|
updateScrollXSpace() {
|
|
8929
|
-
const { isGroup, scrollXLoad } = reactData;
|
|
8950
|
+
const { isGroup, scrollXLoad, overflowX } = reactData;
|
|
8930
8951
|
const { visibleColumn, scrollXStore, elemStore, tableWidth } = internalData;
|
|
8931
8952
|
const tableHeader = refTableHeader.value;
|
|
8932
8953
|
const tableBody = refTableBody.value;
|
|
@@ -8940,7 +8961,7 @@ export default defineComponent({
|
|
|
8940
8961
|
const footerElem = tableFooterElem ? tableFooterElem.querySelector('.vxe-table--footer') : null;
|
|
8941
8962
|
const leftSpaceWidth = visibleColumn.slice(0, scrollXStore.startIndex).reduce((previous, column) => previous + column.renderWidth, 0);
|
|
8942
8963
|
let marginLeft = '';
|
|
8943
|
-
if (scrollXLoad) {
|
|
8964
|
+
if (scrollXLoad && overflowX) {
|
|
8944
8965
|
marginLeft = `${leftSpaceWidth}px`;
|
|
8945
8966
|
}
|
|
8946
8967
|
if (headerElem) {
|
|
@@ -9749,7 +9770,8 @@ export default defineComponent({
|
|
|
9749
9770
|
warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)']);
|
|
9750
9771
|
}
|
|
9751
9772
|
loadTableData(value, true).then(() => {
|
|
9752
|
-
|
|
9773
|
+
const { scrollXLoad, scrollYLoad, expandColumn } = reactData;
|
|
9774
|
+
const expandOpts = computeExpandOpts.value;
|
|
9753
9775
|
internalData.inited = true;
|
|
9754
9776
|
internalData.initStatus = true;
|
|
9755
9777
|
if (!initStatus) {
|
|
@@ -9760,9 +9782,9 @@ export default defineComponent({
|
|
|
9760
9782
|
// if (checkboxColumn && internalData.tableFullData.length > 300 && !checkboxOpts.checkField) {
|
|
9761
9783
|
// warnLog('vxe.error.checkProp', ['checkbox-config.checkField'])
|
|
9762
9784
|
// }
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9785
|
+
if ((scrollXLoad || scrollYLoad) && (expandColumn && expandOpts.mode !== 'fixed')) {
|
|
9786
|
+
warnLog('vxe.error.scrollErrProp', ['column.type=expand']);
|
|
9787
|
+
}
|
|
9766
9788
|
return tableMethods.recalculate();
|
|
9767
9789
|
});
|
|
9768
9790
|
});
|
|
@@ -9806,6 +9828,12 @@ export default defineComponent({
|
|
|
9806
9828
|
watch(() => props.showFooter, () => {
|
|
9807
9829
|
reScrollFlag.value++;
|
|
9808
9830
|
});
|
|
9831
|
+
watch(() => reactData.overflowX, () => {
|
|
9832
|
+
reScrollFlag.value++;
|
|
9833
|
+
});
|
|
9834
|
+
watch(() => reactData.overflowY, () => {
|
|
9835
|
+
reScrollFlag.value++;
|
|
9836
|
+
});
|
|
9809
9837
|
watch(reScrollFlag, () => {
|
|
9810
9838
|
nextTick(() => {
|
|
9811
9839
|
tableMethods.recalculate(true).then(() => tableMethods.refreshScroll());
|