vxe-table 3.17.0-beta.0 → 3.17.0-beta.2
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/src/columnInfo.js +11 -2
- package/es/table/src/methods.js +54 -12
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +77 -17
- 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/src/columnInfo.js +14 -2
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +60 -13
- package/lib/table/src/methods.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/src/columnInfo.ts +13 -2
- package/packages/table/src/methods.ts +56 -13
- /package/es/{iconfont.1752731409459.ttf → iconfont.1753241343977.ttf} +0 -0
- /package/es/{iconfont.1752731409459.woff → iconfont.1753241343977.woff} +0 -0
- /package/es/{iconfont.1752731409459.woff2 → iconfont.1753241343977.woff2} +0 -0
- /package/lib/{iconfont.1752731409459.ttf → iconfont.1753241343977.ttf} +0 -0
- /package/lib/{iconfont.1752731409459.woff → iconfont.1753241343977.woff} +0 -0
- /package/lib/{iconfont.1752731409459.woff2 → iconfont.1753241343977.woff2} +0 -0
|
@@ -9,6 +9,7 @@ export class ColumnInfo {
|
|
|
9
9
|
constructor($xeTable, _vm, { renderHeader, renderCell, renderFooter, renderData } = {}) {
|
|
10
10
|
const tableProps = $xeTable;
|
|
11
11
|
const $xeGrid = $xeTable.$xeGrid;
|
|
12
|
+
const { field, editRender } = _vm;
|
|
12
13
|
const proxyOpts = $xeGrid ? $xeGrid.computeProxyOpts : null;
|
|
13
14
|
const formatter = _vm.formatter;
|
|
14
15
|
const visible = XEUtils.isBoolean(_vm.visible) ? _vm.visible : true;
|
|
@@ -53,11 +54,19 @@ export class ColumnInfo {
|
|
|
53
54
|
errLog('vxe.error.errProp', [`column.agg-func=${_vm.aggFunc}`, 'column.agg-func=true']);
|
|
54
55
|
}
|
|
55
56
|
}
|
|
57
|
+
if (field && editRender) {
|
|
58
|
+
if (editRender.startField && `${editRender.startField}`.indexOf(field) >= 0) {
|
|
59
|
+
errLog('vxe.error.modelConflicts', [`field=${field}`, `edit-render.startField=${editRender.startField}`]);
|
|
60
|
+
}
|
|
61
|
+
if (editRender.endField && `${editRender.endField}`.indexOf(field) >= 0) {
|
|
62
|
+
errLog('vxe.error.modelConflicts', [`field=${field}`, `edit-render.endField=${editRender.endField}`]);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
56
65
|
Object.assign(this, {
|
|
57
66
|
// 基本属性
|
|
58
67
|
type: _vm.type,
|
|
59
68
|
property: _vm.field,
|
|
60
|
-
field:
|
|
69
|
+
field: field,
|
|
61
70
|
title: _vm.title,
|
|
62
71
|
width: _vm.width,
|
|
63
72
|
minWidth: _vm.minWidth,
|
|
@@ -94,7 +103,7 @@ export class ColumnInfo {
|
|
|
94
103
|
rowResize: _vm.rowResize,
|
|
95
104
|
cellType: _vm.cellType,
|
|
96
105
|
cellRender: _vm.cellRender,
|
|
97
|
-
editRender:
|
|
106
|
+
editRender: editRender,
|
|
98
107
|
contentRender: _vm.contentRender,
|
|
99
108
|
headerExportMethod: _vm.headerExportMethod,
|
|
100
109
|
exportMethod: _vm.exportMethod,
|
package/es/table/src/methods.js
CHANGED
|
@@ -500,6 +500,32 @@ function handleRowGroupVirtualExpand($xeTable, rows, expanded) {
|
|
|
500
500
|
}, 30);
|
|
501
501
|
});
|
|
502
502
|
}
|
|
503
|
+
/**
|
|
504
|
+
* 处理默认展开分组行
|
|
505
|
+
*/
|
|
506
|
+
function handleDefaultRowGroupExpand($xeTable) {
|
|
507
|
+
const reactData = $xeTable;
|
|
508
|
+
const internalData = $xeTable;
|
|
509
|
+
const { isRowGroupStatus } = reactData;
|
|
510
|
+
if (isRowGroupStatus) {
|
|
511
|
+
const { fullDataRowIdData } = internalData;
|
|
512
|
+
const aggregateOpts = $xeTable.computeAggregateOpts;
|
|
513
|
+
const { expandAll, expandRowKeys } = aggregateOpts;
|
|
514
|
+
if (expandAll) {
|
|
515
|
+
$xeTable.setAllRowGroupExpand(true);
|
|
516
|
+
}
|
|
517
|
+
else if (expandRowKeys) {
|
|
518
|
+
const defExpandeds = [];
|
|
519
|
+
expandRowKeys.forEach((rowid) => {
|
|
520
|
+
const rowRest = fullDataRowIdData[rowid];
|
|
521
|
+
if (rowRest) {
|
|
522
|
+
defExpandeds.push(rowRest.row);
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
$xeTable.setRowGroupExpand(defExpandeds, true);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
503
529
|
function updateAfterListIndex($xeTable) {
|
|
504
530
|
const props = $xeTable;
|
|
505
531
|
const internalData = $xeTable;
|
|
@@ -2952,6 +2978,13 @@ function loadTableData($xeTable, datas, isReset) {
|
|
|
2952
2978
|
}
|
|
2953
2979
|
reactData.isRowLoading = false;
|
|
2954
2980
|
handleRecalculateStyle($xeTable, false, false, false);
|
|
2981
|
+
// 如果是自动行高,特殊情况需调用 recalculate 手动刷新
|
|
2982
|
+
if (!props.showOverflow) {
|
|
2983
|
+
setTimeout(() => {
|
|
2984
|
+
handleLazyRecalculate($xeTable, false, true, true);
|
|
2985
|
+
setTimeout(() => handleLazyRecalculate($xeTable, false, true, true), 3000);
|
|
2986
|
+
}, 2000);
|
|
2987
|
+
}
|
|
2955
2988
|
// 是否变更虚拟滚动
|
|
2956
2989
|
if (oldScrollYLoad === sYLoad) {
|
|
2957
2990
|
restoreScrollLocation($xeTable, targetScrollLeft, targetScrollTop)
|
|
@@ -2984,6 +3017,7 @@ function handleLoadDefaults($xeTable) {
|
|
|
2984
3017
|
handleDefaultRadioChecked($xeTable);
|
|
2985
3018
|
handleDefaultRowExpand($xeTable);
|
|
2986
3019
|
handleDefaultTreeExpand($xeTable);
|
|
3020
|
+
handleDefaultRowGroupExpand($xeTable);
|
|
2987
3021
|
handleDefaultMergeCells($xeTable);
|
|
2988
3022
|
handleDefaultMergeFooterItems($xeTable);
|
|
2989
3023
|
$xeTable.$nextTick(() => setTimeout(() => $xeTable.recalculate()));
|
|
@@ -5217,7 +5251,7 @@ const Methods = {
|
|
|
5217
5251
|
evnt.preventDefault();
|
|
5218
5252
|
const { column } = params;
|
|
5219
5253
|
const { columnStore, overflowX, scrollbarHeight } = reactData;
|
|
5220
|
-
const {
|
|
5254
|
+
const { visibleColumn } = internalData;
|
|
5221
5255
|
const { leftList, rightList } = columnStore;
|
|
5222
5256
|
const resizableOpts = $xeTable.computeResizableOpts;
|
|
5223
5257
|
const osbHeight = overflowX ? scrollbarHeight : 0;
|
|
@@ -5235,24 +5269,29 @@ const Methods = {
|
|
|
5235
5269
|
const { clientX: dragClientX } = evnt;
|
|
5236
5270
|
const dragBtnElem = evnt.target;
|
|
5237
5271
|
let resizeColumn = column;
|
|
5238
|
-
|
|
5272
|
+
const isDragGroupCol = column.children && column.children.length;
|
|
5273
|
+
if (isDragGroupCol) {
|
|
5239
5274
|
XEUtils.eachTree(column.children, childColumn => {
|
|
5240
5275
|
resizeColumn = childColumn;
|
|
5241
5276
|
});
|
|
5242
5277
|
}
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5278
|
+
let cell = dragBtnElem.parentElement;
|
|
5279
|
+
if (isDragGroupCol) {
|
|
5280
|
+
const trEl = cell ? cell.parentElement : null;
|
|
5281
|
+
const theadEl = trEl ? trEl.parentElement : null;
|
|
5282
|
+
cell = theadEl ? theadEl.querySelector(`.vxe-header--column[colid="${resizeColumn.id}"]`) : null;
|
|
5283
|
+
}
|
|
5284
|
+
if (!cell) {
|
|
5248
5285
|
return;
|
|
5249
5286
|
}
|
|
5287
|
+
const cellParams = XEUtils.assign(params, { cell });
|
|
5288
|
+
let dragLeft = 0;
|
|
5250
5289
|
const tableRect = tableEl.getBoundingClientRect();
|
|
5251
5290
|
const rightContainerRect = rightContainerElem ? rightContainerElem.getBoundingClientRect() : null;
|
|
5252
5291
|
const cellRect = cell.getBoundingClientRect();
|
|
5253
5292
|
const dragBtnRect = dragBtnElem.getBoundingClientRect();
|
|
5254
5293
|
const dragBtnWidth = dragBtnElem.clientWidth;
|
|
5255
|
-
const dragBtnOffsetWidth =
|
|
5294
|
+
const dragBtnOffsetWidth = XEUtils.floor(dragBtnWidth / 2);
|
|
5256
5295
|
const dragPosLeft = dragBtnRect.x - tableRect.x + dragBtnOffsetWidth;
|
|
5257
5296
|
const minInterval = getColReMinWidth(cellParams) - dragBtnOffsetWidth; // 列之间的最小间距
|
|
5258
5297
|
const dragMinLeft = isRightFixed ? 0 : (cellRect.x - tableRect.x + dragBtnWidth + minInterval);
|
|
@@ -8670,8 +8709,7 @@ const Methods = {
|
|
|
8670
8709
|
},
|
|
8671
8710
|
setSort(sortConfs, isUpdate) {
|
|
8672
8711
|
const $xeTable = this;
|
|
8673
|
-
|
|
8674
|
-
return handleSortEvent($xeTable, new Event('click'), sortConfs, isUpdate);
|
|
8712
|
+
return handleSortEvent($xeTable, null, sortConfs, isUpdate);
|
|
8675
8713
|
},
|
|
8676
8714
|
setSortByEvent(evnt, sortConfs, isUpdate) {
|
|
8677
8715
|
const $xeTable = this;
|
|
@@ -10201,8 +10239,6 @@ const Methods = {
|
|
|
10201
10239
|
},
|
|
10202
10240
|
/**
|
|
10203
10241
|
* 如果有滚动条,则滚动到对应的位置
|
|
10204
|
-
* @param {Number} scrollLeft 左距离
|
|
10205
|
-
* @param {Number} scrollTop 上距离
|
|
10206
10242
|
*/
|
|
10207
10243
|
scrollTo(scrollLeft, scrollTop) {
|
|
10208
10244
|
const $xeTable = this;
|
|
@@ -10217,6 +10253,12 @@ const Methods = {
|
|
|
10217
10253
|
const xHandleEl = $xeTable.$refs.refScrollXHandleElem;
|
|
10218
10254
|
const yHandleEl = $xeTable.$refs.refScrollYHandleElem;
|
|
10219
10255
|
internalData.intoRunScroll = true;
|
|
10256
|
+
if (scrollLeft) {
|
|
10257
|
+
if (!XEUtils.isNumber(scrollLeft)) {
|
|
10258
|
+
scrollTop = scrollLeft.top;
|
|
10259
|
+
scrollLeft = scrollLeft.left;
|
|
10260
|
+
}
|
|
10261
|
+
}
|
|
10220
10262
|
if (XEUtils.isNumber(scrollLeft)) {
|
|
10221
10263
|
setScrollLeft(xHandleEl, scrollLeft);
|
|
10222
10264
|
setScrollLeft(bodyScrollElem, scrollLeft);
|
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.17.0-beta.
|
|
2005
|
+
const version = "3.17.0-beta.2";
|
|
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.17.0-beta.
|
|
2670
|
+
const log_version = `table v${"3.17.0-beta.2"}`;
|
|
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
|
|
@@ -2690,6 +2690,10 @@ class ColumnInfo {
|
|
|
2690
2690
|
} = {}) {
|
|
2691
2691
|
const tableProps = $xeTable;
|
|
2692
2692
|
const $xeGrid = $xeTable.$xeGrid;
|
|
2693
|
+
const {
|
|
2694
|
+
field,
|
|
2695
|
+
editRender
|
|
2696
|
+
} = _vm;
|
|
2693
2697
|
const proxyOpts = $xeGrid ? $xeGrid.computeProxyOpts : null;
|
|
2694
2698
|
const formatter = _vm.formatter;
|
|
2695
2699
|
const visible = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(_vm.visible) ? _vm.visible : true;
|
|
@@ -2735,11 +2739,19 @@ class ColumnInfo {
|
|
|
2735
2739
|
errLog('vxe.error.errProp', [`column.agg-func=${_vm.aggFunc}`, 'column.agg-func=true']);
|
|
2736
2740
|
}
|
|
2737
2741
|
}
|
|
2742
|
+
if (field && editRender) {
|
|
2743
|
+
if (editRender.startField && `${editRender.startField}`.indexOf(field) >= 0) {
|
|
2744
|
+
errLog('vxe.error.modelConflicts', [`field=${field}`, `edit-render.startField=${editRender.startField}`]);
|
|
2745
|
+
}
|
|
2746
|
+
if (editRender.endField && `${editRender.endField}`.indexOf(field) >= 0) {
|
|
2747
|
+
errLog('vxe.error.modelConflicts', [`field=${field}`, `edit-render.endField=${editRender.endField}`]);
|
|
2748
|
+
}
|
|
2749
|
+
}
|
|
2738
2750
|
Object.assign(this, {
|
|
2739
2751
|
// 基本属性
|
|
2740
2752
|
type: _vm.type,
|
|
2741
2753
|
property: _vm.field,
|
|
2742
|
-
field:
|
|
2754
|
+
field: field,
|
|
2743
2755
|
title: _vm.title,
|
|
2744
2756
|
width: _vm.width,
|
|
2745
2757
|
minWidth: _vm.minWidth,
|
|
@@ -2776,7 +2788,7 @@ class ColumnInfo {
|
|
|
2776
2788
|
rowResize: _vm.rowResize,
|
|
2777
2789
|
cellType: _vm.cellType,
|
|
2778
2790
|
cellRender: _vm.cellRender,
|
|
2779
|
-
editRender:
|
|
2791
|
+
editRender: editRender,
|
|
2780
2792
|
contentRender: _vm.contentRender,
|
|
2781
2793
|
headerExportMethod: _vm.headerExportMethod,
|
|
2782
2794
|
exportMethod: _vm.exportMethod,
|
|
@@ -5820,6 +5832,38 @@ function handleRowGroupVirtualExpand($xeTable, rows, expanded) {
|
|
|
5820
5832
|
}, 30);
|
|
5821
5833
|
});
|
|
5822
5834
|
}
|
|
5835
|
+
/**
|
|
5836
|
+
* 处理默认展开分组行
|
|
5837
|
+
*/
|
|
5838
|
+
function handleDefaultRowGroupExpand($xeTable) {
|
|
5839
|
+
const reactData = $xeTable;
|
|
5840
|
+
const internalData = $xeTable;
|
|
5841
|
+
const {
|
|
5842
|
+
isRowGroupStatus
|
|
5843
|
+
} = reactData;
|
|
5844
|
+
if (isRowGroupStatus) {
|
|
5845
|
+
const {
|
|
5846
|
+
fullDataRowIdData
|
|
5847
|
+
} = internalData;
|
|
5848
|
+
const aggregateOpts = $xeTable.computeAggregateOpts;
|
|
5849
|
+
const {
|
|
5850
|
+
expandAll,
|
|
5851
|
+
expandRowKeys
|
|
5852
|
+
} = aggregateOpts;
|
|
5853
|
+
if (expandAll) {
|
|
5854
|
+
$xeTable.setAllRowGroupExpand(true);
|
|
5855
|
+
} else if (expandRowKeys) {
|
|
5856
|
+
const defExpandeds = [];
|
|
5857
|
+
expandRowKeys.forEach(rowid => {
|
|
5858
|
+
const rowRest = fullDataRowIdData[rowid];
|
|
5859
|
+
if (rowRest) {
|
|
5860
|
+
defExpandeds.push(rowRest.row);
|
|
5861
|
+
}
|
|
5862
|
+
});
|
|
5863
|
+
$xeTable.setRowGroupExpand(defExpandeds, true);
|
|
5864
|
+
}
|
|
5865
|
+
}
|
|
5866
|
+
}
|
|
5823
5867
|
function updateAfterListIndex($xeTable) {
|
|
5824
5868
|
const props = $xeTable;
|
|
5825
5869
|
const internalData = $xeTable;
|
|
@@ -8727,6 +8771,13 @@ function loadTableData($xeTable, datas, isReset) {
|
|
|
8727
8771
|
}
|
|
8728
8772
|
reactData.isRowLoading = false;
|
|
8729
8773
|
handleRecalculateStyle($xeTable, false, false, false);
|
|
8774
|
+
// 如果是自动行高,特殊情况需调用 recalculate 手动刷新
|
|
8775
|
+
if (!props.showOverflow) {
|
|
8776
|
+
setTimeout(() => {
|
|
8777
|
+
handleLazyRecalculate($xeTable, false, true, true);
|
|
8778
|
+
setTimeout(() => handleLazyRecalculate($xeTable, false, true, true), 3000);
|
|
8779
|
+
}, 2000);
|
|
8780
|
+
}
|
|
8730
8781
|
// 是否变更虚拟滚动
|
|
8731
8782
|
if (oldScrollYLoad === sYLoad) {
|
|
8732
8783
|
restoreScrollLocation($xeTable, targetScrollLeft, targetScrollTop).then(() => {
|
|
@@ -8756,6 +8807,7 @@ function handleLoadDefaults($xeTable) {
|
|
|
8756
8807
|
handleDefaultRadioChecked($xeTable);
|
|
8757
8808
|
handleDefaultRowExpand($xeTable);
|
|
8758
8809
|
handleDefaultTreeExpand($xeTable);
|
|
8810
|
+
handleDefaultRowGroupExpand($xeTable);
|
|
8759
8811
|
handleDefaultMergeCells($xeTable);
|
|
8760
8812
|
handleDefaultMergeFooterItems($xeTable);
|
|
8761
8813
|
$xeTable.$nextTick(() => setTimeout(() => $xeTable.recalculate()));
|
|
@@ -11331,7 +11383,6 @@ const Methods = {
|
|
|
11331
11383
|
scrollbarHeight
|
|
11332
11384
|
} = reactData;
|
|
11333
11385
|
const {
|
|
11334
|
-
elemStore,
|
|
11335
11386
|
visibleColumn
|
|
11336
11387
|
} = internalData;
|
|
11337
11388
|
const {
|
|
@@ -11356,26 +11407,31 @@ const Methods = {
|
|
|
11356
11407
|
} = evnt;
|
|
11357
11408
|
const dragBtnElem = evnt.target;
|
|
11358
11409
|
let resizeColumn = column;
|
|
11359
|
-
|
|
11410
|
+
const isDragGroupCol = column.children && column.children.length;
|
|
11411
|
+
if (isDragGroupCol) {
|
|
11360
11412
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(column.children, childColumn => {
|
|
11361
11413
|
resizeColumn = childColumn;
|
|
11362
11414
|
});
|
|
11363
11415
|
}
|
|
11364
|
-
|
|
11365
|
-
|
|
11416
|
+
let cell = dragBtnElem.parentElement;
|
|
11417
|
+
if (isDragGroupCol) {
|
|
11418
|
+
const trEl = cell ? cell.parentElement : null;
|
|
11419
|
+
const theadEl = trEl ? trEl.parentElement : null;
|
|
11420
|
+
cell = theadEl ? theadEl.querySelector(`.vxe-header--column[colid="${resizeColumn.id}"]`) : null;
|
|
11421
|
+
}
|
|
11422
|
+
if (!cell) {
|
|
11423
|
+
return;
|
|
11424
|
+
}
|
|
11425
|
+
const cellParams = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(params, {
|
|
11366
11426
|
cell
|
|
11367
11427
|
});
|
|
11368
11428
|
let dragLeft = 0;
|
|
11369
|
-
const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
|
|
11370
|
-
if (!bodyScrollElem) {
|
|
11371
|
-
return;
|
|
11372
|
-
}
|
|
11373
11429
|
const tableRect = tableEl.getBoundingClientRect();
|
|
11374
11430
|
const rightContainerRect = rightContainerElem ? rightContainerElem.getBoundingClientRect() : null;
|
|
11375
11431
|
const cellRect = cell.getBoundingClientRect();
|
|
11376
11432
|
const dragBtnRect = dragBtnElem.getBoundingClientRect();
|
|
11377
11433
|
const dragBtnWidth = dragBtnElem.clientWidth;
|
|
11378
|
-
const dragBtnOffsetWidth =
|
|
11434
|
+
const dragBtnOffsetWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(dragBtnWidth / 2);
|
|
11379
11435
|
const dragPosLeft = dragBtnRect.x - tableRect.x + dragBtnOffsetWidth;
|
|
11380
11436
|
const minInterval = getColReMinWidth(cellParams) - dragBtnOffsetWidth; // 列之间的最小间距
|
|
11381
11437
|
const dragMinLeft = isRightFixed ? 0 : cellRect.x - tableRect.x + dragBtnWidth + minInterval;
|
|
@@ -15337,8 +15393,7 @@ const Methods = {
|
|
|
15337
15393
|
},
|
|
15338
15394
|
setSort(sortConfs, isUpdate) {
|
|
15339
15395
|
const $xeTable = this;
|
|
15340
|
-
|
|
15341
|
-
return handleSortEvent($xeTable, new Event('click'), sortConfs, isUpdate);
|
|
15396
|
+
return handleSortEvent($xeTable, null, sortConfs, isUpdate);
|
|
15342
15397
|
},
|
|
15343
15398
|
setSortByEvent(evnt, sortConfs, isUpdate) {
|
|
15344
15399
|
const $xeTable = this;
|
|
@@ -17132,8 +17187,6 @@ const Methods = {
|
|
|
17132
17187
|
},
|
|
17133
17188
|
/**
|
|
17134
17189
|
* 如果有滚动条,则滚动到对应的位置
|
|
17135
|
-
* @param {Number} scrollLeft 左距离
|
|
17136
|
-
* @param {Number} scrollTop 上距离
|
|
17137
17190
|
*/
|
|
17138
17191
|
scrollTo(scrollLeft, scrollTop) {
|
|
17139
17192
|
const $xeTable = this;
|
|
@@ -17150,6 +17203,12 @@ const Methods = {
|
|
|
17150
17203
|
const xHandleEl = $xeTable.$refs.refScrollXHandleElem;
|
|
17151
17204
|
const yHandleEl = $xeTable.$refs.refScrollYHandleElem;
|
|
17152
17205
|
internalData.intoRunScroll = true;
|
|
17206
|
+
if (scrollLeft) {
|
|
17207
|
+
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(scrollLeft)) {
|
|
17208
|
+
scrollTop = scrollLeft.top;
|
|
17209
|
+
scrollLeft = scrollLeft.left;
|
|
17210
|
+
}
|
|
17211
|
+
}
|
|
17153
17212
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(scrollLeft)) {
|
|
17154
17213
|
setScrollLeft(xHandleEl, scrollLeft);
|
|
17155
17214
|
setScrollLeft(bodyScrollElem, scrollLeft);
|
|
@@ -34135,6 +34194,7 @@ const Toolbar = VxeToolbar;
|
|
|
34135
34194
|
groupTag: '分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误',
|
|
34136
34195
|
scrollErrProp: '启用虚拟滚动后不支持该参数 "{0}"',
|
|
34137
34196
|
errConflicts: '参数 "{0}" 与 "{1}" 有冲突',
|
|
34197
|
+
modelConflicts: '绑定的字段值 "{0}" 与 "{1}" 存在冲突,将会出现错误',
|
|
34138
34198
|
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
34139
34199
|
notConflictProp: '当使用 "{0}" 时,应该设置 "{1}",否则可能会存在功能冲突',
|
|
34140
34200
|
unableInsert: '无法插入到指定位置,请检查参数是否正确',
|