vxe-table 4.19.3 → 4.19.4
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 +79 -13
- 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 +70 -10
- package/es/table/src/cell.js +7 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +111 -32
- 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 +103 -29
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/src/cell.js +6 -1
- package/lib/table/src/cell.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 +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 +68 -10
- package/packages/table/src/cell.ts +6 -1
- /package/es/{iconfont.1779843543280.ttf → iconfont.1779936744129.ttf} +0 -0
- /package/es/{iconfont.1779843543280.woff → iconfont.1779936744129.woff} +0 -0
- /package/es/{iconfont.1779843543280.woff2 → iconfont.1779936744129.woff2} +0 -0
- /package/lib/{iconfont.1779843543280.ttf → iconfont.1779936744129.ttf} +0 -0
- /package/lib/{iconfont.1779843543280.woff → iconfont.1779936744129.woff} +0 -0
- /package/lib/{iconfont.1779843543280.woff2 → iconfont.1779936744129.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.4";
|
|
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.4"}`;
|
|
560
560
|
const warnLog = log.create('warn', version);
|
|
561
561
|
const errLog = log.create('error', version);
|
|
562
562
|
|
|
@@ -2541,7 +2541,13 @@ const Cell = {
|
|
|
2541
2541
|
const { computeAggregateOpts } = $table.getComputeMaps();
|
|
2542
2542
|
const aggregateOpts = computeAggregateOpts.value;
|
|
2543
2543
|
const { mode } = aggregateOpts;
|
|
2544
|
-
if (mode === 'column'
|
|
2544
|
+
if (mode === 'column') {
|
|
2545
|
+
if (row.groupField && column.field === row.groupField) {
|
|
2546
|
+
return [Cell.renderRowGroupBtn(params, cellVNodes)];
|
|
2547
|
+
}
|
|
2548
|
+
return cellVNodes;
|
|
2549
|
+
}
|
|
2550
|
+
else if (rowGroupNode) {
|
|
2545
2551
|
return [Cell.renderRowGroupBtn(params, cellVNodes)];
|
|
2546
2552
|
}
|
|
2547
2553
|
}
|
|
@@ -10418,9 +10424,10 @@ hooks$4.add('tableExportModule', {
|
|
|
10418
10424
|
return eqEmptyValue(cellValue) ? '' : `${cellValue}`;
|
|
10419
10425
|
};
|
|
10420
10426
|
const getBodyLabelData = (opts, columns, datas) => {
|
|
10421
|
-
const { isTreeAllExpanded, isRowGroupAllExpanded, mode } = opts;
|
|
10427
|
+
const { isTreeAllExpanded, isRowGroupAllExpanded, mode: expMode } = opts;
|
|
10422
10428
|
const { treeConfig } = props;
|
|
10423
10429
|
const { isRowGroupStatus } = reactData;
|
|
10430
|
+
const { fullColumnFieldData } = internalData;
|
|
10424
10431
|
const radioOpts = computeRadioOpts.value;
|
|
10425
10432
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
10426
10433
|
const treeOpts = computeTreeOpts.value;
|
|
@@ -10432,7 +10439,7 @@ hooks$4.add('tableExportModule', {
|
|
|
10432
10439
|
const { handleGetRowId } = createHandleGetRowId($xeTable);
|
|
10433
10440
|
if (isRowGroupStatus) {
|
|
10434
10441
|
// 如果是数据分组
|
|
10435
|
-
const { mapChildrenField } = aggregateOpts;
|
|
10442
|
+
const { mode: aggMode, showTotal, totalMethod, countFields, contentMethod, formatValuesMethod, mapChildrenField } = aggregateOpts;
|
|
10436
10443
|
const rest = [];
|
|
10437
10444
|
const expandMaps = {};
|
|
10438
10445
|
const useMaps = {};
|
|
@@ -10453,8 +10460,9 @@ hooks$4.add('tableExportModule', {
|
|
|
10453
10460
|
_expand: hasRowChild && $xeTable.isRowExpandByRow(row)
|
|
10454
10461
|
};
|
|
10455
10462
|
columns.forEach((column, $columnIndex) => {
|
|
10463
|
+
const { field, editRender, cellRender, aggFunc, rowGroupNode } = column;
|
|
10456
10464
|
let cellValue = '';
|
|
10457
|
-
const renderOpts =
|
|
10465
|
+
const renderOpts = editRender || cellRender;
|
|
10458
10466
|
let bodyExportMethod = column.exportMethod || columnOpts.exportMethod;
|
|
10459
10467
|
if (!bodyExportMethod && renderOpts && renderOpts.name) {
|
|
10460
10468
|
const compConf = renderer$3.get(renderOpts.name);
|
|
@@ -10472,21 +10480,77 @@ hooks$4.add('tableExportModule', {
|
|
|
10472
10480
|
switch (column.type) {
|
|
10473
10481
|
case 'seq': {
|
|
10474
10482
|
const seqVal = path.map((num, i) => i % 2 === 0 ? (Number(num) + 1) : '.').join('');
|
|
10475
|
-
cellValue =
|
|
10483
|
+
cellValue = expMode === 'all' ? seqVal : getSeq(seqVal, row, $rowIndex, column, $columnIndex);
|
|
10476
10484
|
break;
|
|
10477
10485
|
}
|
|
10478
|
-
case 'checkbox':
|
|
10486
|
+
case 'checkbox': {
|
|
10479
10487
|
cellValue = toBooleanValue($xeTable.isCheckedByCheckboxRow(row));
|
|
10480
10488
|
item._checkboxLabel = checkboxOpts.labelField ? XEUtils.get(row, checkboxOpts.labelField) : '';
|
|
10481
10489
|
item._checkboxDisabled = checkboxOpts.checkMethod && !checkboxOpts.checkMethod({ $table: $xeTable, row });
|
|
10482
10490
|
break;
|
|
10483
|
-
|
|
10491
|
+
}
|
|
10492
|
+
case 'radio': {
|
|
10484
10493
|
cellValue = toBooleanValue($xeTable.isCheckedByRadioRow(row));
|
|
10485
10494
|
item._radioLabel = radioOpts.labelField ? XEUtils.get(row, radioOpts.labelField) : '';
|
|
10486
10495
|
item._radioDisabled = radioOpts.checkMethod && !radioOpts.checkMethod({ $table: $xeTable, row });
|
|
10487
10496
|
break;
|
|
10488
|
-
|
|
10489
|
-
|
|
10497
|
+
}
|
|
10498
|
+
default: {
|
|
10499
|
+
if (field && row.isAggregate) {
|
|
10500
|
+
const aggRow = row;
|
|
10501
|
+
const aggData = aggRow.aggData;
|
|
10502
|
+
const currAggData = aggData ? aggData[field] : null;
|
|
10503
|
+
const groupField = aggRow.groupField;
|
|
10504
|
+
const groupContent = aggRow.groupContent;
|
|
10505
|
+
const childList = mapChildrenField ? (aggRow[mapChildrenField] || []) : [];
|
|
10506
|
+
const childCount = aggRow.childCount;
|
|
10507
|
+
const colRest = fullColumnFieldData[groupField] || {};
|
|
10508
|
+
const ctParams = {
|
|
10509
|
+
$table: $xeTable,
|
|
10510
|
+
groupField,
|
|
10511
|
+
groupColumn: (colRest ? colRest.column : null),
|
|
10512
|
+
column,
|
|
10513
|
+
groupValue: groupContent,
|
|
10514
|
+
childList,
|
|
10515
|
+
childCount,
|
|
10516
|
+
aggValue: null,
|
|
10517
|
+
/**
|
|
10518
|
+
* 已废弃
|
|
10519
|
+
* @deprecated
|
|
10520
|
+
*/
|
|
10521
|
+
children: childList,
|
|
10522
|
+
/**
|
|
10523
|
+
* 已废弃
|
|
10524
|
+
* @deprecated
|
|
10525
|
+
*/
|
|
10526
|
+
totalValue: childCount
|
|
10527
|
+
};
|
|
10528
|
+
if (aggMode === 'column' ? field === aggRow.groupField : rowGroupNode) {
|
|
10529
|
+
cellValue = groupContent;
|
|
10530
|
+
if (contentMethod) {
|
|
10531
|
+
cellValue = `${contentMethod(ctParams)}`;
|
|
10532
|
+
}
|
|
10533
|
+
if (showTotal) {
|
|
10534
|
+
cellValue = getI18n$4('vxe.table.rowGroupContentTotal', [cellValue, totalMethod ? totalMethod(ctParams) : childCount, childCount]);
|
|
10535
|
+
}
|
|
10536
|
+
}
|
|
10537
|
+
else if ($xeTable.getPivotTableAggregateCellAggValue) {
|
|
10538
|
+
const aggParams = {
|
|
10539
|
+
$table: $xeTable,
|
|
10540
|
+
row,
|
|
10541
|
+
column
|
|
10542
|
+
};
|
|
10543
|
+
cellValue = $xeTable.getPivotTableAggregateCellAggValue(aggParams);
|
|
10544
|
+
}
|
|
10545
|
+
else if (aggFunc === true || (countFields && countFields.includes(field))) {
|
|
10546
|
+
cellValue = currAggData ? currAggData.value : childCount;
|
|
10547
|
+
ctParams.aggValue = cellValue;
|
|
10548
|
+
if (formatValuesMethod) {
|
|
10549
|
+
cellValue = formatValuesMethod(ctParams);
|
|
10550
|
+
}
|
|
10551
|
+
}
|
|
10552
|
+
}
|
|
10553
|
+
else if (opts.original) {
|
|
10490
10554
|
cellValue = getCellValue(row, column);
|
|
10491
10555
|
}
|
|
10492
10556
|
else {
|
|
@@ -10502,6 +10566,8 @@ hooks$4.add('tableExportModule', {
|
|
|
10502
10566
|
}
|
|
10503
10567
|
}
|
|
10504
10568
|
}
|
|
10569
|
+
break;
|
|
10570
|
+
}
|
|
10505
10571
|
}
|
|
10506
10572
|
}
|
|
10507
10573
|
item[column.id] = toStringValue(cellValue);
|
|
@@ -10557,7 +10623,7 @@ hooks$4.add('tableExportModule', {
|
|
|
10557
10623
|
switch (column.type) {
|
|
10558
10624
|
case 'seq': {
|
|
10559
10625
|
const seqVal = path.map((num, i) => i % 2 === 0 ? (Number(num) + 1) : '.').join('');
|
|
10560
|
-
cellValue =
|
|
10626
|
+
cellValue = expMode === 'all' ? seqVal : getSeq(seqVal, row, $rowIndex, column, $columnIndex);
|
|
10561
10627
|
break;
|
|
10562
10628
|
}
|
|
10563
10629
|
case 'checkbox':
|
|
@@ -10621,7 +10687,7 @@ hooks$4.add('tableExportModule', {
|
|
|
10621
10687
|
switch (column.type) {
|
|
10622
10688
|
case 'seq': {
|
|
10623
10689
|
const seqValue = $rowIndex + 1;
|
|
10624
|
-
cellValue =
|
|
10690
|
+
cellValue = expMode === 'all' ? seqValue : getSeq(seqValue, row, $rowIndex, column, $columnIndex);
|
|
10625
10691
|
break;
|
|
10626
10692
|
}
|
|
10627
10693
|
case 'checkbox':
|