vxe-table 3.14.4 → 3.15.0-beta.0
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 +3 -1
- package/es/locale/lang/de-DE.js +3 -1
- package/es/locale/lang/en-US.js +7 -5
- package/es/locale/lang/es-ES.js +3 -1
- package/es/locale/lang/fr-FR.js +3 -1
- package/es/locale/lang/hu-HU.js +3 -1
- package/es/locale/lang/hy-AM.js +3 -1
- package/es/locale/lang/id-ID.js +3 -1
- package/es/locale/lang/it-IT.js +3 -1
- package/es/locale/lang/ja-JP.js +3 -1
- package/es/locale/lang/ko-KR.js +3 -1
- package/es/locale/lang/nb-NO.js +3 -1
- package/es/locale/lang/pt-BR.js +3 -1
- package/es/locale/lang/ru-RU.js +3 -1
- package/es/locale/lang/th-TH.js +3 -1
- package/es/locale/lang/ug-CN.js +3 -1
- package/es/locale/lang/uk-UA.js +3 -1
- package/es/locale/lang/vi-VN.js +3 -1
- package/es/locale/lang/zh-CHT.js +3 -1
- package/es/locale/lang/zh-CN.js +3 -1
- package/es/style.css +1 -1
- package/es/table/module/edit/mixin.js +10 -9
- package/es/table/module/export/export-panel.js +32 -17
- package/es/table/module/export/mixin.js +17 -12
- package/es/table/src/body.js +11 -13
- package/es/table/src/footer.js +3 -16
- package/es/table/src/methods.js +246 -109
- package/es/table/src/table.js +50 -25
- package/es/table/src/util.js +0 -13
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +410 -247
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +3 -1
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +3 -1
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +7 -5
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +7 -5
- package/lib/locale/lang/es-ES.js +3 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +3 -1
- package/lib/locale/lang/fr-FR.js +3 -1
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/hu-HU.js +3 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +3 -1
- package/lib/locale/lang/hy-AM.js +3 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/id-ID.js +3 -1
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/it-IT.js +3 -1
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +3 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +3 -1
- package/lib/locale/lang/ko-KR.js +3 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +3 -1
- package/lib/locale/lang/nb-NO.js +3 -1
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +3 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +3 -1
- package/lib/locale/lang/ru-RU.js +3 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +3 -1
- package/lib/locale/lang/th-TH.js +3 -1
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/ug-CN.js +3 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +3 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +3 -1
- package/lib/locale/lang/vi-VN.js +3 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +3 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +3 -1
- package/lib/locale/lang/zh-CN.js +3 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +3 -1
- package/lib/style.css +1 -1
- package/lib/table/module/edit/mixin.js +9 -9
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/export-panel.js +29 -17
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +18 -12
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/src/body.js +14 -15
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/footer.js +4 -27
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/methods.js +278 -114
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +52 -25
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +0 -25
- package/lib/table/src/util.min.js +1 -1
- package/lib/ui/index.js +2 -2
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/ar-EG.ts +3 -1
- package/packages/locale/lang/de-DE.ts +3 -1
- package/packages/locale/lang/en-US.ts +7 -5
- package/packages/locale/lang/es-ES.ts +3 -1
- package/packages/locale/lang/fr-FR.ts +3 -1
- package/packages/locale/lang/hu-HU.ts +3 -1
- package/packages/locale/lang/hy-AM.ts +3 -1
- package/packages/locale/lang/id-ID.ts +3 -1
- package/packages/locale/lang/it-IT.ts +3 -1
- package/packages/locale/lang/ja-JP.ts +3 -1
- package/packages/locale/lang/ko-KR.ts +3 -1
- package/packages/locale/lang/nb-NO.ts +3 -1
- package/packages/locale/lang/pt-BR.ts +3 -1
- package/packages/locale/lang/ru-RU.ts +3 -1
- package/packages/locale/lang/th-TH.ts +3 -1
- package/packages/locale/lang/ug-CN.ts +3 -1
- package/packages/locale/lang/uk-UA.ts +3 -1
- package/packages/locale/lang/vi-VN.ts +3 -1
- package/packages/locale/lang/zh-CHT.ts +3 -1
- package/packages/locale/lang/zh-CN.ts +3 -1
- package/packages/table/module/edit/mixin.ts +10 -9
- package/packages/table/module/export/export-panel.ts +33 -17
- package/packages/table/module/export/mixin.ts +17 -12
- package/packages/table/src/body.ts +11 -13
- package/packages/table/src/footer.ts +3 -17
- package/packages/table/src/methods.ts +261 -119
- package/packages/table/src/table.ts +50 -25
- package/packages/table/src/util.ts +0 -14
- package/packages/ui/index.ts +1 -1
- /package/es/{iconfont.1743393991959.ttf → iconfont.1743578536739.ttf} +0 -0
- /package/es/{iconfont.1743393991959.woff → iconfont.1743578536739.woff} +0 -0
- /package/es/{iconfont.1743393991959.woff2 → iconfont.1743578536739.woff2} +0 -0
- /package/lib/{iconfont.1743393991959.ttf → iconfont.1743578536739.ttf} +0 -0
- /package/lib/{iconfont.1743393991959.woff → iconfont.1743578536739.woff} +0 -0
- /package/lib/{iconfont.1743393991959.woff2 → iconfont.1743578536739.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
|
|
|
2220
2220
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2221
2221
|
|
|
2222
2222
|
|
|
2223
|
-
const version = "3.
|
|
2223
|
+
const version = "3.15.0-beta.0";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2412,7 +2412,7 @@ core_.VxeUI.setConfig({
|
|
|
2412
2412
|
},
|
|
2413
2413
|
virtualXConfig: {
|
|
2414
2414
|
enabled: true,
|
|
2415
|
-
gt:
|
|
2415
|
+
gt: 28,
|
|
2416
2416
|
preSize: 0,
|
|
2417
2417
|
oSize: 1
|
|
2418
2418
|
},
|
|
@@ -2843,7 +2843,7 @@ function isNodeElement(elem) {
|
|
|
2843
2843
|
const {
|
|
2844
2844
|
log: log_log
|
|
2845
2845
|
} = core_.VxeUI;
|
|
2846
|
-
const log_version = `table v${"3.
|
|
2846
|
+
const log_version = `table v${"3.15.0-beta.0"}`;
|
|
2847
2847
|
const warnLog = log_log.create('warn', log_version);
|
|
2848
2848
|
const errLog = log_log.create('error', log_version);
|
|
2849
2849
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -3424,30 +3424,6 @@ function calcTreeLine(params, prevRow) {
|
|
|
3424
3424
|
}
|
|
3425
3425
|
return cellHeight * expandSize - (prevRow ? 1 : 12 - getOffsetSize($table));
|
|
3426
3426
|
}
|
|
3427
|
-
function mergeBodyMethod(mergeList, _rowIndex, _columnIndex) {
|
|
3428
|
-
for (let mIndex = 0; mIndex < mergeList.length; mIndex++) {
|
|
3429
|
-
const {
|
|
3430
|
-
row: mergeRowIndex,
|
|
3431
|
-
col: mergeColIndex,
|
|
3432
|
-
rowspan: mergeRowspan,
|
|
3433
|
-
colspan: mergeColspan
|
|
3434
|
-
} = mergeList[mIndex];
|
|
3435
|
-
if (mergeColIndex > -1 && mergeRowIndex > -1 && mergeRowspan && mergeColspan) {
|
|
3436
|
-
if (mergeRowIndex === _rowIndex && mergeColIndex === _columnIndex) {
|
|
3437
|
-
return {
|
|
3438
|
-
rowspan: mergeRowspan,
|
|
3439
|
-
colspan: mergeColspan
|
|
3440
|
-
};
|
|
3441
|
-
}
|
|
3442
|
-
if (_rowIndex >= mergeRowIndex && _rowIndex < mergeRowIndex + mergeRowspan && _columnIndex >= mergeColIndex && _columnIndex < mergeColIndex + mergeColspan) {
|
|
3443
|
-
return {
|
|
3444
|
-
rowspan: 0,
|
|
3445
|
-
colspan: 0
|
|
3446
|
-
};
|
|
3447
|
-
}
|
|
3448
|
-
}
|
|
3449
|
-
}
|
|
3450
|
-
}
|
|
3451
3427
|
function getCellValue(row, column) {
|
|
3452
3428
|
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
|
|
3453
3429
|
}
|
|
@@ -5451,39 +5427,33 @@ function cacheColumnMap($xeTable) {
|
|
|
5451
5427
|
htmlColumn = column;
|
|
5452
5428
|
}
|
|
5453
5429
|
if (treeNode) {
|
|
5454
|
-
if (
|
|
5455
|
-
|
|
5456
|
-
warnLog('vxe.error.colRepet', ['tree-node', treeNode]);
|
|
5457
|
-
}
|
|
5430
|
+
if (treeNodeColumn) {
|
|
5431
|
+
warnLog('vxe.error.colRepet', ['tree-node', treeNode]);
|
|
5458
5432
|
}
|
|
5459
5433
|
if (!treeNodeColumn) {
|
|
5460
5434
|
treeNodeColumn = column;
|
|
5461
5435
|
}
|
|
5462
5436
|
} else if (type === 'expand') {
|
|
5463
|
-
if (
|
|
5464
|
-
|
|
5465
|
-
warnLog('vxe.error.colRepet', ['type', type]);
|
|
5466
|
-
}
|
|
5437
|
+
if (expandColumn) {
|
|
5438
|
+
warnLog('vxe.error.colRepet', ['type', type]);
|
|
5467
5439
|
}
|
|
5468
5440
|
if (!expandColumn) {
|
|
5469
5441
|
expandColumn = column;
|
|
5470
5442
|
}
|
|
5471
5443
|
}
|
|
5472
|
-
if (
|
|
5473
|
-
if (
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
radioColumn = column;
|
|
5486
|
-
}
|
|
5444
|
+
if (type === 'checkbox') {
|
|
5445
|
+
if (checkboxColumn) {
|
|
5446
|
+
warnLog('vxe.error.colRepet', ['type', type]);
|
|
5447
|
+
}
|
|
5448
|
+
if (!checkboxColumn) {
|
|
5449
|
+
checkboxColumn = column;
|
|
5450
|
+
}
|
|
5451
|
+
} else if (type === 'radio') {
|
|
5452
|
+
if (radioColumn) {
|
|
5453
|
+
warnLog('vxe.error.colRepet', ['type', type]);
|
|
5454
|
+
}
|
|
5455
|
+
if (!radioColumn) {
|
|
5456
|
+
radioColumn = column;
|
|
5487
5457
|
}
|
|
5488
5458
|
}
|
|
5489
5459
|
if (isAllOverflow && column.showOverflow === false) {
|
|
@@ -6678,20 +6648,48 @@ function calculateMergerOffsetIndex(list, offsetItem, type) {
|
|
|
6678
6648
|
}
|
|
6679
6649
|
}
|
|
6680
6650
|
}
|
|
6681
|
-
function
|
|
6682
|
-
|
|
6651
|
+
function buildMergeData(mergeConfigs) {
|
|
6652
|
+
const mergeMaps = {};
|
|
6653
|
+
if (mergeConfigs && mergeConfigs.length) {
|
|
6654
|
+
for (let mIndex = 0; mIndex < mergeConfigs.length; mIndex++) {
|
|
6655
|
+
const {
|
|
6656
|
+
row: _rowIndex,
|
|
6657
|
+
col: _columnIndex,
|
|
6658
|
+
rowspan: mergeRowspan,
|
|
6659
|
+
colspan: mergeColspan
|
|
6660
|
+
} = mergeConfigs[mIndex];
|
|
6661
|
+
for (let i = 0; i < mergeRowspan; i++) {
|
|
6662
|
+
for (let j = 0; j < mergeColspan; j++) {
|
|
6663
|
+
mergeMaps[`${_rowIndex + i}:${_columnIndex + j}`] = !i && !j ? {
|
|
6664
|
+
rowspan: mergeRowspan,
|
|
6665
|
+
colspan: mergeColspan
|
|
6666
|
+
} : {
|
|
6667
|
+
rowspan: 0,
|
|
6668
|
+
colspan: 0
|
|
6669
|
+
};
|
|
6670
|
+
}
|
|
6671
|
+
}
|
|
6672
|
+
}
|
|
6673
|
+
}
|
|
6674
|
+
return mergeMaps;
|
|
6675
|
+
}
|
|
6676
|
+
const handleBodyMerge = ($xeTable, merges) => {
|
|
6683
6677
|
const internalData = $xeTable;
|
|
6678
|
+
const {
|
|
6679
|
+
fullAllDataRowIdData,
|
|
6680
|
+
fullColumnIdData,
|
|
6681
|
+
visibleColumn,
|
|
6682
|
+
afterFullData,
|
|
6683
|
+
mergeBodyList,
|
|
6684
|
+
mergeBodyMaps
|
|
6685
|
+
} = internalData;
|
|
6684
6686
|
if (merges) {
|
|
6685
|
-
// const { treeConfig } = props
|
|
6686
6687
|
const {
|
|
6687
|
-
|
|
6688
|
-
} =
|
|
6688
|
+
handleGetRowId
|
|
6689
|
+
} = createHandleGetRowId($xeTable);
|
|
6689
6690
|
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(merges)) {
|
|
6690
6691
|
merges = [merges];
|
|
6691
6692
|
}
|
|
6692
|
-
// if (treeConfig && merges.length) {
|
|
6693
|
-
// errLog('vxe.error.noTree', ['merge-cells | merge-footer-items'])
|
|
6694
|
-
// }
|
|
6695
6693
|
merges.forEach(item => {
|
|
6696
6694
|
let {
|
|
6697
6695
|
row,
|
|
@@ -6699,42 +6697,117 @@ function setMerges($xeTable, merges, mList, rowList) {
|
|
|
6699
6697
|
rowspan,
|
|
6700
6698
|
colspan
|
|
6701
6699
|
} = item;
|
|
6702
|
-
|
|
6703
|
-
|
|
6700
|
+
let mergeRowIndex = -1;
|
|
6701
|
+
let mergeColumnIndex = -1;
|
|
6702
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(row)) {
|
|
6703
|
+
mergeRowIndex = row;
|
|
6704
|
+
} else {
|
|
6705
|
+
const rowid = row ? handleGetRowId(row) : null;
|
|
6706
|
+
const rowRest = rowid ? fullAllDataRowIdData[rowid] : null;
|
|
6707
|
+
if (rowRest) {
|
|
6708
|
+
mergeRowIndex = rowRest._index;
|
|
6709
|
+
}
|
|
6704
6710
|
}
|
|
6705
6711
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(col)) {
|
|
6706
|
-
|
|
6712
|
+
mergeColumnIndex = col;
|
|
6713
|
+
} else {
|
|
6714
|
+
const colid = col ? col.id : null;
|
|
6715
|
+
const colRest = colid ? fullColumnIdData[colid] : null;
|
|
6716
|
+
if (colRest) {
|
|
6717
|
+
mergeColumnIndex = colRest._index;
|
|
6718
|
+
}
|
|
6707
6719
|
}
|
|
6708
|
-
if (
|
|
6720
|
+
if (mergeRowIndex > -1 && mergeColumnIndex > -1 && (rowspan || colspan)) {
|
|
6709
6721
|
rowspan = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(rowspan) || 1;
|
|
6710
6722
|
colspan = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(colspan) || 1;
|
|
6711
6723
|
if (rowspan > 1 || colspan > 1) {
|
|
6712
|
-
const
|
|
6713
|
-
const
|
|
6724
|
+
const row = afterFullData[mergeRowIndex];
|
|
6725
|
+
const column = visibleColumn[mergeColumnIndex];
|
|
6726
|
+
let mergeItem = mergeBodyMaps[`${mergeRowIndex}:${mergeColumnIndex}`];
|
|
6714
6727
|
if (mergeItem) {
|
|
6715
6728
|
mergeItem.rowspan = rowspan;
|
|
6716
6729
|
mergeItem.colspan = colspan;
|
|
6717
6730
|
mergeItem._rowspan = rowspan;
|
|
6718
6731
|
mergeItem._colspan = colspan;
|
|
6719
6732
|
} else {
|
|
6720
|
-
|
|
6721
|
-
const mergeColIndex = visibleColumn.indexOf(col);
|
|
6722
|
-
mList.push({
|
|
6733
|
+
mergeItem = {
|
|
6723
6734
|
row: mergeRowIndex,
|
|
6724
|
-
col:
|
|
6735
|
+
col: mergeColumnIndex,
|
|
6725
6736
|
rowspan,
|
|
6726
6737
|
colspan,
|
|
6727
6738
|
_row: row,
|
|
6728
|
-
_col:
|
|
6739
|
+
_col: column,
|
|
6729
6740
|
_rowspan: rowspan,
|
|
6730
6741
|
_colspan: colspan
|
|
6731
|
-
}
|
|
6742
|
+
};
|
|
6743
|
+
mergeBodyMaps[`${mergeRowIndex}:${mergeColumnIndex}`] = mergeItem;
|
|
6744
|
+
mergeBodyList.push(mergeItem);
|
|
6732
6745
|
}
|
|
6733
6746
|
}
|
|
6734
6747
|
}
|
|
6735
6748
|
});
|
|
6736
6749
|
}
|
|
6737
|
-
}
|
|
6750
|
+
};
|
|
6751
|
+
const handleFooterMerge = ($xeTable, merges) => {
|
|
6752
|
+
const reactData = $xeTable;
|
|
6753
|
+
const internalData = $xeTable;
|
|
6754
|
+
const {
|
|
6755
|
+
footerTableData
|
|
6756
|
+
} = reactData;
|
|
6757
|
+
const {
|
|
6758
|
+
mergeFooterList,
|
|
6759
|
+
mergeFooterMaps
|
|
6760
|
+
} = internalData;
|
|
6761
|
+
if (merges) {
|
|
6762
|
+
const {
|
|
6763
|
+
visibleColumn
|
|
6764
|
+
} = internalData;
|
|
6765
|
+
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(merges)) {
|
|
6766
|
+
merges = [merges];
|
|
6767
|
+
}
|
|
6768
|
+
merges.forEach(item => {
|
|
6769
|
+
let {
|
|
6770
|
+
row: margeRow,
|
|
6771
|
+
col: margeCol,
|
|
6772
|
+
rowspan,
|
|
6773
|
+
colspan
|
|
6774
|
+
} = item;
|
|
6775
|
+
const mergeRowIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(margeRow) ? margeRow : -1;
|
|
6776
|
+
let mergeColumnIndex = -1;
|
|
6777
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(margeCol)) {
|
|
6778
|
+
mergeColumnIndex = margeCol;
|
|
6779
|
+
}
|
|
6780
|
+
if (mergeRowIndex > -1 && mergeColumnIndex > -1 && (rowspan || colspan)) {
|
|
6781
|
+
rowspan = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(rowspan) || 1;
|
|
6782
|
+
colspan = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(colspan) || 1;
|
|
6783
|
+
if (rowspan > 1 || colspan > 1) {
|
|
6784
|
+
const row = footerTableData[mergeRowIndex];
|
|
6785
|
+
const column = visibleColumn[mergeColumnIndex];
|
|
6786
|
+
let mergeItem = mergeFooterMaps[`${mergeRowIndex}:${mergeColumnIndex}`];
|
|
6787
|
+
if (mergeItem) {
|
|
6788
|
+
mergeItem.rowspan = rowspan;
|
|
6789
|
+
mergeItem.colspan = colspan;
|
|
6790
|
+
mergeItem._rowspan = rowspan;
|
|
6791
|
+
mergeItem._colspan = colspan;
|
|
6792
|
+
} else {
|
|
6793
|
+
mergeItem = {
|
|
6794
|
+
row: mergeRowIndex,
|
|
6795
|
+
col: mergeColumnIndex,
|
|
6796
|
+
rowspan,
|
|
6797
|
+
colspan,
|
|
6798
|
+
_row: row,
|
|
6799
|
+
_col: column,
|
|
6800
|
+
_rowspan: rowspan,
|
|
6801
|
+
_colspan: colspan
|
|
6802
|
+
};
|
|
6803
|
+
mergeFooterMaps[`${mergeRowIndex}:${mergeColumnIndex}`] = mergeItem;
|
|
6804
|
+
mergeFooterList.push(mergeItem);
|
|
6805
|
+
}
|
|
6806
|
+
}
|
|
6807
|
+
}
|
|
6808
|
+
});
|
|
6809
|
+
}
|
|
6810
|
+
};
|
|
6738
6811
|
function removeMerges($xeTable, merges, mList, rowList) {
|
|
6739
6812
|
// const props = $xeTable
|
|
6740
6813
|
const internalData = $xeTable;
|
|
@@ -7469,11 +7542,11 @@ function loadScrollXData($xeTable) {
|
|
|
7469
7542
|
const reactData = $xeTable;
|
|
7470
7543
|
const internalData = $xeTable;
|
|
7471
7544
|
const {
|
|
7472
|
-
mergeList,
|
|
7473
|
-
mergeFooterList,
|
|
7474
7545
|
isScrollXBig
|
|
7475
7546
|
} = reactData;
|
|
7476
7547
|
const {
|
|
7548
|
+
mergeBodyList,
|
|
7549
|
+
mergeFooterList,
|
|
7477
7550
|
scrollXStore
|
|
7478
7551
|
} = internalData;
|
|
7479
7552
|
const {
|
|
@@ -7492,7 +7565,7 @@ function loadScrollXData($xeTable) {
|
|
|
7492
7565
|
};
|
|
7493
7566
|
scrollXStore.visibleStartIndex = toVisibleIndex - 1;
|
|
7494
7567
|
scrollXStore.visibleEndIndex = toVisibleIndex + visibleSize + 1;
|
|
7495
|
-
calculateMergerOffsetIndex(
|
|
7568
|
+
calculateMergerOffsetIndex(mergeBodyList.concat(mergeFooterList), offsetItem, 'col');
|
|
7496
7569
|
const {
|
|
7497
7570
|
startIndex: offsetStartIndex,
|
|
7498
7571
|
endIndex: offsetEndIndex
|
|
@@ -7717,11 +7790,11 @@ function loadScrollYData($xeTable) {
|
|
|
7717
7790
|
const reactData = $xeTable;
|
|
7718
7791
|
const internalData = $xeTable;
|
|
7719
7792
|
const {
|
|
7720
|
-
mergeList,
|
|
7721
7793
|
isAllOverflow,
|
|
7722
7794
|
isScrollYBig
|
|
7723
7795
|
} = reactData;
|
|
7724
7796
|
const {
|
|
7797
|
+
mergeBodyList,
|
|
7725
7798
|
scrollYStore
|
|
7726
7799
|
} = internalData;
|
|
7727
7800
|
const {
|
|
@@ -7741,7 +7814,7 @@ function loadScrollYData($xeTable) {
|
|
|
7741
7814
|
};
|
|
7742
7815
|
scrollYStore.visibleStartIndex = toVisibleIndex - 1;
|
|
7743
7816
|
scrollYStore.visibleEndIndex = toVisibleIndex + visibleSize + 1;
|
|
7744
|
-
calculateMergerOffsetIndex(
|
|
7817
|
+
calculateMergerOffsetIndex(mergeBodyList, offsetItem, 'row');
|
|
7745
7818
|
const {
|
|
7746
7819
|
startIndex: offsetStartIndex,
|
|
7747
7820
|
endIndex: offsetEndIndex
|
|
@@ -8175,7 +8248,7 @@ const Methods = {
|
|
|
8175
8248
|
* 对于某些特殊的场景,比如深层树节点元素发生变动时可能会用到
|
|
8176
8249
|
*/
|
|
8177
8250
|
syncData() {
|
|
8178
|
-
|
|
8251
|
+
errLog('vxe.error.delFunc', ['syncData', 'getData']);
|
|
8179
8252
|
return this.$nextTick().then(() => {
|
|
8180
8253
|
this.tableData = [];
|
|
8181
8254
|
return this.$nextTick().then(() => this.loadTableData(this.tableFullData, true));
|
|
@@ -8186,38 +8259,43 @@ const Methods = {
|
|
|
8186
8259
|
* 对于手动更改了排序、筛选...等条件后需要重新处理数据时可能会用到
|
|
8187
8260
|
*/
|
|
8188
8261
|
updateData() {
|
|
8262
|
+
const $xeTable = this;
|
|
8263
|
+
const reactData = $xeTable;
|
|
8189
8264
|
const {
|
|
8190
8265
|
scrollXLoad,
|
|
8191
8266
|
scrollYLoad
|
|
8192
|
-
} =
|
|
8193
|
-
return
|
|
8194
|
-
|
|
8267
|
+
} = reactData;
|
|
8268
|
+
return $xeTable.handleTableData(true).then(() => {
|
|
8269
|
+
$xeTable.updateFooter();
|
|
8195
8270
|
if (scrollXLoad || scrollYLoad) {
|
|
8196
8271
|
if (scrollXLoad) {
|
|
8197
|
-
|
|
8272
|
+
$xeTable.updateScrollXSpace();
|
|
8198
8273
|
}
|
|
8199
8274
|
if (scrollYLoad) {
|
|
8200
|
-
|
|
8275
|
+
$xeTable.updateScrollYSpace();
|
|
8201
8276
|
}
|
|
8202
|
-
return
|
|
8277
|
+
return $xeTable.refreshScroll();
|
|
8203
8278
|
}
|
|
8204
8279
|
}).then(() => {
|
|
8205
|
-
|
|
8206
|
-
return
|
|
8280
|
+
$xeTable.updateCellAreas();
|
|
8281
|
+
return $xeTable.recalculate(true);
|
|
8207
8282
|
}).then(() => {
|
|
8208
8283
|
// 存在滚动行为未结束情况
|
|
8209
|
-
setTimeout(() =>
|
|
8284
|
+
setTimeout(() => $xeTable.recalculate(), 50);
|
|
8210
8285
|
});
|
|
8211
8286
|
},
|
|
8212
8287
|
handleTableData(force) {
|
|
8213
8288
|
const $xeTable = this;
|
|
8289
|
+
const reactData = $xeTable;
|
|
8290
|
+
const internalData = $xeTable;
|
|
8291
|
+
const {
|
|
8292
|
+
scrollYLoad
|
|
8293
|
+
} = reactData;
|
|
8214
8294
|
const {
|
|
8215
|
-
scrollYLoad,
|
|
8216
8295
|
scrollYStore,
|
|
8217
|
-
fullDataRowIdData
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
let fullList = afterFullData;
|
|
8296
|
+
fullDataRowIdData
|
|
8297
|
+
} = internalData;
|
|
8298
|
+
let fullList = internalData.afterFullData;
|
|
8221
8299
|
// 是否进行数据处理
|
|
8222
8300
|
if (force) {
|
|
8223
8301
|
// 更新数据,处理筛选和排序
|
|
@@ -8226,14 +8304,17 @@ const Methods = {
|
|
|
8226
8304
|
fullList = handleVirtualTreeToList($xeTable);
|
|
8227
8305
|
}
|
|
8228
8306
|
const tableData = scrollYLoad ? fullList.slice(scrollYStore.startIndex, scrollYStore.endIndex) : fullList.slice(0);
|
|
8307
|
+
const visibleDataRowIdMaps = {};
|
|
8229
8308
|
tableData.forEach((row, $index) => {
|
|
8230
8309
|
const rowid = getRowid(this, row);
|
|
8231
8310
|
const rest = fullDataRowIdData[rowid];
|
|
8232
8311
|
if (rest) {
|
|
8233
8312
|
rest.$index = $index;
|
|
8234
8313
|
}
|
|
8314
|
+
visibleDataRowIdMaps[rowid] = row;
|
|
8235
8315
|
});
|
|
8236
8316
|
this.tableData = tableData;
|
|
8317
|
+
internalData.visibleDataRowIdData = visibleDataRowIdMaps;
|
|
8237
8318
|
return this.$nextTick();
|
|
8238
8319
|
},
|
|
8239
8320
|
/**
|
|
@@ -8259,6 +8340,7 @@ const Methods = {
|
|
|
8259
8340
|
lastScrollTop
|
|
8260
8341
|
} = internalData;
|
|
8261
8342
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
8343
|
+
const expandOpts = $xeTable.computeExpandOpts;
|
|
8262
8344
|
const {
|
|
8263
8345
|
transform
|
|
8264
8346
|
} = treeOpts;
|
|
@@ -8317,7 +8399,7 @@ const Methods = {
|
|
|
8317
8399
|
internalData.tableFullData = fullData;
|
|
8318
8400
|
internalData.tableFullTreeData = treeData;
|
|
8319
8401
|
// 缓存数据
|
|
8320
|
-
$xeTable.cacheRowMap(
|
|
8402
|
+
$xeTable.cacheRowMap(isReset);
|
|
8321
8403
|
// 原始数据
|
|
8322
8404
|
internalData.tableSynchData = datas;
|
|
8323
8405
|
if (isReset) {
|
|
@@ -8335,6 +8417,7 @@ const Methods = {
|
|
|
8335
8417
|
$xeTable.clearMergeFooterItems();
|
|
8336
8418
|
$xeTable.handleTableData(true);
|
|
8337
8419
|
$xeTable.updateFooter();
|
|
8420
|
+
$xeTable.handleUpdateBodyMerge();
|
|
8338
8421
|
return $xeTable.$nextTick().then(() => {
|
|
8339
8422
|
updateHeight($xeTable);
|
|
8340
8423
|
updateStyle($xeTable);
|
|
@@ -8346,6 +8429,9 @@ const Methods = {
|
|
|
8346
8429
|
scrollYStore.endIndex = scrollYStore.visibleSize;
|
|
8347
8430
|
}
|
|
8348
8431
|
if (sYLoad) {
|
|
8432
|
+
if (reactData.expandColumn && expandOpts.mode !== 'fixed') {
|
|
8433
|
+
errLog('vxe.error.notConflictProp', ['column.type="expand', 'expand-config.mode="fixed"']);
|
|
8434
|
+
}
|
|
8349
8435
|
// if (showOverflow) {
|
|
8350
8436
|
// if (!rowOpts.height) {
|
|
8351
8437
|
// const errColumn = internalData.tableFullColumn.find((column: any) => column.showOverflow === false)
|
|
@@ -8508,7 +8594,7 @@ const Methods = {
|
|
|
8508
8594
|
/**
|
|
8509
8595
|
* 更新数据行的 Map
|
|
8510
8596
|
*/
|
|
8511
|
-
cacheRowMap() {
|
|
8597
|
+
cacheRowMap(isReset) {
|
|
8512
8598
|
const $xeTable = this;
|
|
8513
8599
|
const props = $xeTable;
|
|
8514
8600
|
const reactData = $xeTable;
|
|
@@ -8528,7 +8614,7 @@ const Methods = {
|
|
|
8528
8614
|
const {
|
|
8529
8615
|
lazy
|
|
8530
8616
|
} = treeOpts;
|
|
8531
|
-
const fullAllDataRowIdMaps = {
|
|
8617
|
+
const fullAllDataRowIdMaps = isReset ? {} : {
|
|
8532
8618
|
...fullAllDataRowIdData
|
|
8533
8619
|
}; // 存在已删除数据
|
|
8534
8620
|
const fullDataRowIdMaps = {};
|
|
@@ -9384,10 +9470,14 @@ const Methods = {
|
|
|
9384
9470
|
getCheckboxRecords(isFull) {
|
|
9385
9471
|
const $xeTable = this;
|
|
9386
9472
|
const props = $xeTable;
|
|
9473
|
+
const reactData = $xeTable;
|
|
9387
9474
|
const internalData = $xeTable;
|
|
9388
9475
|
const {
|
|
9389
9476
|
treeConfig
|
|
9390
9477
|
} = props;
|
|
9478
|
+
const {
|
|
9479
|
+
updateCheckboxFlag
|
|
9480
|
+
} = reactData;
|
|
9391
9481
|
const {
|
|
9392
9482
|
tableFullData,
|
|
9393
9483
|
afterFullData,
|
|
@@ -9408,28 +9498,30 @@ const Methods = {
|
|
|
9408
9498
|
} = checkboxOpts;
|
|
9409
9499
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
9410
9500
|
let rowList = [];
|
|
9411
|
-
if (
|
|
9412
|
-
if (
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
const currTableData = isFull ? tableFullData : afterFullData;
|
|
9419
|
-
rowList = currTableData.filter(row => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField));
|
|
9420
|
-
}
|
|
9421
|
-
} else {
|
|
9422
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(selectCheckboxMaps, (row, rowid) => {
|
|
9423
|
-
if (isFull) {
|
|
9424
|
-
if (fullDataRowIdData[rowid]) {
|
|
9425
|
-
rowList.push(fullDataRowIdData[rowid].row);
|
|
9426
|
-
}
|
|
9501
|
+
if (updateCheckboxFlag) {
|
|
9502
|
+
if (checkField) {
|
|
9503
|
+
if (treeConfig) {
|
|
9504
|
+
const currTableData = isFull ? transform ? tableFullTreeData : tableFullData : transform ? afterTreeFullData : afterFullData;
|
|
9505
|
+
rowList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().filterTree(currTableData, row => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField), {
|
|
9506
|
+
children: transform ? mapChildrenField : childrenField
|
|
9507
|
+
});
|
|
9427
9508
|
} else {
|
|
9428
|
-
|
|
9429
|
-
|
|
9430
|
-
}
|
|
9509
|
+
const currTableData = isFull ? tableFullData : afterFullData;
|
|
9510
|
+
rowList = currTableData.filter(row => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField));
|
|
9431
9511
|
}
|
|
9432
|
-
}
|
|
9512
|
+
} else {
|
|
9513
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(selectCheckboxMaps, (row, rowid) => {
|
|
9514
|
+
if (isFull) {
|
|
9515
|
+
if (fullDataRowIdData[rowid]) {
|
|
9516
|
+
rowList.push(fullDataRowIdData[rowid].row);
|
|
9517
|
+
}
|
|
9518
|
+
} else {
|
|
9519
|
+
if (afterFullRowMaps[rowid]) {
|
|
9520
|
+
rowList.push(afterFullRowMaps[rowid]);
|
|
9521
|
+
}
|
|
9522
|
+
}
|
|
9523
|
+
});
|
|
9524
|
+
}
|
|
9433
9525
|
}
|
|
9434
9526
|
return rowList;
|
|
9435
9527
|
},
|
|
@@ -11538,6 +11630,29 @@ const Methods = {
|
|
|
11538
11630
|
this.updateCellAreas();
|
|
11539
11631
|
this.recalculate(true);
|
|
11540
11632
|
},
|
|
11633
|
+
/**
|
|
11634
|
+
* 处理合并
|
|
11635
|
+
*/
|
|
11636
|
+
handleUpdateBodyMerge() {
|
|
11637
|
+
const $xeTable = this;
|
|
11638
|
+
const reactData = $xeTable;
|
|
11639
|
+
const internalData = $xeTable;
|
|
11640
|
+
const {
|
|
11641
|
+
mergeBodyList
|
|
11642
|
+
} = internalData;
|
|
11643
|
+
internalData.mergeBodyCellMaps = buildMergeData(mergeBodyList);
|
|
11644
|
+
reactData.mergeBodyFlag++;
|
|
11645
|
+
},
|
|
11646
|
+
handleUpdateFooterMerge() {
|
|
11647
|
+
const $xeTable = this;
|
|
11648
|
+
const reactData = $xeTable;
|
|
11649
|
+
const internalData = $xeTable;
|
|
11650
|
+
const {
|
|
11651
|
+
mergeFooterList
|
|
11652
|
+
} = internalData;
|
|
11653
|
+
internalData.mergeFooterCellMaps = buildMergeData(mergeFooterList);
|
|
11654
|
+
reactData.mergeFootFlag++;
|
|
11655
|
+
},
|
|
11541
11656
|
handleTargetLeaveEvent() {
|
|
11542
11657
|
const $xeTable = this;
|
|
11543
11658
|
const internalData = $xeTable;
|
|
@@ -15727,26 +15842,33 @@ const Methods = {
|
|
|
15727
15842
|
*/
|
|
15728
15843
|
updateFooter() {
|
|
15729
15844
|
const $xeTable = this;
|
|
15845
|
+
const props = $xeTable;
|
|
15846
|
+
const reactData = $xeTable;
|
|
15847
|
+
const internalData = $xeTable;
|
|
15730
15848
|
const $xeGrid = $xeTable.$xeGrid;
|
|
15731
15849
|
const {
|
|
15732
15850
|
showFooter,
|
|
15733
|
-
visibleColumn,
|
|
15734
15851
|
footerData,
|
|
15735
15852
|
footerMethod
|
|
15736
|
-
} =
|
|
15853
|
+
} = props;
|
|
15854
|
+
const {
|
|
15855
|
+
visibleColumn,
|
|
15856
|
+
afterFullData
|
|
15857
|
+
} = internalData;
|
|
15737
15858
|
let footData = [];
|
|
15738
15859
|
if (showFooter && footerData && footerData.length) {
|
|
15739
15860
|
footData = footerData.slice(0);
|
|
15740
15861
|
} else if (showFooter && footerMethod) {
|
|
15741
15862
|
footData = visibleColumn.length ? footerMethod({
|
|
15742
15863
|
columns: visibleColumn,
|
|
15743
|
-
data:
|
|
15864
|
+
data: afterFullData,
|
|
15744
15865
|
$table: $xeTable,
|
|
15745
15866
|
$grid: $xeGrid
|
|
15746
15867
|
}) : [];
|
|
15747
15868
|
}
|
|
15748
|
-
|
|
15749
|
-
|
|
15869
|
+
reactData.footerTableData = footData;
|
|
15870
|
+
$xeTable.handleUpdateFooterMerge();
|
|
15871
|
+
return $xeTable.$nextTick();
|
|
15750
15872
|
},
|
|
15751
15873
|
/**
|
|
15752
15874
|
* 更新列状态 updateStatus({ row, column }, cellValue)
|
|
@@ -15771,12 +15893,14 @@ const Methods = {
|
|
|
15771
15893
|
*/
|
|
15772
15894
|
setMergeCells(merges) {
|
|
15773
15895
|
const $xeTable = this;
|
|
15774
|
-
|
|
15896
|
+
const props = $xeTable;
|
|
15897
|
+
if (props.spanMethod) {
|
|
15775
15898
|
errLog('vxe.error.errConflicts', ['merge-cells', 'span-method']);
|
|
15776
15899
|
}
|
|
15777
|
-
|
|
15778
|
-
|
|
15779
|
-
|
|
15900
|
+
handleBodyMerge($xeTable, merges);
|
|
15901
|
+
$xeTable.handleUpdateBodyMerge();
|
|
15902
|
+
return $xeTable.$nextTick().then(() => {
|
|
15903
|
+
$xeTable.updateCellAreas();
|
|
15780
15904
|
return updateStyle($xeTable);
|
|
15781
15905
|
});
|
|
15782
15906
|
},
|
|
@@ -15786,12 +15910,14 @@ const Methods = {
|
|
|
15786
15910
|
*/
|
|
15787
15911
|
removeMergeCells(merges) {
|
|
15788
15912
|
const $xeTable = this;
|
|
15789
|
-
|
|
15913
|
+
const props = $xeTable;
|
|
15914
|
+
const internalData = $xeTable;
|
|
15915
|
+
if (props.spanMethod) {
|
|
15790
15916
|
errLog('vxe.error.errConflicts', ['merge-cells', 'span-method']);
|
|
15791
15917
|
}
|
|
15792
|
-
const rest = removeMerges(
|
|
15793
|
-
return
|
|
15794
|
-
|
|
15918
|
+
const rest = removeMerges($xeTable, merges, internalData.mergeBodyList, internalData.afterFullData);
|
|
15919
|
+
return $xeTable.$nextTick().then(() => {
|
|
15920
|
+
$xeTable.updateCellAreas();
|
|
15795
15921
|
updateStyle($xeTable);
|
|
15796
15922
|
return rest;
|
|
15797
15923
|
});
|
|
@@ -15800,37 +15926,46 @@ const Methods = {
|
|
|
15800
15926
|
* 获取所有被合并的单元格
|
|
15801
15927
|
*/
|
|
15802
15928
|
getMergeCells() {
|
|
15803
|
-
|
|
15929
|
+
const $xeTable = this;
|
|
15930
|
+
const internalData = $xeTable;
|
|
15931
|
+
return internalData.mergeBodyList.slice(0);
|
|
15804
15932
|
},
|
|
15805
15933
|
/**
|
|
15806
15934
|
* 清除所有单元格合并
|
|
15807
15935
|
*/
|
|
15808
15936
|
clearMergeCells() {
|
|
15809
15937
|
const $xeTable = this;
|
|
15810
|
-
|
|
15811
|
-
|
|
15938
|
+
const internalData = $xeTable;
|
|
15939
|
+
internalData.mergeBodyList = [];
|
|
15940
|
+
internalData.mergeBodyMaps = {};
|
|
15941
|
+
internalData.mergeBodyCellMaps = {};
|
|
15942
|
+
return $xeTable.$nextTick().then(() => {
|
|
15812
15943
|
return updateStyle($xeTable);
|
|
15813
15944
|
});
|
|
15814
15945
|
},
|
|
15815
15946
|
setMergeFooterItems(merges) {
|
|
15816
15947
|
const $xeTable = this;
|
|
15817
|
-
|
|
15948
|
+
const props = $xeTable;
|
|
15949
|
+
if (props.footerSpanMethod) {
|
|
15818
15950
|
errLog('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
|
|
15819
15951
|
}
|
|
15820
|
-
|
|
15821
|
-
|
|
15822
|
-
|
|
15952
|
+
handleFooterMerge($xeTable, merges);
|
|
15953
|
+
$xeTable.handleUpdateFooterMerge();
|
|
15954
|
+
return $xeTable.$nextTick().then(() => {
|
|
15955
|
+
$xeTable.updateCellAreas();
|
|
15823
15956
|
return updateStyle($xeTable);
|
|
15824
15957
|
});
|
|
15825
15958
|
},
|
|
15826
15959
|
removeMergeFooterItems(merges) {
|
|
15827
15960
|
const $xeTable = this;
|
|
15828
|
-
|
|
15961
|
+
const props = $xeTable;
|
|
15962
|
+
const internalData = $xeTable;
|
|
15963
|
+
if (props.footerSpanMethod) {
|
|
15829
15964
|
errLog('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
|
|
15830
15965
|
}
|
|
15831
|
-
const rest = removeMerges(
|
|
15832
|
-
return
|
|
15833
|
-
|
|
15966
|
+
const rest = removeMerges($xeTable, merges, internalData.mergeFooterList);
|
|
15967
|
+
return $xeTable.$nextTick().then(() => {
|
|
15968
|
+
$xeTable.updateCellAreas();
|
|
15834
15969
|
updateStyle($xeTable);
|
|
15835
15970
|
return rest;
|
|
15836
15971
|
});
|
|
@@ -15839,15 +15974,20 @@ const Methods = {
|
|
|
15839
15974
|
* 获取所有被合并的表尾
|
|
15840
15975
|
*/
|
|
15841
15976
|
getMergeFooterItems() {
|
|
15842
|
-
|
|
15977
|
+
const $xeTable = this;
|
|
15978
|
+
const internalData = $xeTable;
|
|
15979
|
+
return internalData.mergeFooterList.slice(0);
|
|
15843
15980
|
},
|
|
15844
15981
|
/**
|
|
15845
15982
|
* 清除所有表尾合并
|
|
15846
15983
|
*/
|
|
15847
15984
|
clearMergeFooterItems() {
|
|
15848
15985
|
const $xeTable = this;
|
|
15849
|
-
|
|
15850
|
-
|
|
15986
|
+
const internalData = $xeTable;
|
|
15987
|
+
internalData.mergeFooterList = [];
|
|
15988
|
+
internalData.mergeFooterMaps = {};
|
|
15989
|
+
internalData.mergeFooterCellMaps = {};
|
|
15990
|
+
return $xeTable.$nextTick().then(() => {
|
|
15851
15991
|
return updateStyle($xeTable);
|
|
15852
15992
|
});
|
|
15853
15993
|
},
|
|
@@ -16011,14 +16151,13 @@ function renderLine(h, _vm, rowid, params, cellHeight) {
|
|
|
16011
16151
|
if (slots && slots.line) {
|
|
16012
16152
|
return $xeTable.callSlot(slots.line, params, h);
|
|
16013
16153
|
}
|
|
16014
|
-
const
|
|
16154
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
16015
16155
|
let rLevel = 0;
|
|
16016
16156
|
let prevRow = null;
|
|
16017
|
-
if (
|
|
16018
|
-
rLevel =
|
|
16019
|
-
prevRow =
|
|
16157
|
+
if (rowRest) {
|
|
16158
|
+
rLevel = rowRest.level;
|
|
16159
|
+
prevRow = rowRest.items[rowRest.treeIndex - 1];
|
|
16020
16160
|
}
|
|
16021
|
-
const isFirstRow = $xeTable.eqRow(afterFullData[0], row);
|
|
16022
16161
|
if (treeConfig && treeNode && (treeOpts.showLine || treeOpts.line)) {
|
|
16023
16162
|
return [h('div', {
|
|
16024
16163
|
key: 'tl',
|
|
@@ -16026,7 +16165,7 @@ function renderLine(h, _vm, rowid, params, cellHeight) {
|
|
|
16026
16165
|
}, [h('div', {
|
|
16027
16166
|
class: 'vxe-tree--line',
|
|
16028
16167
|
style: {
|
|
16029
|
-
height: `${
|
|
16168
|
+
height: `${$xeTable.eqRow(afterFullData[0], row) ? 1 : calcTreeLine(params, prevRow)}px`,
|
|
16030
16169
|
bottom: `-${Math.floor(cellHeight / 2)}px`,
|
|
16031
16170
|
left: `${rLevel * treeOpts.indent + (rLevel ? 2 - getOffsetSize($xeTable) : 0) + 16}px`
|
|
16032
16171
|
}
|
|
@@ -16043,11 +16182,6 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
16043
16182
|
const tableReactData = $xeTable;
|
|
16044
16183
|
const tableInternalData = $xeTable;
|
|
16045
16184
|
const $xeGrid = $xeTable.$xeGrid;
|
|
16046
|
-
const {
|
|
16047
|
-
fullAllDataRowIdData,
|
|
16048
|
-
fullColumnIdData,
|
|
16049
|
-
visibleColumn
|
|
16050
|
-
} = tableInternalData;
|
|
16051
16185
|
const {
|
|
16052
16186
|
columnKey,
|
|
16053
16187
|
resizable: allResizable,
|
|
@@ -16071,16 +16205,21 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
16071
16205
|
currentColumn,
|
|
16072
16206
|
scrollXLoad,
|
|
16073
16207
|
scrollYLoad,
|
|
16208
|
+
mergeBodyFlag,
|
|
16074
16209
|
calcCellHeightFlag,
|
|
16075
16210
|
resizeHeightFlag,
|
|
16076
16211
|
resizeWidthFlag,
|
|
16077
|
-
mergeList,
|
|
16078
16212
|
editStore,
|
|
16079
16213
|
isAllOverflow,
|
|
16080
16214
|
validErrorMaps
|
|
16081
16215
|
} = tableReactData;
|
|
16082
16216
|
const {
|
|
16217
|
+
fullAllDataRowIdData,
|
|
16218
|
+
fullColumnIdData,
|
|
16219
|
+
mergeBodyCellMaps,
|
|
16220
|
+
visibleColumn,
|
|
16083
16221
|
afterFullData,
|
|
16222
|
+
mergeBodyList,
|
|
16084
16223
|
scrollXStore,
|
|
16085
16224
|
scrollYStore
|
|
16086
16225
|
} = tableInternalData;
|
|
@@ -16240,8 +16379,8 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
16240
16379
|
};
|
|
16241
16380
|
let isMergeCell = false;
|
|
16242
16381
|
// 合并行或列
|
|
16243
|
-
if (
|
|
16244
|
-
const spanRest =
|
|
16382
|
+
if (mergeBodyFlag && mergeBodyList.length) {
|
|
16383
|
+
const spanRest = mergeBodyCellMaps[`${_rowIndex}:${_columnIndex}`];
|
|
16245
16384
|
if (spanRest) {
|
|
16246
16385
|
const {
|
|
16247
16386
|
rowspan,
|
|
@@ -16276,7 +16415,7 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
16276
16415
|
}
|
|
16277
16416
|
}
|
|
16278
16417
|
// 如果被合并不可隐藏
|
|
16279
|
-
if (fixedHiddenColumn &&
|
|
16418
|
+
if (fixedHiddenColumn && isMergeCell) {
|
|
16280
16419
|
if (tdAttrs.colspan > 1 || tdAttrs.rowspan > 1) {
|
|
16281
16420
|
fixedHiddenColumn = false;
|
|
16282
16421
|
}
|
|
@@ -17400,30 +17539,6 @@ const {
|
|
|
17400
17539
|
renderer: footer_renderer,
|
|
17401
17540
|
renderEmptyElement: footer_renderEmptyElement
|
|
17402
17541
|
} = core_.VxeUI;
|
|
17403
|
-
function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
17404
|
-
for (let mIndex = 0; mIndex < mergeFooterList.length; mIndex++) {
|
|
17405
|
-
const {
|
|
17406
|
-
row: mergeRowIndex,
|
|
17407
|
-
col: mergeColIndex,
|
|
17408
|
-
rowspan: mergeRowspan,
|
|
17409
|
-
colspan: mergeColspan
|
|
17410
|
-
} = mergeFooterList[mIndex];
|
|
17411
|
-
if (mergeColIndex > -1 && mergeRowIndex > -1 && mergeRowspan && mergeColspan) {
|
|
17412
|
-
if (mergeRowIndex === _rowIndex && mergeColIndex === _columnIndex) {
|
|
17413
|
-
return {
|
|
17414
|
-
rowspan: mergeRowspan,
|
|
17415
|
-
colspan: mergeColspan
|
|
17416
|
-
};
|
|
17417
|
-
}
|
|
17418
|
-
if (_rowIndex >= mergeRowIndex && _rowIndex < mergeRowIndex + mergeRowspan && _columnIndex >= mergeColIndex && _columnIndex < mergeColIndex + mergeColspan) {
|
|
17419
|
-
return {
|
|
17420
|
-
rowspan: 0,
|
|
17421
|
-
colspan: 0
|
|
17422
|
-
};
|
|
17423
|
-
}
|
|
17424
|
-
}
|
|
17425
|
-
}
|
|
17426
|
-
}
|
|
17427
17542
|
function footer_renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex, _rowIndex) {
|
|
17428
17543
|
const props = _vm;
|
|
17429
17544
|
const $xeTable = _vm.$parent;
|
|
@@ -17449,11 +17564,12 @@ function footer_renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex,
|
|
|
17449
17564
|
scrollXLoad,
|
|
17450
17565
|
scrollYLoad,
|
|
17451
17566
|
overflowX,
|
|
17452
|
-
currentColumn
|
|
17453
|
-
mergeFooterList
|
|
17567
|
+
currentColumn
|
|
17454
17568
|
} = tableReactData;
|
|
17455
17569
|
const {
|
|
17456
17570
|
fullColumnIdData,
|
|
17571
|
+
mergeFooterList,
|
|
17572
|
+
mergeFooterCellMaps,
|
|
17457
17573
|
scrollXStore
|
|
17458
17574
|
} = tableInternalData;
|
|
17459
17575
|
const tooltipOpts = $xeTable.computeTooltipOpts;
|
|
@@ -17547,7 +17663,7 @@ function footer_renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex,
|
|
|
17547
17663
|
let isMergeCell = false;
|
|
17548
17664
|
// 合并行或列
|
|
17549
17665
|
if (mergeFooterList.length) {
|
|
17550
|
-
const spanRest =
|
|
17666
|
+
const spanRest = mergeFooterCellMaps[`${_rowIndex}:${_columnIndex}`];
|
|
17551
17667
|
if (spanRest) {
|
|
17552
17668
|
const {
|
|
17553
17669
|
rowspan,
|
|
@@ -20078,42 +20194,40 @@ const {
|
|
|
20078
20194
|
}
|
|
20079
20195
|
}), h('vxe-checkbox', {
|
|
20080
20196
|
props: {
|
|
20081
|
-
value: defaultOptions.
|
|
20082
|
-
disabled: !
|
|
20083
|
-
title: export_panel_getI18n('vxe.export.
|
|
20084
|
-
content: export_panel_getI18n('vxe.export.
|
|
20197
|
+
value: isHeader ? defaultOptions.isTitle : false,
|
|
20198
|
+
disabled: !isHeader,
|
|
20199
|
+
title: export_panel_getI18n('vxe.export.expTitleTitle'),
|
|
20200
|
+
content: export_panel_getI18n('vxe.export.expOptTitle')
|
|
20085
20201
|
},
|
|
20086
20202
|
on: {
|
|
20087
20203
|
input(value) {
|
|
20088
|
-
defaultOptions.
|
|
20204
|
+
defaultOptions.isTitle = value;
|
|
20089
20205
|
}
|
|
20090
20206
|
}
|
|
20091
20207
|
}), h('vxe-checkbox', {
|
|
20092
20208
|
props: {
|
|
20093
|
-
value:
|
|
20094
|
-
disabled:
|
|
20095
|
-
title: export_panel_getI18n('vxe.export.
|
|
20096
|
-
content: export_panel_getI18n('vxe.export.
|
|
20209
|
+
value: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
|
|
20210
|
+
disabled: !isHeader || !hasColgroup || !supportMerge,
|
|
20211
|
+
title: export_panel_getI18n('vxe.export.expColgroupTitle'),
|
|
20212
|
+
content: export_panel_getI18n('vxe.export.expOptColgroup')
|
|
20097
20213
|
},
|
|
20098
20214
|
on: {
|
|
20099
20215
|
input(value) {
|
|
20100
|
-
defaultOptions.
|
|
20216
|
+
defaultOptions.isColgroup = value;
|
|
20101
20217
|
}
|
|
20102
20218
|
}
|
|
20103
20219
|
})]), h('div', {
|
|
20104
20220
|
class: 'vxe-table-export--panel-option-row'
|
|
20105
20221
|
}, [h('vxe-checkbox', {
|
|
20106
20222
|
props: {
|
|
20107
|
-
|
|
20108
|
-
|
|
20109
|
-
|
|
20110
|
-
|
|
20111
|
-
title: export_panel_getI18n('vxe.export.expColgroupTitle'),
|
|
20112
|
-
content: export_panel_getI18n('vxe.export.expOptColgroup')
|
|
20223
|
+
value: hasEmptyData ? false : defaultOptions.original,
|
|
20224
|
+
disabled: hasEmptyData,
|
|
20225
|
+
title: export_panel_getI18n('vxe.export.expOriginalTitle'),
|
|
20226
|
+
content: export_panel_getI18n('vxe.export.expOptOriginal')
|
|
20113
20227
|
},
|
|
20114
20228
|
on: {
|
|
20115
20229
|
input(value) {
|
|
20116
|
-
defaultOptions.
|
|
20230
|
+
defaultOptions.original = value;
|
|
20117
20231
|
}
|
|
20118
20232
|
}
|
|
20119
20233
|
}), h('vxe-checkbox', {
|
|
@@ -20152,6 +20266,20 @@ const {
|
|
|
20152
20266
|
defaultOptions.isAllExpand = value;
|
|
20153
20267
|
}
|
|
20154
20268
|
}
|
|
20269
|
+
})]), h('div', {
|
|
20270
|
+
class: 'vxe-table-export--panel-option-row'
|
|
20271
|
+
}, [h('vxe-checkbox', {
|
|
20272
|
+
props: {
|
|
20273
|
+
value: defaultOptions.isFooter,
|
|
20274
|
+
disabled: !storeData.hasFooter,
|
|
20275
|
+
title: export_panel_getI18n('vxe.export.expFooterTitle'),
|
|
20276
|
+
content: export_panel_getI18n('vxe.export.expOptFooter')
|
|
20277
|
+
},
|
|
20278
|
+
on: {
|
|
20279
|
+
input(value) {
|
|
20280
|
+
defaultOptions.isFooter = value;
|
|
20281
|
+
}
|
|
20282
|
+
}
|
|
20155
20283
|
})])])])]])])]), bottomSlot ? h('div', {
|
|
20156
20284
|
class: 'vxe-table-export--panel-bottom'
|
|
20157
20285
|
}, $xeTable.callSlot(bottomSlot, params, h)) : export_panel_renderEmptyElement(this)]);
|
|
@@ -21304,12 +21432,10 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
21304
21432
|
const {
|
|
21305
21433
|
treeConfig
|
|
21306
21434
|
} = props;
|
|
21307
|
-
const {
|
|
21308
|
-
mergeList
|
|
21309
|
-
} = reactData;
|
|
21310
21435
|
const {
|
|
21311
21436
|
tableFullTreeData,
|
|
21312
21437
|
afterFullData,
|
|
21438
|
+
mergeBodyList,
|
|
21313
21439
|
tableFullData,
|
|
21314
21440
|
fullDataRowIdData,
|
|
21315
21441
|
fullAllDataRowIdData,
|
|
@@ -21358,7 +21484,7 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
21358
21484
|
tableFullData.unshift(item);
|
|
21359
21485
|
});
|
|
21360
21486
|
// 刷新单元格合并
|
|
21361
|
-
|
|
21487
|
+
mergeBodyList.forEach(mergeItem => {
|
|
21362
21488
|
const {
|
|
21363
21489
|
row: mergeRowIndex
|
|
21364
21490
|
} = mergeItem;
|
|
@@ -21397,7 +21523,7 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
21397
21523
|
tableFullData.push(item);
|
|
21398
21524
|
});
|
|
21399
21525
|
// 刷新单元格合并
|
|
21400
|
-
|
|
21526
|
+
mergeBodyList.forEach(mergeItem => {
|
|
21401
21527
|
const {
|
|
21402
21528
|
row: mergeRowIndex,
|
|
21403
21529
|
rowspan: mergeRowspan
|
|
@@ -21504,7 +21630,7 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
21504
21630
|
tableFullData.push(...newRecords);
|
|
21505
21631
|
}
|
|
21506
21632
|
// 刷新单元格合并
|
|
21507
|
-
|
|
21633
|
+
mergeBodyList.forEach(mergeItem => {
|
|
21508
21634
|
const {
|
|
21509
21635
|
row: mergeRowIndex,
|
|
21510
21636
|
rowspan: mergeRowspan
|
|
@@ -21530,6 +21656,7 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
21530
21656
|
$xeTable.updateAfterDataIndex();
|
|
21531
21657
|
}
|
|
21532
21658
|
$xeTable.updateFooter();
|
|
21659
|
+
$xeTable.handleUpdateBodyMerge();
|
|
21533
21660
|
$xeTable.checkSelectionStatus();
|
|
21534
21661
|
if (reactData.scrollYLoad) {
|
|
21535
21662
|
$xeTable.updateScrollYSpace();
|
|
@@ -21821,13 +21948,13 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
|
|
|
21821
21948
|
treeConfig
|
|
21822
21949
|
} = props;
|
|
21823
21950
|
const {
|
|
21824
|
-
mergeList,
|
|
21825
21951
|
editStore
|
|
21826
21952
|
} = reactData;
|
|
21827
21953
|
const {
|
|
21828
21954
|
tableFullTreeData,
|
|
21829
21955
|
selectCheckboxMaps,
|
|
21830
21956
|
afterFullData,
|
|
21957
|
+
mergeBodyList,
|
|
21831
21958
|
tableFullData,
|
|
21832
21959
|
pendingRowMaps,
|
|
21833
21960
|
insertRowMaps,
|
|
@@ -21908,7 +22035,7 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
|
|
|
21908
22035
|
const afIndex = this.findRowIndexOf(afterFullData, row);
|
|
21909
22036
|
if (afIndex > -1) {
|
|
21910
22037
|
// 刷新单元格合并
|
|
21911
|
-
|
|
22038
|
+
mergeBodyList.forEach(mergeItem => {
|
|
21912
22039
|
const {
|
|
21913
22040
|
row: mergeRowIndex,
|
|
21914
22041
|
rowspan: mergeRowspan
|
|
@@ -21941,9 +22068,10 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
|
|
|
21941
22068
|
reactData.removeRowFlag++;
|
|
21942
22069
|
reactData.insertRowFlag++;
|
|
21943
22070
|
reactData.pendingRowFlag++;
|
|
21944
|
-
$xeTable.updateFooter();
|
|
21945
22071
|
$xeTable.cacheRowMap(false);
|
|
21946
22072
|
$xeTable.handleTableData(treeConfig && transform);
|
|
22073
|
+
$xeTable.updateFooter();
|
|
22074
|
+
$xeTable.handleUpdateBodyMerge();
|
|
21947
22075
|
if (!(treeConfig && transform)) {
|
|
21948
22076
|
$xeTable.updateAfterDataIndex();
|
|
21949
22077
|
}
|
|
@@ -22670,7 +22798,7 @@ function getHeaderTitle($xeTable, opts, column) {
|
|
|
22670
22798
|
column,
|
|
22671
22799
|
options: opts,
|
|
22672
22800
|
$table: $xeTable
|
|
22673
|
-
}) : (opts.
|
|
22801
|
+
}) : (opts.isTitle ? column.getTitle() : column.field) || '';
|
|
22674
22802
|
}
|
|
22675
22803
|
function getFooterCellValue($xeTable, opts, row, column) {
|
|
22676
22804
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
@@ -22801,6 +22929,7 @@ function hasEllipsis($xeTable, column, property, allColumnOverflow) {
|
|
|
22801
22929
|
function toHtml($xeTable, opts, columns, datas) {
|
|
22802
22930
|
const props = $xeTable;
|
|
22803
22931
|
const reactData = $xeTable;
|
|
22932
|
+
const internalData = $xeTable;
|
|
22804
22933
|
const {
|
|
22805
22934
|
id,
|
|
22806
22935
|
border,
|
|
@@ -22813,9 +22942,11 @@ function toHtml($xeTable, opts, columns, datas) {
|
|
|
22813
22942
|
} = props;
|
|
22814
22943
|
const {
|
|
22815
22944
|
isAllSelected,
|
|
22816
|
-
isIndeterminate
|
|
22817
|
-
mergeList
|
|
22945
|
+
isIndeterminate
|
|
22818
22946
|
} = reactData;
|
|
22947
|
+
const {
|
|
22948
|
+
mergeBodyCellMaps
|
|
22949
|
+
} = internalData;
|
|
22819
22950
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
22820
22951
|
const {
|
|
22821
22952
|
print: isPrint,
|
|
@@ -22908,15 +23039,16 @@ function toHtml($xeTable, opts, columns, datas) {
|
|
|
22908
23039
|
} else {
|
|
22909
23040
|
datas.forEach(item => {
|
|
22910
23041
|
tables.push('<tr>' + columns.map(column => {
|
|
23042
|
+
const colid = column.id;
|
|
22911
23043
|
const cellAlign = column.align || allAlign;
|
|
22912
23044
|
const classNames = hasEllipsis($xeTable, column, 'showOverflow', allColumnOverflow) ? ['col--ellipsis'] : [];
|
|
22913
|
-
const cellValue = item[
|
|
23045
|
+
const cellValue = item[colid];
|
|
22914
23046
|
let rowSpan = 1;
|
|
22915
23047
|
let colSpan = 1;
|
|
22916
|
-
if (isMerge
|
|
23048
|
+
if (isMerge) {
|
|
22917
23049
|
const _rowIndex = $xeTable.getVTRowIndex(item._row);
|
|
22918
23050
|
const _columnIndex = $xeTable.getVTColumnIndex(column);
|
|
22919
|
-
const spanRest =
|
|
23051
|
+
const spanRest = mergeBodyCellMaps[`${_rowIndex}:${_columnIndex}`];
|
|
22920
23052
|
if (spanRest) {
|
|
22921
23053
|
const {
|
|
22922
23054
|
rowspan,
|
|
@@ -23616,15 +23748,15 @@ function handleExportAndPrint($xeTable, options, isPrint) {
|
|
|
23616
23748
|
} = props;
|
|
23617
23749
|
const {
|
|
23618
23750
|
initStore,
|
|
23619
|
-
mergeList,
|
|
23620
|
-
mergeFooterList,
|
|
23621
23751
|
isGroup,
|
|
23622
23752
|
footerTableData,
|
|
23623
23753
|
exportStore,
|
|
23624
23754
|
exportParams
|
|
23625
23755
|
} = reactData;
|
|
23626
23756
|
const {
|
|
23627
|
-
collectColumn
|
|
23757
|
+
collectColumn,
|
|
23758
|
+
mergeBodyList,
|
|
23759
|
+
mergeFooterList
|
|
23628
23760
|
} = internalData;
|
|
23629
23761
|
const exportOpts = $xeTable.computeExportOpts;
|
|
23630
23762
|
const hasTree = treeConfig;
|
|
@@ -23632,10 +23764,11 @@ function handleExportAndPrint($xeTable, options, isPrint) {
|
|
|
23632
23764
|
const selectRecords = $xeTable.getCheckboxRecords();
|
|
23633
23765
|
const proxyOpts = $xeGrid ? $xeGrid.computeProxyOpts : {};
|
|
23634
23766
|
const hasFooter = !!footerTableData.length;
|
|
23635
|
-
const hasMerge = !!(
|
|
23767
|
+
const hasMerge = !!(mergeBodyList.length || mergeFooterList.length);
|
|
23636
23768
|
const defOpts = Object.assign({
|
|
23637
23769
|
message: true,
|
|
23638
23770
|
isHeader: showHeader,
|
|
23771
|
+
isTitle: showHeader,
|
|
23639
23772
|
isFooter: showFooter,
|
|
23640
23773
|
isColgroup: isGroup,
|
|
23641
23774
|
isMerge: hasMerge,
|
|
@@ -23812,22 +23945,23 @@ const convertToRows = originColumns => {
|
|
|
23812
23945
|
showFooter
|
|
23813
23946
|
} = props;
|
|
23814
23947
|
const {
|
|
23815
|
-
mergeList,
|
|
23816
23948
|
mergeFooterList,
|
|
23817
23949
|
isGroup
|
|
23818
23950
|
} = reactData;
|
|
23819
23951
|
const {
|
|
23820
23952
|
tableFullColumn,
|
|
23821
23953
|
afterFullData,
|
|
23954
|
+
mergeBodyList,
|
|
23822
23955
|
collectColumn
|
|
23823
23956
|
} = internalData;
|
|
23824
23957
|
const exportOpts = $xeTable.computeExportOpts;
|
|
23825
23958
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
23826
23959
|
const proxyOpts = $xeGrid ? $xeGrid.computeProxyOpts : {};
|
|
23827
|
-
const hasMerge = !!(
|
|
23960
|
+
const hasMerge = !!(mergeBodyList.length || mergeFooterList.length);
|
|
23828
23961
|
const opts = Object.assign({
|
|
23829
23962
|
message: true,
|
|
23830
23963
|
isHeader: showHeader,
|
|
23964
|
+
isTitle: showHeader,
|
|
23831
23965
|
isFooter: showFooter,
|
|
23832
23966
|
isColgroup: isGroup,
|
|
23833
23967
|
isMerge: hasMerge,
|
|
@@ -26079,20 +26213,22 @@ function renderRowExpandedVNs(h, $xeTable) {
|
|
|
26079
26213
|
} = treeOpts;
|
|
26080
26214
|
const cellStyle = {};
|
|
26081
26215
|
const rowid = handleGetRowId(row);
|
|
26082
|
-
const
|
|
26216
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
26083
26217
|
let rowLevel = 0;
|
|
26084
26218
|
let seq = -1;
|
|
26085
|
-
let _rowIndex =
|
|
26086
|
-
|
|
26087
|
-
|
|
26088
|
-
if (
|
|
26089
|
-
rowLevel =
|
|
26219
|
+
let _rowIndex = -1;
|
|
26220
|
+
let rowIndex = -1;
|
|
26221
|
+
let $rowIndex = -1;
|
|
26222
|
+
if (rowRest) {
|
|
26223
|
+
rowLevel = rowRest.level;
|
|
26090
26224
|
if (treeConfig && transform && seqMode === 'increasing') {
|
|
26091
|
-
seq =
|
|
26225
|
+
seq = rowRest._index + 1;
|
|
26092
26226
|
} else {
|
|
26093
|
-
seq =
|
|
26227
|
+
seq = rowRest.seq;
|
|
26094
26228
|
}
|
|
26095
|
-
|
|
26229
|
+
rowIndex = rowRest.index;
|
|
26230
|
+
$rowIndex = rowRest.$index;
|
|
26231
|
+
_rowIndex = rowRest._index;
|
|
26096
26232
|
}
|
|
26097
26233
|
if (expandHeight) {
|
|
26098
26234
|
cellStyle.height = `${expandHeight}px`;
|
|
@@ -26311,10 +26447,6 @@ function renderBody(h, $xeTable) {
|
|
|
26311
26447
|
hasFixedColumn: false,
|
|
26312
26448
|
// 树节点列信息
|
|
26313
26449
|
treeNodeColumn: null,
|
|
26314
|
-
// 合并单元格的对象集
|
|
26315
|
-
mergeList: [],
|
|
26316
|
-
// 合并表尾数据的对象集
|
|
26317
|
-
mergeFooterList: [],
|
|
26318
26450
|
// 初始化标识
|
|
26319
26451
|
initStore: {
|
|
26320
26452
|
filter: false,
|
|
@@ -26457,12 +26589,17 @@ function renderBody(h, $xeTable) {
|
|
|
26457
26589
|
original: false,
|
|
26458
26590
|
message: true,
|
|
26459
26591
|
isHeader: false,
|
|
26592
|
+
isTitle: false,
|
|
26460
26593
|
isFooter: false
|
|
26461
26594
|
},
|
|
26462
26595
|
rowExpandedFlag: 1,
|
|
26463
26596
|
treeExpandedFlag: 1,
|
|
26464
26597
|
updateCheckboxFlag: 1,
|
|
26465
26598
|
pendingRowFlag: 1,
|
|
26599
|
+
insertRowFlag: 1,
|
|
26600
|
+
removeRowFlag: 1,
|
|
26601
|
+
mergeBodyFlag: 1,
|
|
26602
|
+
mergeFootFlag: 1,
|
|
26466
26603
|
rowHeightStore: {
|
|
26467
26604
|
default: 48,
|
|
26468
26605
|
medium: 44,
|
|
@@ -26920,27 +27057,31 @@ function renderBody(h, $xeTable) {
|
|
|
26920
27057
|
},
|
|
26921
27058
|
computeTableRowExpandedList() {
|
|
26922
27059
|
const $xeTable = this;
|
|
27060
|
+
const props = $xeTable;
|
|
26923
27061
|
const reactData = $xeTable;
|
|
26924
27062
|
const internalData = $xeTable;
|
|
27063
|
+
const {
|
|
27064
|
+
treeConfig
|
|
27065
|
+
} = props;
|
|
26925
27066
|
const {
|
|
26926
27067
|
rowExpandedFlag,
|
|
26927
|
-
tableData,
|
|
26928
27068
|
expandColumn
|
|
26929
27069
|
} = reactData;
|
|
26930
27070
|
const {
|
|
27071
|
+
visibleDataRowIdData,
|
|
26931
27072
|
rowExpandedMaps
|
|
26932
27073
|
} = internalData;
|
|
27074
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
26933
27075
|
const {
|
|
26934
|
-
|
|
26935
|
-
} =
|
|
27076
|
+
transform
|
|
27077
|
+
} = treeOpts;
|
|
26936
27078
|
const expandList = [];
|
|
26937
27079
|
if (expandColumn && rowExpandedFlag) {
|
|
26938
|
-
|
|
26939
|
-
|
|
26940
|
-
|
|
26941
|
-
});
|
|
27080
|
+
if (treeConfig && !transform) {
|
|
27081
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().values(rowExpandedMaps);
|
|
27082
|
+
}
|
|
26942
27083
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(rowExpandedMaps, (row, rowid) => {
|
|
26943
|
-
if (
|
|
27084
|
+
if (visibleDataRowIdData[rowid]) {
|
|
26944
27085
|
expandList.push(row);
|
|
26945
27086
|
}
|
|
26946
27087
|
});
|
|
@@ -27232,13 +27373,26 @@ function renderBody(h, $xeTable) {
|
|
|
27232
27373
|
tableFullColumn: [],
|
|
27233
27374
|
// 渲染所有列
|
|
27234
27375
|
visibleColumn: [],
|
|
27235
|
-
//
|
|
27376
|
+
// 全量数据集(包括当前和已删除)
|
|
27236
27377
|
fullAllDataRowIdData: {},
|
|
27378
|
+
// 数据集(仅当前)
|
|
27379
|
+
fullDataRowIdData: {},
|
|
27380
|
+
// 数据集(仅可视)
|
|
27381
|
+
visibleDataRowIdData: {},
|
|
27237
27382
|
// 渲染中缓存数据
|
|
27238
27383
|
sourceDataRowIdData: {},
|
|
27239
|
-
fullDataRowIdData: {},
|
|
27240
27384
|
fullColumnIdData: {},
|
|
27241
27385
|
fullColumnFieldData: {},
|
|
27386
|
+
// 合并单元格的数据
|
|
27387
|
+
mergeBodyList: [],
|
|
27388
|
+
mergeBodyMaps: {},
|
|
27389
|
+
// 合并表尾的数据
|
|
27390
|
+
mergeFooterList: [],
|
|
27391
|
+
mergeFooterMaps: {},
|
|
27392
|
+
// 已合并单元格数据集合
|
|
27393
|
+
mergeBodyCellMaps: {},
|
|
27394
|
+
// 已合并表尾数据集合
|
|
27395
|
+
mergeFooterCellMaps: {},
|
|
27242
27396
|
// 已展开的行集合
|
|
27243
27397
|
rowExpandedMaps: {},
|
|
27244
27398
|
// 懒加载中的展开行的集合
|
|
@@ -27287,6 +27441,7 @@ function renderBody(h, $xeTable) {
|
|
|
27287
27441
|
const currentColumnOpts = $xeTable.computeCurrentColumnOpts;
|
|
27288
27442
|
const virtualXOpts = $xeTable.computeVirtualXOpts;
|
|
27289
27443
|
const virtualYOpts = $xeTable.computeVirtualYOpts;
|
|
27444
|
+
const keyboardOpts = $xeTable.computeKeyboardOpts;
|
|
27290
27445
|
if (props.rowId) {
|
|
27291
27446
|
warnLog('vxe.error.delProp', ['row-id', 'row-config.keyField']);
|
|
27292
27447
|
}
|
|
@@ -27329,6 +27484,12 @@ function renderBody(h, $xeTable) {
|
|
|
27329
27484
|
if (this.highlightHoverColumn) {
|
|
27330
27485
|
warnLog('vxe.error.delProp', ['highlight-hover-column', 'column-config.isHover']);
|
|
27331
27486
|
}
|
|
27487
|
+
// if (props.scrollY) {
|
|
27488
|
+
// warnLog('vxe.error.delProp', ['scroll-y', 'virtual-y-config'])
|
|
27489
|
+
// }
|
|
27490
|
+
// if (props.scrollX) {
|
|
27491
|
+
// warnLog('vxe.error.delProp', ['scroll-x', 'virtual-x-config'])
|
|
27492
|
+
// }
|
|
27332
27493
|
// 检查导入导出类型,如果自定义导入导出方法,则不校验类型
|
|
27333
27494
|
if (importConfig && importOpts.types && !importOpts.importMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includeArrays(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(importOpts._typeMaps), importOpts.types)) {
|
|
27334
27495
|
warnLog('vxe.error.errProp', [`export-config.types=${importOpts.types.join(',')}`, importOpts.types.filter(type => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(importOpts._typeMaps), type)).join(',') || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(importOpts._typeMaps).join(',')]);
|
|
@@ -27420,10 +27581,10 @@ function renderBody(h, $xeTable) {
|
|
|
27420
27581
|
if (props.emptyRender && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isObject(props.emptyRender)) {
|
|
27421
27582
|
warnLog('vxe.error.errProp', [`table.empty-render=${props.emptyRender}`, 'table.empty-render={}']);
|
|
27422
27583
|
}
|
|
27423
|
-
if ((rowOpts.isCurrent || highlightCurrentRow) && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(currentRowOpts.isFollowSelected)) {
|
|
27584
|
+
if ((rowOpts.isCurrent || highlightCurrentRow) && props.keyboardConfig && keyboardOpts.isArrow && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(currentRowOpts.isFollowSelected)) {
|
|
27424
27585
|
warnLog('vxe.error.notConflictProp', ['row-config.isCurrent', 'current-row-config.isFollowSelected']);
|
|
27425
27586
|
}
|
|
27426
|
-
if ((columnOpts.isCurrent || highlightCurrentColumn) && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(currentColumnOpts.isFollowSelected)) {
|
|
27587
|
+
if ((columnOpts.isCurrent || highlightCurrentColumn) && props.keyboardConfig && keyboardOpts.isArrow && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(currentColumnOpts.isFollowSelected)) {
|
|
27427
27588
|
warnLog('vxe.error.notConflictProp', ['column-config.isCurrent', 'current-column-config.isFollowSelected']);
|
|
27428
27589
|
}
|
|
27429
27590
|
// 如果不支持虚拟滚动
|
|
@@ -31746,10 +31907,12 @@ const Toolbar = VxeToolbar;
|
|
|
31746
31907
|
expOptFooter: '表尾',
|
|
31747
31908
|
expFooterTitle: '是否需要表尾',
|
|
31748
31909
|
expOptColgroup: '分组表头',
|
|
31910
|
+
expOptTitle: '列标题',
|
|
31911
|
+
expTitleTitle: '是否为列标题,否则显示为列的字段名',
|
|
31749
31912
|
expColgroupTitle: '如果存在,则支持带有分组结构的表头',
|
|
31750
31913
|
expOptMerge: '合并',
|
|
31751
31914
|
expMergeTitle: '如果存在,则支持带有合并结构的单元格',
|
|
31752
|
-
expOptAllExpand: '
|
|
31915
|
+
expOptAllExpand: '展开树',
|
|
31753
31916
|
expAllExpandTitle: '如果存在,则支持将带有层级结构的数据全部展开',
|
|
31754
31917
|
expOptUseStyle: '样式',
|
|
31755
31918
|
expUseStyleTitle: '如果存在,则支持带样式的单元格',
|