vxe-table 4.19.3 → 4.19.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/dist/all.esm.js +165 -27
- package/dist/style.css +1 -1
- package/es/locale/lang/ar-EG.js +2 -2
- package/es/locale/lang/de-DE.js +1 -1
- package/es/locale/lang/en-US.js +1 -1
- package/es/locale/lang/fr-FR.js +2 -2
- package/es/locale/lang/hu-HU.js +1 -1
- package/es/locale/lang/hy-AM.js +1 -1
- package/es/locale/lang/id-ID.js +2 -2
- package/es/locale/lang/it-IT.js +1 -1
- package/es/locale/lang/ko-KR.js +1 -1
- package/es/locale/lang/ms-MY.js +2 -2
- package/es/locale/lang/nb-NO.js +2 -2
- package/es/locale/lang/pt-BR.js +2 -2
- package/es/locale/lang/th-TH.js +1 -1
- package/es/locale/lang/ug-CN.js +1 -1
- package/es/locale/lang/uk-UA.js +1 -1
- package/es/locale/lang/uz-UZ.js +1 -1
- package/es/style.css +1 -1
- package/es/table/module/export/hook.js +73 -13
- package/es/table/src/cell.js +15 -8
- package/es/table/src/columnInfo.js +1 -4
- package/es/table/src/table.js +77 -0
- package/es/table/src/util.js +1 -0
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +127 -51
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +2 -2
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +2 -2
- package/lib/locale/lang/de-DE.js +1 -1
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +1 -1
- package/lib/locale/lang/en-US.js +1 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +1 -1
- package/lib/locale/lang/fr-FR.js +2 -2
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +2 -2
- package/lib/locale/lang/hu-HU.js +1 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +1 -1
- package/lib/locale/lang/hy-AM.js +1 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +1 -1
- package/lib/locale/lang/id-ID.js +2 -2
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +2 -2
- package/lib/locale/lang/it-IT.js +1 -1
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +1 -1
- package/lib/locale/lang/ko-KR.js +1 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +1 -1
- package/lib/locale/lang/ms-MY.js +2 -2
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +2 -2
- package/lib/locale/lang/nb-NO.js +2 -2
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +2 -2
- package/lib/locale/lang/pt-BR.js +2 -2
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -2
- package/lib/locale/lang/th-TH.js +1 -1
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +1 -1
- package/lib/locale/lang/ug-CN.js +1 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +1 -1
- package/lib/locale/lang/uk-UA.js +1 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +1 -1
- package/lib/locale/lang/uz-UZ.js +1 -1
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/export/hook.js +106 -32
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/src/cell.js +14 -9
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/columnInfo.js +1 -5
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/table.js +3 -3
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +1 -0
- package/lib/table/src/util.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 +2 -2
- package/packages/locale/lang/ar-EG.ts +850 -850
- package/packages/locale/lang/de-DE.ts +850 -850
- package/packages/locale/lang/en-US.ts +850 -850
- package/packages/locale/lang/es-ES.ts +850 -850
- package/packages/locale/lang/fr-FR.ts +850 -850
- package/packages/locale/lang/hu-HU.ts +850 -850
- package/packages/locale/lang/hy-AM.ts +850 -850
- package/packages/locale/lang/id-ID.ts +850 -850
- package/packages/locale/lang/it-IT.ts +850 -850
- package/packages/locale/lang/ja-JP.ts +850 -850
- package/packages/locale/lang/ko-KR.ts +850 -850
- package/packages/locale/lang/ms-MY.ts +850 -850
- package/packages/locale/lang/nb-NO.ts +850 -850
- package/packages/locale/lang/pt-BR.ts +850 -850
- package/packages/locale/lang/ru-RU.ts +850 -850
- package/packages/locale/lang/th-TH.ts +850 -850
- package/packages/locale/lang/ug-CN.ts +850 -850
- package/packages/locale/lang/uk-UA.ts +850 -850
- package/packages/locale/lang/uz-UZ.ts +850 -850
- package/packages/locale/lang/vi-VN.ts +850 -850
- package/packages/locale/lang/zh-CHT.ts +850 -850
- package/packages/table/module/export/hook.ts +71 -13
- package/packages/table/src/cell.ts +14 -8
- package/packages/table/src/columnInfo.ts +1 -5
- package/packages/table/src/table.ts +75 -0
- package/packages/table/src/util.ts +1 -0
- /package/es/{iconfont.1779843543280.ttf → iconfont.1780200147870.ttf} +0 -0
- /package/es/{iconfont.1779843543280.woff → iconfont.1780200147870.woff} +0 -0
- /package/es/{iconfont.1779843543280.woff2 → iconfont.1780200147870.woff2} +0 -0
- /package/lib/{iconfont.1779843543280.ttf → iconfont.1780200147870.ttf} +0 -0
- /package/lib/{iconfont.1779843543280.woff → iconfont.1780200147870.woff} +0 -0
- /package/lib/{iconfont.1779843543280.woff2 → iconfont.1780200147870.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -44,7 +44,7 @@ function eqEmptyValue(cellValue) {
|
|
|
44
44
|
return cellValue === '' || XEUtils.eqNull(cellValue);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
const version$1 = "4.19.
|
|
47
|
+
const version$1 = "4.19.5";
|
|
48
48
|
VxeUI.version = version$1;
|
|
49
49
|
VxeUI.tableVersion = version$1;
|
|
50
50
|
VxeUI.setConfig({
|
|
@@ -556,7 +556,7 @@ const modal = {
|
|
|
556
556
|
const defineVxeComponent = defineComponent;
|
|
557
557
|
|
|
558
558
|
const { log } = VxeUI;
|
|
559
|
-
const version = `table v${"4.19.
|
|
559
|
+
const version = `table v${"4.19.5"}`;
|
|
560
560
|
const warnLog = log.create('warn', version);
|
|
561
561
|
const errLog = log.create('error', version);
|
|
562
562
|
|
|
@@ -568,16 +568,13 @@ class ColumnInfo {
|
|
|
568
568
|
const $xeGrid = $xeTable.xeGrid;
|
|
569
569
|
const $xeGantt = $xeTable.xeGantt;
|
|
570
570
|
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
571
|
-
const { field, editRender, filterRender
|
|
571
|
+
const { field, editRender, filterRender } = _vm;
|
|
572
572
|
const colId = _vm.colId || XEUtils.uniqueId('col_');
|
|
573
573
|
const formatter = _vm.formatter;
|
|
574
574
|
const visible = XEUtils.isBoolean(_vm.visible) ? _vm.visible : true;
|
|
575
575
|
const flCompConf = isEnableConf(filterRender) ? renderer$b.get(filterRender.name) : null;
|
|
576
576
|
const ctFilterOptions = flCompConf ? flCompConf.createTableFilterOptions : null;
|
|
577
577
|
const filters = toFilters(_vm.filters, colId);
|
|
578
|
-
if (headerFormatter) {
|
|
579
|
-
errLog('vxe.error.notProp', ['header-formatter']);
|
|
580
|
-
}
|
|
581
578
|
const types = ['seq', 'checkbox', 'radio', 'expand', 'html'];
|
|
582
579
|
if (_vm.type && types.indexOf(_vm.type) === -1) {
|
|
583
580
|
warnLog('vxe.error.errProp', [`type=${_vm.type}`, types.join(', ')]);
|
|
@@ -1016,6 +1013,7 @@ function createInternalData$3() {
|
|
|
1016
1013
|
// 数据集(仅可视)
|
|
1017
1014
|
visibleDataRowIdData: {},
|
|
1018
1015
|
keepUpdateFieldMaps: {},
|
|
1016
|
+
headerFullDataColData: {},
|
|
1019
1017
|
footerFullDataRowData: {},
|
|
1020
1018
|
// 渲染中缓存数据
|
|
1021
1019
|
sourceDataRowIdData: {},
|
|
@@ -2300,7 +2298,7 @@ const Cell = {
|
|
|
2300
2298
|
}
|
|
2301
2299
|
}
|
|
2302
2300
|
}
|
|
2303
|
-
return renderTitleContent(params,
|
|
2301
|
+
return renderTitleContent(params, $table.getHeaderCellLabel(column));
|
|
2304
2302
|
},
|
|
2305
2303
|
renderDefaultHeader(params) {
|
|
2306
2304
|
return renderHeaderCellBaseVNs(params, Cell.renderHeaderTitle(params));
|
|
@@ -2312,7 +2310,7 @@ const Cell = {
|
|
|
2312
2310
|
const tableInternalData = $table.internalData;
|
|
2313
2311
|
const { isRowGroupStatus } = tableReactData;
|
|
2314
2312
|
const { editConfig } = tableProps;
|
|
2315
|
-
const { field, slots, editRender, cellRender, rowGroupNode, aggFunc
|
|
2313
|
+
const { field, slots, editRender, cellRender, rowGroupNode, aggFunc } = column;
|
|
2316
2314
|
const isEnableEdit = editConfig && isEnableConf(editConfig);
|
|
2317
2315
|
const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
|
|
2318
2316
|
const cellRenderOpts = isEnableConf(cellRender) ? cellRender : null;
|
|
@@ -2388,8 +2386,9 @@ const Cell = {
|
|
|
2388
2386
|
return renderCellBaseVNs(params, $table.callSlot(defaultSlot, params));
|
|
2389
2387
|
}
|
|
2390
2388
|
const renderOpts = editRenderOpts || cellRenderOpts;
|
|
2391
|
-
//
|
|
2392
|
-
|
|
2389
|
+
// 如果是编辑表格:renderTableCell > formatter
|
|
2390
|
+
// 如果是查看表格:renderTableDefault > formatter
|
|
2391
|
+
if (renderOpts) {
|
|
2393
2392
|
const compConf = renderer$a.get(renderOpts.name);
|
|
2394
2393
|
if (compConf) {
|
|
2395
2394
|
const renderFn = editRenderOpts ? (compConf.renderTableCell || compConf.renderCell) : (compConf.renderTableDefault || compConf.renderDefault);
|
|
@@ -2541,7 +2540,13 @@ const Cell = {
|
|
|
2541
2540
|
const { computeAggregateOpts } = $table.getComputeMaps();
|
|
2542
2541
|
const aggregateOpts = computeAggregateOpts.value;
|
|
2543
2542
|
const { mode } = aggregateOpts;
|
|
2544
|
-
if (mode === 'column'
|
|
2543
|
+
if (mode === 'column') {
|
|
2544
|
+
if (row.groupField && column.field === row.groupField) {
|
|
2545
|
+
return [Cell.renderRowGroupBtn(params, cellVNodes)];
|
|
2546
|
+
}
|
|
2547
|
+
return cellVNodes;
|
|
2548
|
+
}
|
|
2549
|
+
else if (rowGroupNode) {
|
|
2545
2550
|
return [Cell.renderRowGroupBtn(params, cellVNodes)];
|
|
2546
2551
|
}
|
|
2547
2552
|
}
|
|
@@ -2554,7 +2559,7 @@ const Cell = {
|
|
|
2554
2559
|
const { $table, column } = params;
|
|
2555
2560
|
const { slots } = column;
|
|
2556
2561
|
const headerSlot = slots ? slots.header : null;
|
|
2557
|
-
return renderHeaderCellBaseVNs(params, renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) :
|
|
2562
|
+
return renderHeaderCellBaseVNs(params, renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) : $table.getHeaderCellLabel(column)));
|
|
2558
2563
|
},
|
|
2559
2564
|
renderSeqCell(params) {
|
|
2560
2565
|
const { $table, column } = params;
|
|
@@ -2589,7 +2594,7 @@ const Cell = {
|
|
|
2589
2594
|
: [
|
|
2590
2595
|
h('span', {
|
|
2591
2596
|
class: 'vxe-radio--label'
|
|
2592
|
-
}, titleSlot ? $table.callSlot(titleSlot, params) :
|
|
2597
|
+
}, titleSlot ? $table.callSlot(titleSlot, params) : $table.getHeaderCellLabel(column))
|
|
2593
2598
|
]));
|
|
2594
2599
|
},
|
|
2595
2600
|
renderRadioCell(params) {
|
|
@@ -2658,7 +2663,7 @@ const Cell = {
|
|
|
2658
2663
|
const titleSlot = slots ? slots.title : null;
|
|
2659
2664
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
2660
2665
|
const { checkStrictly, showHeader, headerTitle } = checkboxOpts;
|
|
2661
|
-
const colTitle =
|
|
2666
|
+
const colTitle = $table.getHeaderCellLabel(column);
|
|
2662
2667
|
const ons = {};
|
|
2663
2668
|
if (!isHidden) {
|
|
2664
2669
|
ons.onClick = (evnt) => {
|
|
@@ -10409,7 +10414,7 @@ hooks$4.add('tableExportModule', {
|
|
|
10409
10414
|
function getHeaderTitle(opts, column) {
|
|
10410
10415
|
const columnOpts = computeColumnOpts.value;
|
|
10411
10416
|
const headExportMethod = column.headerExportMethod || columnOpts.headerExportMethod;
|
|
10412
|
-
return headExportMethod ? headExportMethod({ column, options: opts, $table: $xeTable }) : ((opts.isTitle ?
|
|
10417
|
+
return headExportMethod ? headExportMethod({ column, options: opts, $table: $xeTable }) : ((opts.isTitle ? $xeTable.getHeaderCellLabel(column) : column.field) || '');
|
|
10413
10418
|
}
|
|
10414
10419
|
const toBooleanValue = (cellValue) => {
|
|
10415
10420
|
return XEUtils.isBoolean(cellValue) ? (cellValue ? 'TRUE' : 'FALSE') : cellValue;
|
|
@@ -10418,9 +10423,10 @@ hooks$4.add('tableExportModule', {
|
|
|
10418
10423
|
return eqEmptyValue(cellValue) ? '' : `${cellValue}`;
|
|
10419
10424
|
};
|
|
10420
10425
|
const getBodyLabelData = (opts, columns, datas) => {
|
|
10421
|
-
const { isTreeAllExpanded, isRowGroupAllExpanded, mode } = opts;
|
|
10426
|
+
const { isTreeAllExpanded, isRowGroupAllExpanded, mode: expMode } = opts;
|
|
10422
10427
|
const { treeConfig } = props;
|
|
10423
10428
|
const { isRowGroupStatus } = reactData;
|
|
10429
|
+
const { fullColumnFieldData } = internalData;
|
|
10424
10430
|
const radioOpts = computeRadioOpts.value;
|
|
10425
10431
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
10426
10432
|
const treeOpts = computeTreeOpts.value;
|
|
@@ -10432,7 +10438,7 @@ hooks$4.add('tableExportModule', {
|
|
|
10432
10438
|
const { handleGetRowId } = createHandleGetRowId($xeTable);
|
|
10433
10439
|
if (isRowGroupStatus) {
|
|
10434
10440
|
// 如果是数据分组
|
|
10435
|
-
const { mapChildrenField } = aggregateOpts;
|
|
10441
|
+
const { mode: aggMode, showTotal, totalMethod, countFields, contentMethod, formatValuesMethod, mapChildrenField } = aggregateOpts;
|
|
10436
10442
|
const rest = [];
|
|
10437
10443
|
const expandMaps = {};
|
|
10438
10444
|
const useMaps = {};
|
|
@@ -10453,8 +10459,9 @@ hooks$4.add('tableExportModule', {
|
|
|
10453
10459
|
_expand: hasRowChild && $xeTable.isRowExpandByRow(row)
|
|
10454
10460
|
};
|
|
10455
10461
|
columns.forEach((column, $columnIndex) => {
|
|
10462
|
+
const { field, editRender, cellRender, aggFunc, rowGroupNode } = column;
|
|
10456
10463
|
let cellValue = '';
|
|
10457
|
-
const renderOpts =
|
|
10464
|
+
const renderOpts = editRender || cellRender;
|
|
10458
10465
|
let bodyExportMethod = column.exportMethod || columnOpts.exportMethod;
|
|
10459
10466
|
if (!bodyExportMethod && renderOpts && renderOpts.name) {
|
|
10460
10467
|
const compConf = renderer$3.get(renderOpts.name);
|
|
@@ -10472,21 +10479,77 @@ hooks$4.add('tableExportModule', {
|
|
|
10472
10479
|
switch (column.type) {
|
|
10473
10480
|
case 'seq': {
|
|
10474
10481
|
const seqVal = path.map((num, i) => i % 2 === 0 ? (Number(num) + 1) : '.').join('');
|
|
10475
|
-
cellValue =
|
|
10482
|
+
cellValue = expMode === 'all' ? seqVal : getSeq(seqVal, row, $rowIndex, column, $columnIndex);
|
|
10476
10483
|
break;
|
|
10477
10484
|
}
|
|
10478
|
-
case 'checkbox':
|
|
10485
|
+
case 'checkbox': {
|
|
10479
10486
|
cellValue = toBooleanValue($xeTable.isCheckedByCheckboxRow(row));
|
|
10480
10487
|
item._checkboxLabel = checkboxOpts.labelField ? XEUtils.get(row, checkboxOpts.labelField) : '';
|
|
10481
10488
|
item._checkboxDisabled = checkboxOpts.checkMethod && !checkboxOpts.checkMethod({ $table: $xeTable, row });
|
|
10482
10489
|
break;
|
|
10483
|
-
|
|
10490
|
+
}
|
|
10491
|
+
case 'radio': {
|
|
10484
10492
|
cellValue = toBooleanValue($xeTable.isCheckedByRadioRow(row));
|
|
10485
10493
|
item._radioLabel = radioOpts.labelField ? XEUtils.get(row, radioOpts.labelField) : '';
|
|
10486
10494
|
item._radioDisabled = radioOpts.checkMethod && !radioOpts.checkMethod({ $table: $xeTable, row });
|
|
10487
10495
|
break;
|
|
10488
|
-
|
|
10489
|
-
|
|
10496
|
+
}
|
|
10497
|
+
default: {
|
|
10498
|
+
if (field && row.isAggregate) {
|
|
10499
|
+
const aggRow = row;
|
|
10500
|
+
const aggData = aggRow.aggData;
|
|
10501
|
+
const currAggData = aggData ? aggData[field] : null;
|
|
10502
|
+
const groupField = aggRow.groupField;
|
|
10503
|
+
const groupContent = aggRow.groupContent;
|
|
10504
|
+
const childList = mapChildrenField ? (aggRow[mapChildrenField] || []) : [];
|
|
10505
|
+
const childCount = aggRow.childCount;
|
|
10506
|
+
const colRest = fullColumnFieldData[groupField] || {};
|
|
10507
|
+
const ctParams = {
|
|
10508
|
+
$table: $xeTable,
|
|
10509
|
+
groupField,
|
|
10510
|
+
groupColumn: (colRest ? colRest.column : null),
|
|
10511
|
+
column,
|
|
10512
|
+
groupValue: groupContent,
|
|
10513
|
+
childList,
|
|
10514
|
+
childCount,
|
|
10515
|
+
aggValue: null,
|
|
10516
|
+
/**
|
|
10517
|
+
* 已废弃
|
|
10518
|
+
* @deprecated
|
|
10519
|
+
*/
|
|
10520
|
+
children: childList,
|
|
10521
|
+
/**
|
|
10522
|
+
* 已废弃
|
|
10523
|
+
* @deprecated
|
|
10524
|
+
*/
|
|
10525
|
+
totalValue: childCount
|
|
10526
|
+
};
|
|
10527
|
+
if (aggMode === 'column' ? field === aggRow.groupField : rowGroupNode) {
|
|
10528
|
+
cellValue = groupContent;
|
|
10529
|
+
if (contentMethod) {
|
|
10530
|
+
cellValue = `${contentMethod(ctParams)}`;
|
|
10531
|
+
}
|
|
10532
|
+
if (showTotal) {
|
|
10533
|
+
cellValue = getI18n$4('vxe.table.rowGroupContentTotal', [cellValue, totalMethod ? totalMethod(ctParams) : childCount, childCount]);
|
|
10534
|
+
}
|
|
10535
|
+
}
|
|
10536
|
+
else if ($xeTable.getPivotTableAggregateCellAggValue) {
|
|
10537
|
+
const aggParams = {
|
|
10538
|
+
$table: $xeTable,
|
|
10539
|
+
row,
|
|
10540
|
+
column
|
|
10541
|
+
};
|
|
10542
|
+
cellValue = $xeTable.getPivotTableAggregateCellAggValue(aggParams);
|
|
10543
|
+
}
|
|
10544
|
+
else if (aggFunc === true || (countFields && countFields.includes(field))) {
|
|
10545
|
+
cellValue = currAggData ? currAggData.value : childCount;
|
|
10546
|
+
ctParams.aggValue = cellValue;
|
|
10547
|
+
if (formatValuesMethod) {
|
|
10548
|
+
cellValue = formatValuesMethod(ctParams);
|
|
10549
|
+
}
|
|
10550
|
+
}
|
|
10551
|
+
}
|
|
10552
|
+
else if (opts.original) {
|
|
10490
10553
|
cellValue = getCellValue(row, column);
|
|
10491
10554
|
}
|
|
10492
10555
|
else {
|
|
@@ -10502,6 +10565,8 @@ hooks$4.add('tableExportModule', {
|
|
|
10502
10565
|
}
|
|
10503
10566
|
}
|
|
10504
10567
|
}
|
|
10568
|
+
break;
|
|
10569
|
+
}
|
|
10505
10570
|
}
|
|
10506
10571
|
}
|
|
10507
10572
|
item[column.id] = toStringValue(cellValue);
|
|
@@ -10557,7 +10622,7 @@ hooks$4.add('tableExportModule', {
|
|
|
10557
10622
|
switch (column.type) {
|
|
10558
10623
|
case 'seq': {
|
|
10559
10624
|
const seqVal = path.map((num, i) => i % 2 === 0 ? (Number(num) + 1) : '.').join('');
|
|
10560
|
-
cellValue =
|
|
10625
|
+
cellValue = expMode === 'all' ? seqVal : getSeq(seqVal, row, $rowIndex, column, $columnIndex);
|
|
10561
10626
|
break;
|
|
10562
10627
|
}
|
|
10563
10628
|
case 'checkbox':
|
|
@@ -10621,7 +10686,7 @@ hooks$4.add('tableExportModule', {
|
|
|
10621
10686
|
switch (column.type) {
|
|
10622
10687
|
case 'seq': {
|
|
10623
10688
|
const seqValue = $rowIndex + 1;
|
|
10624
|
-
cellValue =
|
|
10689
|
+
cellValue = expMode === 'all' ? seqValue : getSeq(seqValue, row, $rowIndex, column, $columnIndex);
|
|
10625
10690
|
break;
|
|
10626
10691
|
}
|
|
10627
10692
|
case 'checkbox':
|
|
@@ -11003,12 +11068,12 @@ hooks$4.add('tableExportModule', {
|
|
|
11003
11068
|
const tableTitleMaps = {};
|
|
11004
11069
|
tableFullColumn.forEach((column) => {
|
|
11005
11070
|
const field = column.field;
|
|
11006
|
-
const title =
|
|
11071
|
+
const title = $xeTable.getHeaderCellLabel(column);
|
|
11007
11072
|
if (field) {
|
|
11008
11073
|
tableFieldMaps[field] = column;
|
|
11009
11074
|
}
|
|
11010
11075
|
if (title) {
|
|
11011
|
-
tableTitleMaps[
|
|
11076
|
+
tableTitleMaps[title] = column;
|
|
11012
11077
|
}
|
|
11013
11078
|
});
|
|
11014
11079
|
const tableConf = {
|
|
@@ -18605,6 +18670,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
18605
18670
|
loadScrollXData();
|
|
18606
18671
|
}
|
|
18607
18672
|
});
|
|
18673
|
+
$xeTable.clearHeaderFormatterCache();
|
|
18608
18674
|
$xeTable.clearMergeCells();
|
|
18609
18675
|
$xeTable.clearMergeFooterItems();
|
|
18610
18676
|
$xeTable.handleTableData(true);
|
|
@@ -19846,6 +19912,77 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
19846
19912
|
}
|
|
19847
19913
|
return nextTick();
|
|
19848
19914
|
},
|
|
19915
|
+
getHeaderCellLabel(fieldOrColumn) {
|
|
19916
|
+
const column = handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
19917
|
+
if (!column) {
|
|
19918
|
+
return null;
|
|
19919
|
+
}
|
|
19920
|
+
const { headerFormatter } = column;
|
|
19921
|
+
const _columnIndex = $xeTable.getVTColumnIndex(column);
|
|
19922
|
+
let cellLabel = column.getTitle();
|
|
19923
|
+
if (headerFormatter) {
|
|
19924
|
+
const { headerFullDataColData } = internalData;
|
|
19925
|
+
const colid = column.id;
|
|
19926
|
+
let colRest = headerFullDataColData[colid];
|
|
19927
|
+
if (!colRest) {
|
|
19928
|
+
colRest = headerFullDataColData[colid] = {};
|
|
19929
|
+
}
|
|
19930
|
+
const formatObj = colRest.formatObj;
|
|
19931
|
+
if (formatObj && formatObj.value === cellLabel) {
|
|
19932
|
+
return formatObj.label;
|
|
19933
|
+
}
|
|
19934
|
+
const headFormatParams = {
|
|
19935
|
+
$table: $xeTable,
|
|
19936
|
+
cellTitle: cellLabel,
|
|
19937
|
+
cellValue: cellLabel,
|
|
19938
|
+
column,
|
|
19939
|
+
_columnIndex,
|
|
19940
|
+
columnIndex: $xeTable.getColumnIndex(column)
|
|
19941
|
+
};
|
|
19942
|
+
if (XEUtils.isString(headerFormatter)) {
|
|
19943
|
+
const gFormatOpts = formats.get(headerFormatter);
|
|
19944
|
+
const fcFormatMethod = gFormatOpts ? gFormatOpts.tableHeaderCellFormatMethod : null;
|
|
19945
|
+
cellLabel = XEUtils.toValueString(fcFormatMethod ? fcFormatMethod(headFormatParams) : '');
|
|
19946
|
+
}
|
|
19947
|
+
else if (XEUtils.isArray(headerFormatter)) {
|
|
19948
|
+
const gFormatOpts = formats.get(headerFormatter[0]);
|
|
19949
|
+
const fcFormatMethod = gFormatOpts ? gFormatOpts.tableHeaderCellFormatMethod : null;
|
|
19950
|
+
cellLabel = XEUtils.toValueString(fcFormatMethod ? fcFormatMethod(headFormatParams, ...headerFormatter.slice(1)) : '');
|
|
19951
|
+
}
|
|
19952
|
+
else {
|
|
19953
|
+
cellLabel = XEUtils.toValueString(headerFormatter(headFormatParams));
|
|
19954
|
+
}
|
|
19955
|
+
}
|
|
19956
|
+
return cellLabel;
|
|
19957
|
+
},
|
|
19958
|
+
updateHeaderCellLabel(fieldOrColumn) {
|
|
19959
|
+
const column = handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
19960
|
+
if (!column) {
|
|
19961
|
+
return '';
|
|
19962
|
+
}
|
|
19963
|
+
const { headerFullDataColData } = internalData;
|
|
19964
|
+
const colid = column.id;
|
|
19965
|
+
const colRest = headerFullDataColData[colid];
|
|
19966
|
+
if (colRest) {
|
|
19967
|
+
colRest.formatObj = undefined;
|
|
19968
|
+
}
|
|
19969
|
+
return $xeTable.getHeaderCellLabel(column);
|
|
19970
|
+
},
|
|
19971
|
+
clearHeaderFormatterCache(isUpdate) {
|
|
19972
|
+
const { tableColumn } = reactData;
|
|
19973
|
+
const { headerFullDataColData } = internalData;
|
|
19974
|
+
XEUtils.each(headerFullDataColData, (colRest) => {
|
|
19975
|
+
if (colRest.formatObj) {
|
|
19976
|
+
colRest.formatObj = undefined;
|
|
19977
|
+
}
|
|
19978
|
+
});
|
|
19979
|
+
if (isUpdate) {
|
|
19980
|
+
tableColumn.forEach(column => {
|
|
19981
|
+
$xeTable.getHeaderCellLabel(column);
|
|
19982
|
+
});
|
|
19983
|
+
}
|
|
19984
|
+
return nextTick();
|
|
19985
|
+
},
|
|
19849
19986
|
getFooterCellLabel(row, fieldOrColumn) {
|
|
19850
19987
|
const column = handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
19851
19988
|
if (!column) {
|
|
@@ -22057,6 +22194,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
22057
22194
|
footData = visibleColumn.length ? footerMethod({ columns: visibleColumn, data: afterFullData, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }) : [];
|
|
22058
22195
|
}
|
|
22059
22196
|
reactData.footerTableData = footData;
|
|
22197
|
+
$xeTable.clearFooterFormatterCache();
|
|
22060
22198
|
$xeTable.handleUpdateFooterMerge();
|
|
22061
22199
|
$xeTable.dispatchEvent('footer-data-change', {
|
|
22062
22200
|
visibleColumn: internalData.visibleColumn,
|