vxe-table 3.16.0-beta.3 → 3.16.0-beta.5
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/locale/lang/ar-EG.js +1 -0
- package/es/locale/lang/de-DE.js +1 -0
- package/es/locale/lang/en-US.js +1 -0
- package/es/locale/lang/es-ES.js +1 -0
- package/es/locale/lang/fr-FR.js +1 -0
- package/es/locale/lang/hu-HU.js +1 -0
- package/es/locale/lang/hy-AM.js +1 -0
- package/es/locale/lang/id-ID.js +1 -0
- package/es/locale/lang/it-IT.js +1 -0
- package/es/locale/lang/ja-JP.js +1 -0
- package/es/locale/lang/ko-KR.js +1 -0
- package/es/locale/lang/ms-MY.js +1 -0
- package/es/locale/lang/nb-NO.js +1 -0
- package/es/locale/lang/pt-BR.js +1 -0
- package/es/locale/lang/ru-RU.js +1 -0
- package/es/locale/lang/th-TH.js +1 -0
- package/es/locale/lang/ug-CN.js +1 -0
- package/es/locale/lang/uk-UA.js +1 -0
- package/es/locale/lang/uz-UZ.js +1 -0
- package/es/locale/lang/vi-VN.js +1 -0
- package/es/locale/lang/zh-CHT.js +1 -0
- package/es/locale/lang/zh-CN.js +1 -0
- package/es/style.css +1 -1
- package/es/table/module/edit/mixin.js +31 -1
- package/es/table/src/body.js +1 -1
- package/es/table/src/footer.js +1 -1
- package/es/table/src/header.js +1 -1
- package/es/table/src/methods.js +24 -12
- package/es/table/src/table.js +11 -11
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +77 -29
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +1 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +1 -0
- package/lib/locale/lang/de-DE.js +1 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +1 -0
- package/lib/locale/lang/en-US.js +1 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +1 -0
- package/lib/locale/lang/es-ES.js +1 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +1 -0
- package/lib/locale/lang/fr-FR.js +1 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +1 -0
- package/lib/locale/lang/hu-HU.js +1 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +1 -0
- package/lib/locale/lang/hy-AM.js +1 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +1 -0
- package/lib/locale/lang/id-ID.js +1 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +1 -0
- package/lib/locale/lang/it-IT.js +1 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +1 -0
- package/lib/locale/lang/ja-JP.js +1 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +1 -0
- package/lib/locale/lang/ko-KR.js +1 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +1 -0
- package/lib/locale/lang/ms-MY.js +1 -0
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +1 -0
- package/lib/locale/lang/nb-NO.js +1 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +1 -0
- package/lib/locale/lang/pt-BR.js +1 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +1 -0
- package/lib/locale/lang/ru-RU.js +1 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +1 -0
- package/lib/locale/lang/th-TH.js +1 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +1 -0
- package/lib/locale/lang/ug-CN.js +1 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +1 -0
- package/lib/locale/lang/uk-UA.js +1 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +1 -0
- package/lib/locale/lang/uz-UZ.js +1 -0
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +1 -0
- package/lib/locale/lang/vi-VN.js +1 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +1 -0
- package/lib/locale/lang/zh-CHT.js +1 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +1 -0
- package/lib/locale/lang/zh-CN.js +1 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +1 -0
- package/lib/style.css +1 -1
- package/lib/table/module/edit/mixin.js +30 -1
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/src/body.js +1 -1
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/footer.js +1 -1
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +1 -1
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +30 -12
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +11 -11
- 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/locale/lang/ar-EG.ts +1 -0
- package/packages/locale/lang/de-DE.ts +1 -0
- package/packages/locale/lang/en-US.ts +1 -0
- package/packages/locale/lang/es-ES.ts +1 -0
- package/packages/locale/lang/fr-FR.ts +1 -0
- package/packages/locale/lang/hu-HU.ts +1 -0
- package/packages/locale/lang/hy-AM.ts +1 -0
- package/packages/locale/lang/id-ID.ts +1 -0
- package/packages/locale/lang/it-IT.ts +1 -0
- package/packages/locale/lang/ja-JP.ts +1 -0
- package/packages/locale/lang/ko-KR.ts +1 -0
- package/packages/locale/lang/ms-MY.ts +1 -0
- package/packages/locale/lang/nb-NO.ts +1 -0
- package/packages/locale/lang/pt-BR.ts +1 -0
- package/packages/locale/lang/ru-RU.ts +1 -0
- package/packages/locale/lang/th-TH.ts +1 -0
- package/packages/locale/lang/ug-CN.ts +1 -0
- package/packages/locale/lang/uk-UA.ts +1 -0
- package/packages/locale/lang/uz-UZ.ts +1 -0
- package/packages/locale/lang/vi-VN.ts +1 -0
- package/packages/locale/lang/zh-CHT.ts +1 -0
- package/packages/locale/lang/zh-CN.ts +1 -0
- package/packages/table/module/edit/mixin.ts +30 -2
- package/packages/table/src/body.ts +1 -1
- package/packages/table/src/footer.ts +1 -1
- package/packages/table/src/header.ts +1 -1
- package/packages/table/src/methods.ts +24 -12
- package/packages/table/src/table.ts +13 -11
- /package/es/{iconfont.1751247393221.ttf → iconfont.1751287441470.ttf} +0 -0
- /package/es/{iconfont.1751247393221.woff → iconfont.1751287441470.woff} +0 -0
- /package/es/{iconfont.1751247393221.woff2 → iconfont.1751287441470.woff2} +0 -0
- /package/lib/{iconfont.1751247393221.ttf → iconfont.1751287441470.ttf} +0 -0
- /package/lib/{iconfont.1751247393221.woff → iconfont.1751287441470.woff} +0 -0
- /package/lib/{iconfont.1751247393221.woff2 → iconfont.1751287441470.woff2} +0 -0
|
@@ -86,11 +86,14 @@ function insertTreeRow($xeTable, newRecords, isAppend) {
|
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
|
+
// function insertGroupRow ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, newRecords: any[], isAppend: boolean) {
|
|
90
|
+
// }
|
|
89
91
|
function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
90
92
|
const props = $xeTable;
|
|
91
93
|
const reactData = $xeTable;
|
|
92
94
|
const internalData = $xeTable;
|
|
93
95
|
const { treeConfig } = props;
|
|
96
|
+
const { isRowGroupStatus } = reactData;
|
|
94
97
|
const { tableFullTreeData, afterFullData, mergeBodyList, tableFullData, fullDataRowIdData, fullAllDataRowIdData, insertRowMaps } = internalData;
|
|
95
98
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
96
99
|
const { transform, rowField, mapChildrenField } = treeOpts;
|
|
@@ -104,6 +107,14 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
104
107
|
if (treeConfig && transform) {
|
|
105
108
|
insertTreeRow($xeTable, newRecords, false);
|
|
106
109
|
}
|
|
110
|
+
else if (isRowGroupStatus) {
|
|
111
|
+
// 如果分组
|
|
112
|
+
if (treeConfig) {
|
|
113
|
+
throw new Error(getI18n('vxe.error.noTree', ['insert']));
|
|
114
|
+
}
|
|
115
|
+
warnLog(getI18n('vxe.error.noGroup', ['remove']));
|
|
116
|
+
// insertGroupRow($xeTable, newRecords, false)
|
|
117
|
+
}
|
|
107
118
|
else {
|
|
108
119
|
newRecords.forEach(item => {
|
|
109
120
|
const rowid = getRowid($xeTable, item);
|
|
@@ -128,6 +139,14 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
128
139
|
if (treeConfig && transform) {
|
|
129
140
|
insertTreeRow($xeTable, newRecords, true);
|
|
130
141
|
}
|
|
142
|
+
else if (isRowGroupStatus) {
|
|
143
|
+
// 如果分组
|
|
144
|
+
if (treeConfig) {
|
|
145
|
+
throw new Error(getI18n('vxe.error.noTree', ['insert']));
|
|
146
|
+
}
|
|
147
|
+
warnLog(getI18n('vxe.error.noGroup', ['remove']));
|
|
148
|
+
// insertGroupRow($xeTable, newRecords, true)
|
|
149
|
+
}
|
|
131
150
|
else {
|
|
132
151
|
newRecords.forEach(item => {
|
|
133
152
|
const rowid = getRowid($xeTable, item);
|
|
@@ -192,6 +211,13 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
192
211
|
insertTreeRow($xeTable, newRecords, true);
|
|
193
212
|
}
|
|
194
213
|
}
|
|
214
|
+
else if (isRowGroupStatus) {
|
|
215
|
+
// 如果分组
|
|
216
|
+
if (treeConfig) {
|
|
217
|
+
throw new Error(getI18n('vxe.error.noTree', ['insert']));
|
|
218
|
+
}
|
|
219
|
+
warnLog(getI18n('vxe.error.noGroup', ['remove']));
|
|
220
|
+
}
|
|
195
221
|
else {
|
|
196
222
|
if (treeConfig) {
|
|
197
223
|
throw new Error(getI18n('vxe.error.noTree', ['insert']));
|
|
@@ -489,7 +515,7 @@ export default {
|
|
|
489
515
|
const reactData = $xeTable;
|
|
490
516
|
const internalData = $xeTable;
|
|
491
517
|
const { treeConfig } = props;
|
|
492
|
-
const { editStore } = reactData;
|
|
518
|
+
const { editStore, isRowGroupStatus } = reactData;
|
|
493
519
|
const { tableFullTreeData, selectCheckboxMaps, afterFullData, mergeBodyList, tableFullData, pendingRowMaps, insertRowMaps, removeRowMaps } = internalData;
|
|
494
520
|
const checkboxOpts = $xeTable.computeCheckboxOpts;
|
|
495
521
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
@@ -548,6 +574,10 @@ export default {
|
|
|
548
574
|
}
|
|
549
575
|
});
|
|
550
576
|
}
|
|
577
|
+
else if (isRowGroupStatus) {
|
|
578
|
+
// 如果分组
|
|
579
|
+
warnLog(getI18n('vxe.error.noGroup', ['remove']));
|
|
580
|
+
}
|
|
551
581
|
else {
|
|
552
582
|
rows.forEach((row) => {
|
|
553
583
|
const tfIndex = this.findRowIndexOf(tableFullData, row);
|
package/es/table/src/body.js
CHANGED
|
@@ -318,7 +318,7 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
|
|
|
318
318
|
colid,
|
|
319
319
|
rowid
|
|
320
320
|
},
|
|
321
|
-
class: 'vxe-cell--wrapper'
|
|
321
|
+
class: 'vxe-cell--wrapper vxe-body-cell--wrapper'
|
|
322
322
|
}, column.renderCell(h, cellParams))
|
|
323
323
|
]));
|
|
324
324
|
if (showValidTip && errorValidItem) {
|
package/es/table/src/footer.js
CHANGED
|
@@ -164,7 +164,7 @@ function renderRows(h, _vm, isOptimizeMode, tableColumn, footerTableData, row, $
|
|
|
164
164
|
attrs: {
|
|
165
165
|
colid
|
|
166
166
|
},
|
|
167
|
-
class: 'vxe-cell--wrapper'
|
|
167
|
+
class: 'vxe-cell--wrapper vxe-footer-cell--wrapper'
|
|
168
168
|
}, column.renderFooter(h, cellParams))
|
|
169
169
|
]),
|
|
170
170
|
/**
|
package/es/table/src/header.js
CHANGED
package/es/table/src/methods.js
CHANGED
|
@@ -2634,7 +2634,7 @@ function handleLazyRecalculate($xeTable, reFull, reWidth, reHeight) {
|
|
|
2634
2634
|
if (rceTimeout) {
|
|
2635
2635
|
clearTimeout(rceTimeout);
|
|
2636
2636
|
if (rceRunTime && rceRunTime + (refreshDelay - 5) < Date.now()) {
|
|
2637
|
-
resolve(handleRecalculateStyle($xeTable,
|
|
2637
|
+
resolve(handleRecalculateStyle($xeTable, reFull, reWidth, reHeight));
|
|
2638
2638
|
}
|
|
2639
2639
|
else {
|
|
2640
2640
|
$xeTable.$nextTick(() => {
|
|
@@ -2643,11 +2643,11 @@ function handleLazyRecalculate($xeTable, reFull, reWidth, reHeight) {
|
|
|
2643
2643
|
}
|
|
2644
2644
|
}
|
|
2645
2645
|
else {
|
|
2646
|
-
resolve(handleRecalculateStyle($xeTable,
|
|
2646
|
+
resolve(handleRecalculateStyle($xeTable, reFull, reWidth, reHeight));
|
|
2647
2647
|
}
|
|
2648
2648
|
internalData.rceTimeout = setTimeout(() => {
|
|
2649
2649
|
internalData.rceTimeout = undefined;
|
|
2650
|
-
handleRecalculateStyle($xeTable,
|
|
2650
|
+
handleRecalculateStyle($xeTable, reFull, reWidth, reHeight);
|
|
2651
2651
|
}, refreshDelay);
|
|
2652
2652
|
});
|
|
2653
2653
|
}
|
|
@@ -2935,9 +2935,8 @@ function loadTableData($xeTable, datas, isReset) {
|
|
|
2935
2935
|
$xeTable.$nextTick()
|
|
2936
2936
|
.then(() => handleRecalculateStyle($xeTable, false, false, false))
|
|
2937
2937
|
.then(() => {
|
|
2938
|
-
|
|
2938
|
+
handleRecalculateStyle($xeTable, false, true, true);
|
|
2939
2939
|
updateRowOffsetTop($xeTable);
|
|
2940
|
-
return handleRecalculateStyle($xeTable, false, false, false);
|
|
2941
2940
|
})
|
|
2942
2941
|
.then(() => {
|
|
2943
2942
|
let targetScrollLeft = lastScrollLeft;
|
|
@@ -2957,7 +2956,7 @@ function loadTableData($xeTable, datas, isReset) {
|
|
|
2957
2956
|
if (oldScrollYLoad === sYLoad) {
|
|
2958
2957
|
restoreScrollLocation($xeTable, targetScrollLeft, targetScrollTop)
|
|
2959
2958
|
.then(() => {
|
|
2960
|
-
|
|
2959
|
+
handleRecalculateStyle($xeTable, false, true, true);
|
|
2961
2960
|
updateRowOffsetTop($xeTable);
|
|
2962
2961
|
resolve();
|
|
2963
2962
|
});
|
|
@@ -2966,7 +2965,7 @@ function loadTableData($xeTable, datas, isReset) {
|
|
|
2966
2965
|
setTimeout(() => {
|
|
2967
2966
|
restoreScrollLocation($xeTable, targetScrollLeft, targetScrollTop)
|
|
2968
2967
|
.then(() => {
|
|
2969
|
-
|
|
2968
|
+
handleRecalculateStyle($xeTable, false, true, true);
|
|
2970
2969
|
updateRowOffsetTop($xeTable);
|
|
2971
2970
|
resolve();
|
|
2972
2971
|
});
|
|
@@ -3228,7 +3227,7 @@ function handleColumn($xeTable, collectColumn) {
|
|
|
3228
3227
|
$xeTable.handleUpdateCustomColumn();
|
|
3229
3228
|
}
|
|
3230
3229
|
reactData.isColLoading = false;
|
|
3231
|
-
return $xeTable
|
|
3230
|
+
return handleLazyRecalculate($xeTable, false, true, true);
|
|
3232
3231
|
});
|
|
3233
3232
|
});
|
|
3234
3233
|
}
|
|
@@ -3419,8 +3418,21 @@ function updateHeight($xeTable) {
|
|
|
3419
3418
|
internalData.customHeight = 300;
|
|
3420
3419
|
}
|
|
3421
3420
|
}
|
|
3422
|
-
function calcColumnAutoWidth(column, wrapperEl) {
|
|
3423
|
-
const
|
|
3421
|
+
function calcColumnAutoWidth($xeTable, column, wrapperEl) {
|
|
3422
|
+
const columnOpts = $xeTable.computeColumnOpts;
|
|
3423
|
+
const { autoOptions } = columnOpts;
|
|
3424
|
+
const { isCalcHeader, isCalcBody, isCalcFooter } = autoOptions || {};
|
|
3425
|
+
const querySelections = [];
|
|
3426
|
+
if (isCalcHeader) {
|
|
3427
|
+
querySelections.push(`.vxe-header-cell--wrapper[colid="${column.id}"]`);
|
|
3428
|
+
}
|
|
3429
|
+
if (isCalcBody) {
|
|
3430
|
+
querySelections.push(`.vxe-body-cell--wrapper[colid="${column.id}"]`);
|
|
3431
|
+
}
|
|
3432
|
+
if (isCalcFooter) {
|
|
3433
|
+
querySelections.push(`.vxe-footer-cell--wrapper[colid="${column.id}"]`);
|
|
3434
|
+
}
|
|
3435
|
+
const cellElemList = querySelections.length ? wrapperEl.querySelectorAll(querySelections.join(',')) : [];
|
|
3424
3436
|
let leftRightPadding = 0;
|
|
3425
3437
|
const firstCellEl = cellElemList[0];
|
|
3426
3438
|
if (firstCellEl && firstCellEl.parentElement) {
|
|
@@ -3444,7 +3456,7 @@ function calcCellWidth($xeTable) {
|
|
|
3444
3456
|
autoWidthColumnList.forEach(column => {
|
|
3445
3457
|
const colid = column.id;
|
|
3446
3458
|
const colRest = fullColumnIdData[colid];
|
|
3447
|
-
const colWidth = calcColumnAutoWidth(column, el);
|
|
3459
|
+
const colWidth = calcColumnAutoWidth($xeTable, column, el);
|
|
3448
3460
|
if (colRest) {
|
|
3449
3461
|
colRest.width = Math.max(colWidth, colRest.width);
|
|
3450
3462
|
}
|
|
@@ -5366,7 +5378,7 @@ const Methods = {
|
|
|
5366
5378
|
const cellParams = Object.assign(params, { cell });
|
|
5367
5379
|
const colMinWidth = getColReMinWidth(cellParams);
|
|
5368
5380
|
el.setAttribute('data-calc-col', 'Y');
|
|
5369
|
-
let resizeWidth = calcColumnAutoWidth(resizeColumn, el);
|
|
5381
|
+
let resizeWidth = calcColumnAutoWidth($xeTable, resizeColumn, el);
|
|
5370
5382
|
el.removeAttribute('data-calc-col');
|
|
5371
5383
|
if (colRest) {
|
|
5372
5384
|
resizeWidth = Math.max(resizeWidth, colRest.width);
|
package/es/table/src/table.js
CHANGED
|
@@ -1772,24 +1772,24 @@ export default {
|
|
|
1772
1772
|
errLog('vxe.error.reqComp', ['vxe-tooltip']);
|
|
1773
1773
|
}
|
|
1774
1774
|
}
|
|
1775
|
+
if (this.autoResize) {
|
|
1776
|
+
const resizeObserver = globalResize.create(() => {
|
|
1777
|
+
if (this.autoResize) {
|
|
1778
|
+
this.recalculate(true);
|
|
1779
|
+
}
|
|
1780
|
+
});
|
|
1781
|
+
resizeObserver.observe(this.$el);
|
|
1782
|
+
resizeObserver.observe(this.getParentElem());
|
|
1783
|
+
this.$resize = resizeObserver;
|
|
1784
|
+
}
|
|
1775
1785
|
});
|
|
1776
|
-
if (this.autoResize) {
|
|
1777
|
-
const resizeObserver = globalResize.create(() => {
|
|
1778
|
-
if (this.autoResize) {
|
|
1779
|
-
this.recalculate(true);
|
|
1780
|
-
}
|
|
1781
|
-
});
|
|
1782
|
-
resizeObserver.observe(this.$el);
|
|
1783
|
-
resizeObserver.observe(this.getParentElem());
|
|
1784
|
-
this.$resize = resizeObserver;
|
|
1785
|
-
}
|
|
1786
1786
|
if (virtualYOpts.mode !== 'scroll') {
|
|
1787
1787
|
const tableViewportEl = $xeTable.$refs.refTableViewportElem;
|
|
1788
1788
|
if (tableViewportEl) {
|
|
1789
1789
|
tableViewportEl.addEventListener('wheel', $xeTable.triggerBodyWheelEvent, { passive: false });
|
|
1790
1790
|
}
|
|
1791
1791
|
}
|
|
1792
|
-
|
|
1792
|
+
$xeTable.preventEvent(null, 'mounted');
|
|
1793
1793
|
},
|
|
1794
1794
|
activated() {
|
|
1795
1795
|
this.recalculate().then(() => this.refreshScroll());
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -2002,7 +2002,7 @@ function getClass(property, params) {
|
|
|
2002
2002
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2003
2003
|
|
|
2004
2004
|
|
|
2005
|
-
const version = "3.16.0-beta.
|
|
2005
|
+
const version = "3.16.0-beta.5";
|
|
2006
2006
|
core_.VxeUI.version = version;
|
|
2007
2007
|
core_.VxeUI.tableVersion = version;
|
|
2008
2008
|
core_.VxeUI.setConfig({
|
|
@@ -2667,7 +2667,7 @@ function isNodeElement(elem) {
|
|
|
2667
2667
|
const {
|
|
2668
2668
|
log: log_log
|
|
2669
2669
|
} = core_.VxeUI;
|
|
2670
|
-
const log_version = `table v${"3.16.0-beta.
|
|
2670
|
+
const log_version = `table v${"3.16.0-beta.5"}`;
|
|
2671
2671
|
const warnLog = log_log.create('warn', log_version);
|
|
2672
2672
|
const errLog = log_log.create('error', log_version);
|
|
2673
2673
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -8369,18 +8369,18 @@ function handleLazyRecalculate($xeTable, reFull, reWidth, reHeight) {
|
|
|
8369
8369
|
if (rceTimeout) {
|
|
8370
8370
|
clearTimeout(rceTimeout);
|
|
8371
8371
|
if (rceRunTime && rceRunTime + (refreshDelay - 5) < Date.now()) {
|
|
8372
|
-
resolve(handleRecalculateStyle($xeTable,
|
|
8372
|
+
resolve(handleRecalculateStyle($xeTable, reFull, reWidth, reHeight));
|
|
8373
8373
|
} else {
|
|
8374
8374
|
$xeTable.$nextTick(() => {
|
|
8375
8375
|
resolve();
|
|
8376
8376
|
});
|
|
8377
8377
|
}
|
|
8378
8378
|
} else {
|
|
8379
|
-
resolve(handleRecalculateStyle($xeTable,
|
|
8379
|
+
resolve(handleRecalculateStyle($xeTable, reFull, reWidth, reHeight));
|
|
8380
8380
|
}
|
|
8381
8381
|
internalData.rceTimeout = setTimeout(() => {
|
|
8382
8382
|
internalData.rceTimeout = undefined;
|
|
8383
|
-
handleRecalculateStyle($xeTable,
|
|
8383
|
+
handleRecalculateStyle($xeTable, reFull, reWidth, reHeight);
|
|
8384
8384
|
}, refreshDelay);
|
|
8385
8385
|
});
|
|
8386
8386
|
}
|
|
@@ -8703,9 +8703,8 @@ function loadTableData($xeTable, datas, isReset) {
|
|
|
8703
8703
|
$xeTable.checkSelectionStatus();
|
|
8704
8704
|
return new Promise(resolve => {
|
|
8705
8705
|
$xeTable.$nextTick().then(() => handleRecalculateStyle($xeTable, false, false, false)).then(() => {
|
|
8706
|
-
|
|
8706
|
+
handleRecalculateStyle($xeTable, false, true, true);
|
|
8707
8707
|
updateRowOffsetTop($xeTable);
|
|
8708
|
-
return handleRecalculateStyle($xeTable, false, false, false);
|
|
8709
8708
|
}).then(() => {
|
|
8710
8709
|
let targetScrollLeft = lastScrollLeft;
|
|
8711
8710
|
let targetScrollTop = lastScrollTop;
|
|
@@ -8723,14 +8722,14 @@ function loadTableData($xeTable, datas, isReset) {
|
|
|
8723
8722
|
// 是否变更虚拟滚动
|
|
8724
8723
|
if (oldScrollYLoad === sYLoad) {
|
|
8725
8724
|
restoreScrollLocation($xeTable, targetScrollLeft, targetScrollTop).then(() => {
|
|
8726
|
-
|
|
8725
|
+
handleRecalculateStyle($xeTable, false, true, true);
|
|
8727
8726
|
updateRowOffsetTop($xeTable);
|
|
8728
8727
|
resolve();
|
|
8729
8728
|
});
|
|
8730
8729
|
} else {
|
|
8731
8730
|
setTimeout(() => {
|
|
8732
8731
|
restoreScrollLocation($xeTable, targetScrollLeft, targetScrollTop).then(() => {
|
|
8733
|
-
|
|
8732
|
+
handleRecalculateStyle($xeTable, false, true, true);
|
|
8734
8733
|
updateRowOffsetTop($xeTable);
|
|
8735
8734
|
resolve();
|
|
8736
8735
|
});
|
|
@@ -9027,7 +9026,7 @@ function handleColumn($xeTable, collectColumn) {
|
|
|
9027
9026
|
$xeTable.handleUpdateCustomColumn();
|
|
9028
9027
|
}
|
|
9029
9028
|
reactData.isColLoading = false;
|
|
9030
|
-
return $xeTable
|
|
9029
|
+
return handleLazyRecalculate($xeTable, false, true, true);
|
|
9031
9030
|
});
|
|
9032
9031
|
});
|
|
9033
9032
|
}
|
|
@@ -9252,8 +9251,27 @@ function updateHeight($xeTable) {
|
|
|
9252
9251
|
internalData.customHeight = 300;
|
|
9253
9252
|
}
|
|
9254
9253
|
}
|
|
9255
|
-
function calcColumnAutoWidth(column, wrapperEl) {
|
|
9256
|
-
const
|
|
9254
|
+
function calcColumnAutoWidth($xeTable, column, wrapperEl) {
|
|
9255
|
+
const columnOpts = $xeTable.computeColumnOpts;
|
|
9256
|
+
const {
|
|
9257
|
+
autoOptions
|
|
9258
|
+
} = columnOpts;
|
|
9259
|
+
const {
|
|
9260
|
+
isCalcHeader,
|
|
9261
|
+
isCalcBody,
|
|
9262
|
+
isCalcFooter
|
|
9263
|
+
} = autoOptions || {};
|
|
9264
|
+
const querySelections = [];
|
|
9265
|
+
if (isCalcHeader) {
|
|
9266
|
+
querySelections.push(`.vxe-header-cell--wrapper[colid="${column.id}"]`);
|
|
9267
|
+
}
|
|
9268
|
+
if (isCalcBody) {
|
|
9269
|
+
querySelections.push(`.vxe-body-cell--wrapper[colid="${column.id}"]`);
|
|
9270
|
+
}
|
|
9271
|
+
if (isCalcFooter) {
|
|
9272
|
+
querySelections.push(`.vxe-footer-cell--wrapper[colid="${column.id}"]`);
|
|
9273
|
+
}
|
|
9274
|
+
const cellElemList = querySelections.length ? wrapperEl.querySelectorAll(querySelections.join(',')) : [];
|
|
9257
9275
|
let leftRightPadding = 0;
|
|
9258
9276
|
const firstCellEl = cellElemList[0];
|
|
9259
9277
|
if (firstCellEl && firstCellEl.parentElement) {
|
|
@@ -9279,7 +9297,7 @@ function calcCellWidth($xeTable) {
|
|
|
9279
9297
|
autoWidthColumnList.forEach(column => {
|
|
9280
9298
|
const colid = column.id;
|
|
9281
9299
|
const colRest = fullColumnIdData[colid];
|
|
9282
|
-
const colWidth = calcColumnAutoWidth(column, el);
|
|
9300
|
+
const colWidth = calcColumnAutoWidth($xeTable, column, el);
|
|
9283
9301
|
if (colRest) {
|
|
9284
9302
|
colRest.width = Math.max(colWidth, colRest.width);
|
|
9285
9303
|
}
|
|
@@ -11483,7 +11501,7 @@ const Methods = {
|
|
|
11483
11501
|
});
|
|
11484
11502
|
const colMinWidth = getColReMinWidth(cellParams);
|
|
11485
11503
|
el.setAttribute('data-calc-col', 'Y');
|
|
11486
|
-
let resizeWidth = calcColumnAutoWidth(resizeColumn, el);
|
|
11504
|
+
let resizeWidth = calcColumnAutoWidth($xeTable, resizeColumn, el);
|
|
11487
11505
|
el.removeAttribute('data-calc-col');
|
|
11488
11506
|
if (colRest) {
|
|
11489
11507
|
resizeWidth = Math.max(resizeWidth, colRest.width);
|
|
@@ -17939,7 +17957,7 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
|
|
|
17939
17957
|
colid,
|
|
17940
17958
|
rowid
|
|
17941
17959
|
},
|
|
17942
|
-
class: 'vxe-cell--wrapper'
|
|
17960
|
+
class: 'vxe-cell--wrapper vxe-body-cell--wrapper'
|
|
17943
17961
|
}, column.renderCell(h, cellParams))]));
|
|
17944
17962
|
if (showValidTip && errorValidItem) {
|
|
17945
17963
|
const errRule = errorValidItem.rule;
|
|
@@ -18698,7 +18716,7 @@ const header_renderRows = (h, _vm, isGroup, isOptimizeMode, cols, $rowIndex) =>
|
|
|
18698
18716
|
attrs: {
|
|
18699
18717
|
colid
|
|
18700
18718
|
},
|
|
18701
|
-
class: 'vxe-cell--wrapper'
|
|
18719
|
+
class: 'vxe-cell--wrapper vxe-header-cell--wrapper'
|
|
18702
18720
|
}, column.renderHeader(h, cellParams))]),
|
|
18703
18721
|
/**
|
|
18704
18722
|
* 列宽拖动
|
|
@@ -19170,7 +19188,7 @@ function footer_renderRows(h, _vm, isOptimizeMode, tableColumn, footerTableData,
|
|
|
19170
19188
|
attrs: {
|
|
19171
19189
|
colid
|
|
19172
19190
|
},
|
|
19173
|
-
class: 'vxe-cell--wrapper'
|
|
19191
|
+
class: 'vxe-cell--wrapper vxe-footer-cell--wrapper'
|
|
19174
19192
|
}, column.renderFooter(h, cellParams))]),
|
|
19175
19193
|
/**
|
|
19176
19194
|
* 列宽拖动
|
|
@@ -23075,6 +23093,8 @@ function insertTreeRow($xeTable, newRecords, isAppend) {
|
|
|
23075
23093
|
}
|
|
23076
23094
|
});
|
|
23077
23095
|
}
|
|
23096
|
+
// function insertGroupRow ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, newRecords: any[], isAppend: boolean) {
|
|
23097
|
+
// }
|
|
23078
23098
|
function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
23079
23099
|
const props = $xeTable;
|
|
23080
23100
|
const reactData = $xeTable;
|
|
@@ -23082,6 +23102,9 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
23082
23102
|
const {
|
|
23083
23103
|
treeConfig
|
|
23084
23104
|
} = props;
|
|
23105
|
+
const {
|
|
23106
|
+
isRowGroupStatus
|
|
23107
|
+
} = reactData;
|
|
23085
23108
|
const {
|
|
23086
23109
|
tableFullTreeData,
|
|
23087
23110
|
afterFullData,
|
|
@@ -23109,6 +23132,13 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
23109
23132
|
// 如果为虚拟树
|
|
23110
23133
|
if (treeConfig && transform) {
|
|
23111
23134
|
insertTreeRow($xeTable, newRecords, false);
|
|
23135
|
+
} else if (isRowGroupStatus) {
|
|
23136
|
+
// 如果分组
|
|
23137
|
+
if (treeConfig) {
|
|
23138
|
+
throw new Error(mixin_getI18n('vxe.error.noTree', ['insert']));
|
|
23139
|
+
}
|
|
23140
|
+
warnLog(mixin_getI18n('vxe.error.noGroup', ['remove']));
|
|
23141
|
+
// insertGroupRow($xeTable, newRecords, false)
|
|
23112
23142
|
} else {
|
|
23113
23143
|
newRecords.forEach(item => {
|
|
23114
23144
|
const rowid = getRowid($xeTable, item);
|
|
@@ -23148,6 +23178,13 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
23148
23178
|
// 如果为虚拟树
|
|
23149
23179
|
if (treeConfig && transform) {
|
|
23150
23180
|
insertTreeRow($xeTable, newRecords, true);
|
|
23181
|
+
} else if (isRowGroupStatus) {
|
|
23182
|
+
// 如果分组
|
|
23183
|
+
if (treeConfig) {
|
|
23184
|
+
throw new Error(mixin_getI18n('vxe.error.noTree', ['insert']));
|
|
23185
|
+
}
|
|
23186
|
+
warnLog(mixin_getI18n('vxe.error.noGroup', ['remove']));
|
|
23187
|
+
// insertGroupRow($xeTable, newRecords, true)
|
|
23151
23188
|
} else {
|
|
23152
23189
|
newRecords.forEach(item => {
|
|
23153
23190
|
const rowid = getRowid($xeTable, item);
|
|
@@ -23248,6 +23285,12 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
23248
23285
|
warnLog('vxe.error.unableInsert');
|
|
23249
23286
|
insertTreeRow($xeTable, newRecords, true);
|
|
23250
23287
|
}
|
|
23288
|
+
} else if (isRowGroupStatus) {
|
|
23289
|
+
// 如果分组
|
|
23290
|
+
if (treeConfig) {
|
|
23291
|
+
throw new Error(mixin_getI18n('vxe.error.noTree', ['insert']));
|
|
23292
|
+
}
|
|
23293
|
+
warnLog(mixin_getI18n('vxe.error.noGroup', ['remove']));
|
|
23251
23294
|
} else {
|
|
23252
23295
|
if (treeConfig) {
|
|
23253
23296
|
throw new Error(mixin_getI18n('vxe.error.noTree', ['insert']));
|
|
@@ -23594,7 +23637,8 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
|
|
|
23594
23637
|
treeConfig
|
|
23595
23638
|
} = props;
|
|
23596
23639
|
const {
|
|
23597
|
-
editStore
|
|
23640
|
+
editStore,
|
|
23641
|
+
isRowGroupStatus
|
|
23598
23642
|
} = reactData;
|
|
23599
23643
|
const {
|
|
23600
23644
|
tableFullTreeData,
|
|
@@ -23671,6 +23715,9 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
|
|
|
23671
23715
|
afterFullData.splice(afIndex, 1);
|
|
23672
23716
|
}
|
|
23673
23717
|
});
|
|
23718
|
+
} else if (isRowGroupStatus) {
|
|
23719
|
+
// 如果分组
|
|
23720
|
+
warnLog(mixin_getI18n('vxe.error.noGroup', ['remove']));
|
|
23674
23721
|
} else {
|
|
23675
23722
|
rows.forEach(row => {
|
|
23676
23723
|
const tfIndex = this.findRowIndexOf(tableFullData, row);
|
|
@@ -29597,17 +29644,17 @@ function renderBody(h, $xeTable) {
|
|
|
29597
29644
|
errLog('vxe.error.reqComp', ['vxe-tooltip']);
|
|
29598
29645
|
}
|
|
29599
29646
|
}
|
|
29647
|
+
if (this.autoResize) {
|
|
29648
|
+
const resizeObserver = table_globalResize.create(() => {
|
|
29649
|
+
if (this.autoResize) {
|
|
29650
|
+
this.recalculate(true);
|
|
29651
|
+
}
|
|
29652
|
+
});
|
|
29653
|
+
resizeObserver.observe(this.$el);
|
|
29654
|
+
resizeObserver.observe(this.getParentElem());
|
|
29655
|
+
this.$resize = resizeObserver;
|
|
29656
|
+
}
|
|
29600
29657
|
});
|
|
29601
|
-
if (this.autoResize) {
|
|
29602
|
-
const resizeObserver = table_globalResize.create(() => {
|
|
29603
|
-
if (this.autoResize) {
|
|
29604
|
-
this.recalculate(true);
|
|
29605
|
-
}
|
|
29606
|
-
});
|
|
29607
|
-
resizeObserver.observe(this.$el);
|
|
29608
|
-
resizeObserver.observe(this.getParentElem());
|
|
29609
|
-
this.$resize = resizeObserver;
|
|
29610
|
-
}
|
|
29611
29658
|
if (virtualYOpts.mode !== 'scroll') {
|
|
29612
29659
|
const tableViewportEl = $xeTable.$refs.refTableViewportElem;
|
|
29613
29660
|
if (tableViewportEl) {
|
|
@@ -29616,7 +29663,7 @@ function renderBody(h, $xeTable) {
|
|
|
29616
29663
|
});
|
|
29617
29664
|
}
|
|
29618
29665
|
}
|
|
29619
|
-
|
|
29666
|
+
$xeTable.preventEvent(null, 'mounted');
|
|
29620
29667
|
},
|
|
29621
29668
|
activated() {
|
|
29622
29669
|
this.recalculate().then(() => this.refreshScroll());
|
|
@@ -34072,6 +34119,7 @@ const Toolbar = VxeToolbar;
|
|
|
34072
34119
|
notCommands: '全局指令 "{0}" 不存在',
|
|
34073
34120
|
notSlot: '插槽 "{0}" 不存在',
|
|
34074
34121
|
noTree: '树结构不支持 "{0}"',
|
|
34122
|
+
noGroup: '数据分组后不支持 "{0}"',
|
|
34075
34123
|
notProp: '不支持的参数 "{0}"',
|
|
34076
34124
|
checkProp: '当数据量过大时可能会导致复选框卡顿,建议设置参数 "{0}" 提升渲染速度',
|
|
34077
34125
|
coverProp: '"{0}" 的参数 "{1}" 重复定义,这可能会出现错误',
|