vxe-table 4.23.8 → 4.23.9
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 +5715 -3783
- package/es/components.d.ts +1 -0
- package/es/components.js +2 -7
- package/es/grid/src/emits.js +1 -15
- package/es/grid/src/grid.js +397 -120
- package/es/index.esm.js +1 -0
- package/es/index.js +1 -0
- package/es/table/module/custom/hook.js +49 -42
- package/es/table/module/custom/panel.js +777 -527
- package/es/table/module/edit/hook.js +140 -62
- package/es/table/module/export/export-panel.js +399 -316
- package/es/table/module/export/hook.js +395 -337
- package/es/table/module/export/import-panel.js +152 -123
- package/es/table/module/filter/hook.js +16 -2
- package/es/table/module/filter/panel.js +146 -84
- package/es/table/module/keyboard/hook.js +8 -4
- package/es/table/module/menu/panel.js +197 -126
- package/es/table/render/index.js +151 -98
- package/es/table/src/body.js +355 -233
- package/es/table/src/cell.js +426 -269
- package/es/table/src/columnInfo.js +1 -0
- package/es/table/src/footer.js +144 -99
- package/es/table/src/group.js +7 -3
- package/es/table/src/header.js +229 -172
- package/es/table/src/table.js +1503 -1030
- package/es/table/src/util.js +15 -19
- package/es/toolbar/src/toolbar.js +132 -75
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +9 -6
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.d.ts +1 -1
- package/lib/components.js +2 -7
- package/lib/grid/src/emits.js +1 -15
- package/lib/grid/src/grid.js +397 -120
- package/lib/index.common.js +1 -0
- package/lib/index.js +1 -0
- package/lib/index.umd.js +5732 -3800
- package/lib/index.umd.min.js +3 -3
- package/lib/table/module/custom/hook.js +49 -42
- package/lib/table/module/custom/panel.js +777 -527
- package/lib/table/module/edit/hook.js +140 -62
- package/lib/table/module/export/export-panel.js +399 -316
- package/lib/table/module/export/hook.js +395 -337
- package/lib/table/module/export/import-panel.js +152 -123
- package/lib/table/module/filter/hook.js +16 -2
- package/lib/table/module/filter/panel.js +146 -84
- package/lib/table/module/keyboard/hook.js +8 -4
- package/lib/table/module/menu/panel.js +197 -126
- package/lib/table/render/index.js +151 -98
- package/lib/table/src/body.js +355 -233
- package/lib/table/src/cell.js +426 -269
- package/lib/table/src/columnInfo.js +1 -0
- package/lib/table/src/footer.js +144 -99
- package/lib/table/src/group.js +7 -3
- package/lib/table/src/header.js +229 -172
- package/lib/table/src/table.js +1471 -1029
- package/lib/table/src/util.js +15 -19
- package/lib/toolbar/src/toolbar.js +132 -75
- package/lib/ui/index.js +1 -1
- package/lib/ui/src/dom.js +9 -6
- package/lib/ui/src/log.js +1 -1
- package/package.json +2 -2
- package/packages/colgroup/index.ts +22 -22
- package/packages/column/index.ts +22 -22
- package/packages/components.ts +41 -44
- package/packages/grid/index.ts +18 -18
- package/packages/grid/src/emits.ts +5 -19
- package/packages/grid/src/grid.ts +2229 -1925
- package/packages/grid/src/props.ts +22 -23
- package/packages/index.ts +11 -11
- package/packages/locale/lang/fr-FR.ts +15 -15
- package/packages/locale/lang/it-IT.ts +4 -4
- package/packages/locale/lang/uk-UA.ts +1 -1
- package/packages/locale/lang/uz-UZ.ts +13 -13
- package/packages/locale/lang/zh-CN.ts +907 -907
- package/packages/table/index.ts +26 -26
- package/packages/table/module/custom/hook.ts +510 -503
- package/packages/table/module/custom/panel.ts +2002 -1743
- package/packages/table/module/edit/hook.ts +1224 -1131
- package/packages/table/module/export/export-panel.ts +697 -611
- package/packages/table/module/export/hook.ts +2160 -2059
- package/packages/table/module/export/import-panel.ts +319 -279
- package/packages/table/module/export/util.ts +25 -24
- package/packages/table/module/filter/hook.ts +519 -501
- package/packages/table/module/filter/panel.ts +368 -304
- package/packages/table/module/keyboard/hook.ts +498 -494
- package/packages/table/module/menu/hook.ts +330 -330
- package/packages/table/module/menu/panel.ts +272 -201
- package/packages/table/module/validator/hook.ts +653 -635
- package/packages/table/render/index.ts +1819 -1744
- package/packages/table/src/body.ts +1078 -955
- package/packages/table/src/cell.ts +1524 -1359
- package/packages/table/src/column.ts +192 -192
- package/packages/table/src/columnInfo.ts +232 -232
- package/packages/table/src/emits.ts +134 -134
- package/packages/table/src/footer.ts +425 -380
- package/packages/table/src/group.ts +67 -63
- package/packages/table/src/header.ts +642 -581
- package/packages/table/src/props.ts +336 -336
- package/packages/table/src/store.ts +14 -14
- package/packages/table/src/table.ts +16011 -15454
- package/packages/table/src/use/cell-view.ts +41 -44
- package/packages/table/src/use/index.ts +1 -1
- package/packages/table/src/util.ts +1206 -1216
- package/packages/toolbar/index.ts +18 -18
- package/packages/toolbar/src/toolbar.ts +768 -706
- package/packages/ui/index.ts +519 -520
- package/packages/ui/src/anime.ts +51 -52
- package/packages/ui/src/comp.ts +3 -3
- package/packages/ui/src/dom.ts +466 -463
- package/packages/ui/src/log.ts +19 -19
- package/packages/ui/src/utils.ts +66 -66
- package/packages/ui/src/vn.ts +55 -55
- package/packages/v-x-e-table/index.d.ts +3 -3
- package/packages/v-x-e-table/index.ts +3 -3
- package/types/all.d.ts +76 -76
- package/types/index.d.ts +4 -4
- /package/dist/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/dist/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
- /package/dist/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/es/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/es/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
- /package/es/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/lib/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/lib/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
- /package/lib/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
|
@@ -240,13 +240,17 @@ function parseXML(tableConf, content) {
|
|
|
240
240
|
return { fields, rows };
|
|
241
241
|
}
|
|
242
242
|
function clearColumnConvert(columns) {
|
|
243
|
-
XEUtils.eachTree(
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
243
|
+
XEUtils.eachTree(
|
|
244
|
+
columns,
|
|
245
|
+
(column) => {
|
|
246
|
+
delete column._level;
|
|
247
|
+
delete column._colSpan;
|
|
248
|
+
delete column._rowSpan;
|
|
249
|
+
delete column._children;
|
|
250
|
+
delete column.childNodes;
|
|
251
|
+
},
|
|
252
|
+
{ children: "children" }
|
|
253
|
+
);
|
|
250
254
|
}
|
|
251
255
|
const tableExportMethodKeys = ["exportData", "importByFile", "importData", "saveFile", "readFile", "print", "getPrintHtml", "openImport", "closeImport", "openExport", "closeExport", "openPrint", "closePrint"];
|
|
252
256
|
hooks.add("tableExportModule", {
|
|
@@ -302,136 +306,140 @@ hooks.add("tableExportModule", {
|
|
|
302
306
|
const rest = [];
|
|
303
307
|
const expandMaps = {};
|
|
304
308
|
const useMaps = {};
|
|
305
|
-
XEUtils.eachTree(
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
const
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
if (
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
if (!bodyExportMethod) {
|
|
333
|
-
bodyExportMethod = columnOpts.exportMethod;
|
|
334
|
-
}
|
|
335
|
-
if (bodyExportMethod) {
|
|
336
|
-
cellValue = bodyExportMethod({ $table: $xeTable, row, column, options: opts });
|
|
337
|
-
} else {
|
|
338
|
-
switch (column.type) {
|
|
339
|
-
case "seq": {
|
|
340
|
-
const seqVal = path.map((num, i) => i % 2 === 0 ? Number(num) + 1 : ".").join("");
|
|
341
|
-
cellValue = expMode === "all" ? seqVal : getSeq(seqVal, row, $rowIndex, column, $columnIndex);
|
|
342
|
-
break;
|
|
343
|
-
}
|
|
344
|
-
case "checkbox": {
|
|
345
|
-
cellValue = toBooleanValue($xeTable.isCheckedByCheckboxRow(row));
|
|
346
|
-
item2._checkboxLabel = checkboxOpts.labelField ? XEUtils.get(row, checkboxOpts.labelField) : "";
|
|
347
|
-
item2._checkboxDisabled = checkboxOpts.checkMethod && !checkboxOpts.checkMethod({ $table: $xeTable, row });
|
|
348
|
-
break;
|
|
349
|
-
}
|
|
350
|
-
case "radio": {
|
|
351
|
-
cellValue = toBooleanValue($xeTable.isCheckedByRadioRow(row));
|
|
352
|
-
item2._radioLabel = radioOpts.labelField ? XEUtils.get(row, radioOpts.labelField) : "";
|
|
353
|
-
item2._radioDisabled = radioOpts.checkMethod && !radioOpts.checkMethod({ $table: $xeTable, row });
|
|
354
|
-
break;
|
|
309
|
+
XEUtils.eachTree(
|
|
310
|
+
datas,
|
|
311
|
+
(item, $rowIndex, items, path, parentItem, nodes) => {
|
|
312
|
+
const row = item._row || item;
|
|
313
|
+
const rowid = handleGetRowId(row);
|
|
314
|
+
if (useMaps[rowid]) {
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
const parentRow = parentItem && parentItem._row ? parentItem._row : parentItem;
|
|
318
|
+
const pRowid = parentRow ? handleGetRowId(parentRow) : "";
|
|
319
|
+
if (isRowGroupAllExpanded || !parentRow || expandMaps[pRowid] && $xeTable.isRowExpandByRow(parentRow)) {
|
|
320
|
+
const hasRowChild = mapChildrenField && row[mapChildrenField] && row[mapChildrenField].length;
|
|
321
|
+
const item2 = {
|
|
322
|
+
_row: row,
|
|
323
|
+
_level: nodes.length - 1,
|
|
324
|
+
_hasChild: hasRowChild,
|
|
325
|
+
_expand: hasRowChild && $xeTable.isRowExpandByRow(row)
|
|
326
|
+
};
|
|
327
|
+
columns.forEach((column, $columnIndex) => {
|
|
328
|
+
const { field, editRender, cellRender, aggFunc, rowGroupNode } = column;
|
|
329
|
+
let cellValue = "";
|
|
330
|
+
const renderOpts = editRender || cellRender;
|
|
331
|
+
let bodyExportMethod = column.exportMethod || columnOpts.exportMethod;
|
|
332
|
+
if (!bodyExportMethod && renderOpts && renderOpts.name) {
|
|
333
|
+
const compConf = rendererOpts[renderOpts.name] || renderer.get(renderOpts.name);
|
|
334
|
+
if (compConf) {
|
|
335
|
+
bodyExportMethod = compConf.tableExportMethod || compConf.exportMethod;
|
|
355
336
|
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
const
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
cellValue = getI18n("vxe.table.rowGroupContentTotal", [cellValue, totalMethod ? totalMethod(ctParams) : childCount, childCount]);
|
|
393
|
-
}
|
|
394
|
-
} else if ($xeTable.getPivotTableAggregateCellAggValue) {
|
|
395
|
-
const aggParams = {
|
|
337
|
+
}
|
|
338
|
+
if (!bodyExportMethod) {
|
|
339
|
+
bodyExportMethod = columnOpts.exportMethod;
|
|
340
|
+
}
|
|
341
|
+
if (bodyExportMethod) {
|
|
342
|
+
cellValue = bodyExportMethod({ $table: $xeTable, row, column, options: opts });
|
|
343
|
+
} else {
|
|
344
|
+
switch (column.type) {
|
|
345
|
+
case "seq": {
|
|
346
|
+
const seqVal = path.map((num, i) => i % 2 === 0 ? Number(num) + 1 : ".").join("");
|
|
347
|
+
cellValue = expMode === "all" ? seqVal : getSeq(seqVal, row, $rowIndex, column, $columnIndex);
|
|
348
|
+
break;
|
|
349
|
+
}
|
|
350
|
+
case "checkbox": {
|
|
351
|
+
cellValue = toBooleanValue($xeTable.isCheckedByCheckboxRow(row));
|
|
352
|
+
item2._checkboxLabel = checkboxOpts.labelField ? XEUtils.get(row, checkboxOpts.labelField) : "";
|
|
353
|
+
item2._checkboxDisabled = checkboxOpts.checkMethod && !checkboxOpts.checkMethod({ $table: $xeTable, row });
|
|
354
|
+
break;
|
|
355
|
+
}
|
|
356
|
+
case "radio": {
|
|
357
|
+
cellValue = toBooleanValue($xeTable.isCheckedByRadioRow(row));
|
|
358
|
+
item2._radioLabel = radioOpts.labelField ? XEUtils.get(row, radioOpts.labelField) : "";
|
|
359
|
+
item2._radioDisabled = radioOpts.checkMethod && !radioOpts.checkMethod({ $table: $xeTable, row });
|
|
360
|
+
break;
|
|
361
|
+
}
|
|
362
|
+
default: {
|
|
363
|
+
if (field && row.isAggregate) {
|
|
364
|
+
const aggRow = row;
|
|
365
|
+
const aggData = aggRow.aggData;
|
|
366
|
+
const currAggData = aggData ? aggData[field] : null;
|
|
367
|
+
const groupField = aggRow.groupField;
|
|
368
|
+
const groupContent = aggRow.groupContent;
|
|
369
|
+
const childList = mapChildrenField ? aggRow[mapChildrenField] || [] : [];
|
|
370
|
+
const childCount = aggRow.childCount;
|
|
371
|
+
const colRest = fullColumnFieldData[groupField] || {};
|
|
372
|
+
const ctParams = {
|
|
396
373
|
$table: $xeTable,
|
|
397
|
-
|
|
398
|
-
column
|
|
374
|
+
groupField,
|
|
375
|
+
groupColumn: colRest ? colRest.column : null,
|
|
376
|
+
column,
|
|
377
|
+
groupValue: groupContent,
|
|
378
|
+
childList,
|
|
379
|
+
childCount,
|
|
380
|
+
aggValue: null,
|
|
381
|
+
/**
|
|
382
|
+
* 已废弃
|
|
383
|
+
* @deprecated
|
|
384
|
+
*/
|
|
385
|
+
children: childList,
|
|
386
|
+
/**
|
|
387
|
+
* 已废弃
|
|
388
|
+
* @deprecated
|
|
389
|
+
*/
|
|
390
|
+
totalValue: childCount
|
|
399
391
|
};
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
392
|
+
if (aggMode === "column" ? field === aggRow.groupField : rowGroupNode) {
|
|
393
|
+
cellValue = groupContent;
|
|
394
|
+
if (contentMethod) {
|
|
395
|
+
cellValue = `${contentMethod(ctParams)}`;
|
|
396
|
+
}
|
|
397
|
+
if (showTotal) {
|
|
398
|
+
cellValue = getI18n("vxe.table.rowGroupContentTotal", [cellValue, totalMethod ? totalMethod(ctParams) : childCount, childCount]);
|
|
399
|
+
}
|
|
400
|
+
} else if ($xeTable.getPivotTableAggregateCellAggValue) {
|
|
401
|
+
const aggParams = {
|
|
402
|
+
$table: $xeTable,
|
|
403
|
+
row,
|
|
404
|
+
column
|
|
405
|
+
};
|
|
406
|
+
cellValue = $xeTable.getPivotTableAggregateCellAggValue(aggParams);
|
|
407
|
+
} else if (aggFunc === true || countFields && countFields.includes(field)) {
|
|
408
|
+
cellValue = currAggData ? currAggData.value : childCount;
|
|
409
|
+
ctParams.aggValue = cellValue;
|
|
410
|
+
if (formatValuesMethod) {
|
|
411
|
+
cellValue = formatValuesMethod(ctParams);
|
|
412
|
+
}
|
|
406
413
|
}
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
cellValue = getCellValue(row, column);
|
|
410
|
-
} else {
|
|
411
|
-
cellValue = $xeTable.getCellLabel(row, column);
|
|
412
|
-
if (column.type === "html") {
|
|
413
|
-
htmlCellElem.innerHTML = cellValue;
|
|
414
|
-
cellValue = htmlCellElem.innerText.trim();
|
|
414
|
+
} else if (opts.original) {
|
|
415
|
+
cellValue = getCellValue(row, column);
|
|
415
416
|
} else {
|
|
416
|
-
|
|
417
|
-
if (
|
|
418
|
-
|
|
417
|
+
cellValue = $xeTable.getCellLabel(row, column);
|
|
418
|
+
if (column.type === "html") {
|
|
419
|
+
htmlCellElem.innerHTML = cellValue;
|
|
420
|
+
cellValue = htmlCellElem.innerText.trim();
|
|
421
|
+
} else {
|
|
422
|
+
const cell = $xeTable.getCellElement(row, column);
|
|
423
|
+
if (cell && !hasClass(cell, "is--progress")) {
|
|
424
|
+
cellValue = cell.innerText.trim();
|
|
425
|
+
}
|
|
419
426
|
}
|
|
420
427
|
}
|
|
428
|
+
break;
|
|
421
429
|
}
|
|
422
|
-
break;
|
|
423
430
|
}
|
|
424
431
|
}
|
|
432
|
+
item2[column.id] = toStringValue(cellValue);
|
|
433
|
+
});
|
|
434
|
+
useMaps[rowid] = true;
|
|
435
|
+
if (pRowid) {
|
|
436
|
+
expandMaps[pRowid] = true;
|
|
425
437
|
}
|
|
426
|
-
item2
|
|
427
|
-
});
|
|
428
|
-
useMaps[rowid] = true;
|
|
429
|
-
if (pRowid) {
|
|
430
|
-
expandMaps[pRowid] = true;
|
|
438
|
+
rest.push(Object.assign(item2, row));
|
|
431
439
|
}
|
|
432
|
-
|
|
433
|
-
}
|
|
434
|
-
|
|
440
|
+
},
|
|
441
|
+
{ children: mapChildrenField }
|
|
442
|
+
);
|
|
435
443
|
return rest;
|
|
436
444
|
}
|
|
437
445
|
if (treeConfig) {
|
|
@@ -440,84 +448,88 @@ hooks.add("tableExportModule", {
|
|
|
440
448
|
const rest = [];
|
|
441
449
|
const expandMaps = {};
|
|
442
450
|
const useMaps = {};
|
|
443
|
-
XEUtils.eachTree(
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
const
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
if (
|
|
467
|
-
|
|
451
|
+
XEUtils.eachTree(
|
|
452
|
+
datas,
|
|
453
|
+
(item, $rowIndex, items, path, parentItem, nodes) => {
|
|
454
|
+
const row = item._row || item;
|
|
455
|
+
const rowid = handleGetRowId(row);
|
|
456
|
+
if (useMaps[rowid]) {
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
const parentRow = parentItem && parentItem._row ? parentItem._row : parentItem;
|
|
460
|
+
const pRowid = parentRow ? handleGetRowId(parentRow) : "";
|
|
461
|
+
if (isTreeAllExpanded || !parentRow || expandMaps[pRowid] && $xeTable.isTreeExpandByRow(parentRow)) {
|
|
462
|
+
const hasRowChild = row[childrenField] && row[childrenField].length;
|
|
463
|
+
const item2 = {
|
|
464
|
+
_row: row,
|
|
465
|
+
_level: nodes.length - 1,
|
|
466
|
+
_hasChild: hasRowChild,
|
|
467
|
+
_expand: hasRowChild && $xeTable.isTreeExpandByRow(row)
|
|
468
|
+
};
|
|
469
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
470
|
+
columns.forEach((column, $columnIndex) => {
|
|
471
|
+
let cellValue = "";
|
|
472
|
+
const renderOpts = column.editRender || column.cellRender;
|
|
473
|
+
let bodyExportMethod = column.exportMethod || columnOpts.exportMethod;
|
|
474
|
+
if (!bodyExportMethod && renderOpts && renderOpts.name) {
|
|
475
|
+
const compConf = rendererOpts[renderOpts.name] || renderer.get(renderOpts.name);
|
|
476
|
+
if (compConf) {
|
|
477
|
+
bodyExportMethod = compConf.tableExportMethod || compConf.exportMethod;
|
|
478
|
+
}
|
|
468
479
|
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
480
|
+
if (!bodyExportMethod) {
|
|
481
|
+
bodyExportMethod = columnOpts.exportMethod;
|
|
482
|
+
}
|
|
483
|
+
if (bodyExportMethod) {
|
|
484
|
+
cellValue = bodyExportMethod({ $table: $xeTable, row, column, options: opts });
|
|
485
|
+
} else {
|
|
486
|
+
switch (column.type) {
|
|
487
|
+
case "seq": {
|
|
488
|
+
let seqVal = path.map((num, i) => i % 2 === 0 ? Number(num) + 1 : ".").join("");
|
|
489
|
+
if (seqMode === "increasing") {
|
|
490
|
+
seqVal = rowRest ? rowRest._index + 1 : -1;
|
|
491
|
+
}
|
|
492
|
+
cellValue = expMode === "all" ? seqVal : getSeq(seqVal, row, $rowIndex, column, $columnIndex);
|
|
493
|
+
break;
|
|
481
494
|
}
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
default:
|
|
496
|
-
if (opts.original) {
|
|
497
|
-
cellValue = getCellValue(row, column);
|
|
498
|
-
} else {
|
|
499
|
-
cellValue = $xeTable.getCellLabel(row, column);
|
|
500
|
-
if (column.type === "html") {
|
|
501
|
-
htmlCellElem.innerHTML = cellValue;
|
|
502
|
-
cellValue = htmlCellElem.innerText.trim();
|
|
495
|
+
case "checkbox":
|
|
496
|
+
cellValue = toBooleanValue($xeTable.isCheckedByCheckboxRow(row));
|
|
497
|
+
item2._checkboxLabel = checkboxOpts.labelField ? XEUtils.get(row, checkboxOpts.labelField) : "";
|
|
498
|
+
item2._checkboxDisabled = checkboxOpts.checkMethod && !checkboxOpts.checkMethod({ $table: $xeTable, row });
|
|
499
|
+
break;
|
|
500
|
+
case "radio":
|
|
501
|
+
cellValue = toBooleanValue($xeTable.isCheckedByRadioRow(row));
|
|
502
|
+
item2._radioLabel = radioOpts.labelField ? XEUtils.get(row, radioOpts.labelField) : "";
|
|
503
|
+
item2._radioDisabled = radioOpts.checkMethod && !radioOpts.checkMethod({ $table: $xeTable, row });
|
|
504
|
+
break;
|
|
505
|
+
default:
|
|
506
|
+
if (opts.original) {
|
|
507
|
+
cellValue = getCellValue(row, column);
|
|
503
508
|
} else {
|
|
504
|
-
|
|
505
|
-
if (
|
|
506
|
-
|
|
509
|
+
cellValue = $xeTable.getCellLabel(row, column);
|
|
510
|
+
if (column.type === "html") {
|
|
511
|
+
htmlCellElem.innerHTML = cellValue;
|
|
512
|
+
cellValue = htmlCellElem.innerText.trim();
|
|
513
|
+
} else {
|
|
514
|
+
const cell = $xeTable.getCellElement(row, column);
|
|
515
|
+
if (cell && !hasClass(cell, "is--progress")) {
|
|
516
|
+
cellValue = cell.innerText.trim();
|
|
517
|
+
}
|
|
507
518
|
}
|
|
508
519
|
}
|
|
509
|
-
|
|
520
|
+
}
|
|
510
521
|
}
|
|
522
|
+
item2[column.id] = toStringValue(cellValue);
|
|
523
|
+
});
|
|
524
|
+
useMaps[rowid] = true;
|
|
525
|
+
if (pRowid) {
|
|
526
|
+
expandMaps[pRowid] = true;
|
|
511
527
|
}
|
|
512
|
-
item2
|
|
513
|
-
});
|
|
514
|
-
useMaps[rowid] = true;
|
|
515
|
-
if (pRowid) {
|
|
516
|
-
expandMaps[pRowid] = true;
|
|
528
|
+
rest.push(Object.assign(item2, row));
|
|
517
529
|
}
|
|
518
|
-
|
|
519
|
-
}
|
|
520
|
-
|
|
530
|
+
},
|
|
531
|
+
{ children: childrenField }
|
|
532
|
+
);
|
|
521
533
|
return rest;
|
|
522
534
|
}
|
|
523
535
|
return datas.map((row, $rowIndex) => {
|
|
@@ -690,13 +702,17 @@ hooks.add("tableExportModule", {
|
|
|
690
702
|
}
|
|
691
703
|
let childWidth = 0;
|
|
692
704
|
let countChild = 0;
|
|
693
|
-
XEUtils.eachTree(
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
705
|
+
XEUtils.eachTree(
|
|
706
|
+
[column],
|
|
707
|
+
(item) => {
|
|
708
|
+
if (!item.childNodes || !column.childNodes.length) {
|
|
709
|
+
countChild++;
|
|
710
|
+
}
|
|
711
|
+
const ptWidth = printWidthMaps[item.id];
|
|
712
|
+
childWidth += ptWidth || 0;
|
|
713
|
+
},
|
|
714
|
+
{ children: "childNodes" }
|
|
715
|
+
);
|
|
700
716
|
const colWidth = childWidth - countChild;
|
|
701
717
|
colWidthMaps[column.id] = colWidth;
|
|
702
718
|
printWidthMaps[column.id] = XEUtils.floor(colWidth / tableWidth * 180, 2);
|
|
@@ -740,19 +756,8 @@ hooks.add("tableExportModule", {
|
|
|
740
756
|
return colWidthMaps[column.id] ? "width:" + toCssUnit(colWidthMaps[column.id]) : "";
|
|
741
757
|
};
|
|
742
758
|
const allCls = "check-all";
|
|
743
|
-
const clss = [
|
|
744
|
-
|
|
745
|
-
`border--${toTableBorder(border)}`,
|
|
746
|
-
isPrint ? "is--print" : "",
|
|
747
|
-
isAutoWidth ? "is--auto-width" : "",
|
|
748
|
-
isScaleWidth ? "is--scale-width" : "",
|
|
749
|
-
isDefaultWidth ? "is--default-width" : "",
|
|
750
|
-
isHeader ? "is--header" : ""
|
|
751
|
-
].filter((cls) => cls);
|
|
752
|
-
const tables = [
|
|
753
|
-
`<table class="${clss.join(" ")}" border="0" cellspacing="0" cellpadding="0">`,
|
|
754
|
-
`<colgroup>${columns.map((column) => `<col style="${getHeaderWidthStyle(column)}">`).join("")}</colgroup>`
|
|
755
|
-
];
|
|
759
|
+
const clss = ["vxe-table", `border--${toTableBorder(border)}`, isPrint ? "is--print" : "", isAutoWidth ? "is--auto-width" : "", isScaleWidth ? "is--scale-width" : "", isDefaultWidth ? "is--default-width" : "", isHeader ? "is--header" : ""].filter((cls) => cls);
|
|
760
|
+
const tables = [`<table class="${clss.join(" ")}" border="0" cellspacing="0" cellpadding="0">`, `<colgroup>${columns.map((column) => `<col style="${getHeaderWidthStyle(column)}">`).join("")}</colgroup>`];
|
|
756
761
|
if (isHeader) {
|
|
757
762
|
tables.push("<thead>");
|
|
758
763
|
if (isColgroup && !original) {
|
|
@@ -1198,17 +1203,20 @@ hooks.add("tableExportModule", {
|
|
|
1198
1203
|
const proxyOpts = $xeGGWrapper ? $xeGGWrapper.getComputeMaps().computeProxyOpts.value : {};
|
|
1199
1204
|
const hasFooter = !!footerTableData.length;
|
|
1200
1205
|
const hasMerge = !!(mergeBodyList.length || mergeFooterList.length);
|
|
1201
|
-
const defOpts = Object.assign(
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1206
|
+
const defOpts = Object.assign(
|
|
1207
|
+
{
|
|
1208
|
+
message: true,
|
|
1209
|
+
isHeader: showHeader,
|
|
1210
|
+
isTitle: showHeader,
|
|
1211
|
+
isFooter: showFooter,
|
|
1212
|
+
isColgroup: isGroup,
|
|
1213
|
+
isMerge: hasMerge,
|
|
1214
|
+
useStyle: true,
|
|
1215
|
+
current: "current",
|
|
1216
|
+
modes: (proxyOpts.ajax && proxyOpts.ajax.queryAll ? ["all"] : []).concat(["current", "selected", "empty"])
|
|
1217
|
+
},
|
|
1218
|
+
options
|
|
1219
|
+
);
|
|
1212
1220
|
if (XEUtils.isBoolean(defOpts.isAllExpand)) {
|
|
1213
1221
|
warnLog("vxe.error.delProp", ["isAllExpand", "isTreeAllExpanded"]);
|
|
1214
1222
|
defOpts.isTreeAllExpanded = defOpts.isAllExpand;
|
|
@@ -1283,9 +1291,13 @@ hooks.add("tableExportModule", {
|
|
|
1283
1291
|
exportStore.isPrint = !!isPrint;
|
|
1284
1292
|
exportStore.hasColgroup = isGroup;
|
|
1285
1293
|
exportStore.visible = true;
|
|
1286
|
-
Object.assign(
|
|
1287
|
-
|
|
1288
|
-
|
|
1294
|
+
Object.assign(
|
|
1295
|
+
exportParams,
|
|
1296
|
+
{
|
|
1297
|
+
mode: selectRecords.length ? "selected" : "current"
|
|
1298
|
+
},
|
|
1299
|
+
defOpts
|
|
1300
|
+
);
|
|
1289
1301
|
const { filename, sheetName, mode, type } = exportParams;
|
|
1290
1302
|
if (filename) {
|
|
1291
1303
|
if (XEUtils.isFunction(filename)) {
|
|
@@ -1347,32 +1359,36 @@ hooks.add("tableExportModule", {
|
|
|
1347
1359
|
const treeOpts = computeTreeOpts.value;
|
|
1348
1360
|
const proxyOpts = $xeGGWrapper ? $xeGGWrapper.getComputeMaps().computeProxyOpts.value : {};
|
|
1349
1361
|
const hasMerge = !!(mergeBodyList.length || mergeFooterList.length);
|
|
1350
|
-
const opts = Object.assign(
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1362
|
+
const opts = Object.assign(
|
|
1363
|
+
{
|
|
1364
|
+
message: true,
|
|
1365
|
+
isHeader: showHeader,
|
|
1366
|
+
isTitle: showHeader,
|
|
1367
|
+
isFooter: showFooter,
|
|
1368
|
+
isColgroup: isGroup,
|
|
1369
|
+
isMerge: hasMerge,
|
|
1370
|
+
useStyle: true,
|
|
1371
|
+
current: "current",
|
|
1372
|
+
modes: (proxyOpts.ajax && proxyOpts.ajax.queryAll ? ["all"] : []).concat(["current", "selected", "empty"]),
|
|
1373
|
+
download: true,
|
|
1374
|
+
type: "csv"
|
|
1375
|
+
// filename: '',
|
|
1376
|
+
// sheetName: '',
|
|
1377
|
+
// original: false,
|
|
1378
|
+
// isTreeAllExpanded: false,
|
|
1379
|
+
// isRowGroupAllExpanded: false,
|
|
1380
|
+
// data: null,
|
|
1381
|
+
// remote: false,
|
|
1382
|
+
// dataFilterMethod: null,
|
|
1383
|
+
// footerFilterMethod: null,
|
|
1384
|
+
// exportMethod: null,
|
|
1385
|
+
// columnFilterMethod: null,
|
|
1386
|
+
// beforeExportMethod: null,
|
|
1387
|
+
// afterExportMethod: null
|
|
1388
|
+
},
|
|
1389
|
+
exportOpts,
|
|
1390
|
+
options
|
|
1391
|
+
);
|
|
1376
1392
|
if (XEUtils.isBoolean(opts.isAllExpand)) {
|
|
1377
1393
|
warnLog("vxe.error.delProp", ["isAllExpand", "isTreeAllExpanded"]);
|
|
1378
1394
|
opts.isTreeAllExpanded = opts.isAllExpand;
|
|
@@ -1411,23 +1427,27 @@ hooks.add("tableExportModule", {
|
|
|
1411
1427
|
isCustomCol = true;
|
|
1412
1428
|
customCols = XEUtils.searchTree(columns, () => true, { children: "children", mapChildren: "childNodes", original: true });
|
|
1413
1429
|
} else {
|
|
1414
|
-
customCols = XEUtils.searchTree(
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
isChecked = true;
|
|
1430
|
+
customCols = XEUtils.searchTree(
|
|
1431
|
+
collectColumn,
|
|
1432
|
+
(column) => {
|
|
1433
|
+
const isColGroup = column.children && column.children.length > 0;
|
|
1434
|
+
let isChecked = false;
|
|
1435
|
+
const isExtraChecked = extraFdMaps[column.field];
|
|
1436
|
+
if (columns) {
|
|
1437
|
+
isChecked = handleFilterColumns(opts, column, columns);
|
|
1438
|
+
} else if (excludeFields || includeFields) {
|
|
1439
|
+
isChecked = handleFilterFields(opts, column, includeFields, includeFdMaps, excludeFdMaps, extraFdMaps);
|
|
1425
1440
|
} else {
|
|
1426
|
-
|
|
1441
|
+
if (isExtraChecked) {
|
|
1442
|
+
isChecked = true;
|
|
1443
|
+
} else {
|
|
1444
|
+
isChecked = column.visible && (isColGroup || defaultFilterExportColumn(column));
|
|
1445
|
+
}
|
|
1427
1446
|
}
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1447
|
+
return isChecked;
|
|
1448
|
+
},
|
|
1449
|
+
{ children: "children", mapChildren: "childNodes", original: true }
|
|
1450
|
+
);
|
|
1431
1451
|
}
|
|
1432
1452
|
const handleOptions = Object.assign({}, opts, { filename: "", sheetName: "", _columnConfs: columns });
|
|
1433
1453
|
if (!isCustomCol && !columnFilterMethod) {
|
|
@@ -1437,33 +1457,37 @@ hooks.add("tableExportModule", {
|
|
|
1437
1457
|
if (customCols) {
|
|
1438
1458
|
handleOptions._isCustomColumn = true;
|
|
1439
1459
|
groups = XEUtils.searchTree(
|
|
1440
|
-
XEUtils.mapTree(
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1460
|
+
XEUtils.mapTree(
|
|
1461
|
+
customCols,
|
|
1462
|
+
(item) => {
|
|
1463
|
+
let targetColumn;
|
|
1464
|
+
if (item) {
|
|
1465
|
+
if (isColumnInfo(item)) {
|
|
1466
|
+
targetColumn = item;
|
|
1467
|
+
} else if (XEUtils.isString(item)) {
|
|
1468
|
+
targetColumn = $xeTable.getColumnByField(item);
|
|
1469
|
+
} else {
|
|
1470
|
+
const colid = item.id || item.colId;
|
|
1471
|
+
const type2 = item.type;
|
|
1472
|
+
const field = item.field;
|
|
1473
|
+
if (colid) {
|
|
1474
|
+
targetColumn = $xeTable.getColumnById(colid);
|
|
1475
|
+
} else if (field && type2) {
|
|
1476
|
+
targetColumn = tableFullColumn.find((column) => column.field === field && column.type === type2);
|
|
1477
|
+
} else if (field) {
|
|
1478
|
+
targetColumn = $xeTable.getColumnByField(field);
|
|
1479
|
+
} else if (type2) {
|
|
1480
|
+
targetColumn = tableFullColumn.find((column) => column.type === type2);
|
|
1481
|
+
}
|
|
1459
1482
|
}
|
|
1483
|
+
return targetColumn || {};
|
|
1460
1484
|
}
|
|
1461
|
-
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
children: "childNodes",
|
|
1488
|
+
mapChildren: "_children"
|
|
1462
1489
|
}
|
|
1463
|
-
|
|
1464
|
-
children: "childNodes",
|
|
1465
|
-
mapChildren: "_children"
|
|
1466
|
-
}),
|
|
1490
|
+
),
|
|
1467
1491
|
(column, index) => isColumnInfo(column) && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column, $columnIndex: index })),
|
|
1468
1492
|
{
|
|
1469
1493
|
children: "_children",
|
|
@@ -1472,15 +1496,23 @@ hooks.add("tableExportModule", {
|
|
|
1472
1496
|
}
|
|
1473
1497
|
);
|
|
1474
1498
|
} else {
|
|
1475
|
-
groups = XEUtils.searchTree(isGroup ? collectColumn : tableFullColumn, (column, index) => column.visible && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column, $columnIndex: index })), {
|
|
1499
|
+
groups = XEUtils.searchTree(isGroup ? collectColumn : tableFullColumn, (column, index) => column.visible && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column, $columnIndex: index })), {
|
|
1500
|
+
children: "children",
|
|
1501
|
+
mapChildren: "childNodes",
|
|
1502
|
+
original: true
|
|
1503
|
+
});
|
|
1476
1504
|
}
|
|
1477
1505
|
const cols = [];
|
|
1478
|
-
XEUtils.eachTree(
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1506
|
+
XEUtils.eachTree(
|
|
1507
|
+
groups,
|
|
1508
|
+
(column) => {
|
|
1509
|
+
const isColGroup = column.children && column.children.length;
|
|
1510
|
+
if (!isColGroup) {
|
|
1511
|
+
cols.push(column);
|
|
1512
|
+
}
|
|
1513
|
+
},
|
|
1514
|
+
{ children: "childNodes" }
|
|
1515
|
+
);
|
|
1484
1516
|
handleOptions.columns = cols;
|
|
1485
1517
|
handleOptions.colgroups = convertToRows(groups);
|
|
1486
1518
|
if (filename) {
|
|
@@ -1645,11 +1677,15 @@ hooks.add("tableExportModule", {
|
|
|
1645
1677
|
},
|
|
1646
1678
|
importData(options) {
|
|
1647
1679
|
const importOpts = computeImportOpts.value;
|
|
1648
|
-
const opts = Object.assign(
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1680
|
+
const opts = Object.assign(
|
|
1681
|
+
{
|
|
1682
|
+
types: XEUtils.keys(importOpts._typeMaps)
|
|
1683
|
+
// beforeImportMethod: null,
|
|
1684
|
+
// afterImportMethod: null
|
|
1685
|
+
},
|
|
1686
|
+
importOpts,
|
|
1687
|
+
options
|
|
1688
|
+
);
|
|
1653
1689
|
const { beforeImportMethod, afterImportMethod } = opts;
|
|
1654
1690
|
if (beforeImportMethod) {
|
|
1655
1691
|
const biRest = beforeImportMethod({ options: opts, $table: $xeTable });
|
|
@@ -1682,15 +1718,20 @@ hooks.add("tableExportModule", {
|
|
|
1682
1718
|
const $xeGrid = $xeTable.xeGrid;
|
|
1683
1719
|
const $xeGantt = $xeTable.xeGantt;
|
|
1684
1720
|
const printOpts = computePrintOpts.value;
|
|
1685
|
-
const opts = Object.assign(
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1721
|
+
const opts = Object.assign(
|
|
1722
|
+
{
|
|
1723
|
+
original: false
|
|
1724
|
+
// beforePrintMethod
|
|
1725
|
+
},
|
|
1726
|
+
printOpts,
|
|
1727
|
+
options,
|
|
1728
|
+
{
|
|
1729
|
+
type: "html",
|
|
1730
|
+
download: false,
|
|
1731
|
+
remote: false,
|
|
1732
|
+
print: true
|
|
1733
|
+
}
|
|
1734
|
+
);
|
|
1694
1735
|
const { sheetName } = opts;
|
|
1695
1736
|
let printTitle = "";
|
|
1696
1737
|
if (sheetName) {
|
|
@@ -1801,15 +1842,20 @@ hooks.add("tableExportModule", {
|
|
|
1801
1842
|
},
|
|
1802
1843
|
getPrintHtml(options) {
|
|
1803
1844
|
const printOpts = computePrintOpts.value;
|
|
1804
|
-
const opts = Object.assign(
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1845
|
+
const opts = Object.assign(
|
|
1846
|
+
{
|
|
1847
|
+
original: false
|
|
1848
|
+
// beforePrintMethod
|
|
1849
|
+
},
|
|
1850
|
+
printOpts,
|
|
1851
|
+
options,
|
|
1852
|
+
{
|
|
1853
|
+
type: "html",
|
|
1854
|
+
download: false,
|
|
1855
|
+
remote: false,
|
|
1856
|
+
print: true
|
|
1857
|
+
}
|
|
1858
|
+
);
|
|
1813
1859
|
return $xeTable.exportData(opts).then(({ content }) => {
|
|
1814
1860
|
return {
|
|
1815
1861
|
html: content
|
|
@@ -1826,12 +1872,16 @@ hooks.add("tableExportModule", {
|
|
|
1826
1872
|
const { treeConfig, importConfig } = props;
|
|
1827
1873
|
const { initStore, importStore, importParams } = reactData;
|
|
1828
1874
|
const importOpts = computeImportOpts.value;
|
|
1829
|
-
const defOpts = Object.assign(
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1875
|
+
const defOpts = Object.assign(
|
|
1876
|
+
{
|
|
1877
|
+
mode: "insertTop",
|
|
1878
|
+
message: true,
|
|
1879
|
+
types: XEUtils.keys(importOpts._typeMaps),
|
|
1880
|
+
modes: ["insertTop", "covering"]
|
|
1881
|
+
},
|
|
1882
|
+
importOpts,
|
|
1883
|
+
options
|
|
1884
|
+
);
|
|
1835
1885
|
const types = defOpts.types || [];
|
|
1836
1886
|
const modes = defOpts.modes || [];
|
|
1837
1887
|
const isTree = !!treeConfig;
|
|
@@ -1882,10 +1932,14 @@ hooks.add("tableExportModule", {
|
|
|
1882
1932
|
openExport(options) {
|
|
1883
1933
|
const { exportConfig } = props;
|
|
1884
1934
|
const exportOpts = computeExportOpts.value;
|
|
1885
|
-
const defOpts = Object.assign(
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1935
|
+
const defOpts = Object.assign(
|
|
1936
|
+
{
|
|
1937
|
+
message: true,
|
|
1938
|
+
types: XEUtils.keys(exportOpts._typeMaps)
|
|
1939
|
+
},
|
|
1940
|
+
exportOpts,
|
|
1941
|
+
options
|
|
1942
|
+
);
|
|
1889
1943
|
if (!hasEnableConf(exportConfig, exportOpts)) {
|
|
1890
1944
|
errLog("vxe.error.reqProp", ["export-config"]);
|
|
1891
1945
|
}
|
|
@@ -1895,9 +1949,13 @@ hooks.add("tableExportModule", {
|
|
|
1895
1949
|
openPrint(options) {
|
|
1896
1950
|
const { printConfig } = props;
|
|
1897
1951
|
const printOpts = computePrintOpts.value;
|
|
1898
|
-
const defOpts = Object.assign(
|
|
1899
|
-
|
|
1900
|
-
|
|
1952
|
+
const defOpts = Object.assign(
|
|
1953
|
+
{
|
|
1954
|
+
message: true
|
|
1955
|
+
},
|
|
1956
|
+
printOpts,
|
|
1957
|
+
options
|
|
1958
|
+
);
|
|
1901
1959
|
if (!hasEnableConf(printConfig, printOpts)) {
|
|
1902
1960
|
errLog("vxe.error.reqProp", ["print-config"]);
|
|
1903
1961
|
}
|