vxe-table 4.23.7 → 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.
Files changed (148) hide show
  1. package/dist/all.esm.js +5859 -4018
  2. package/es/colgroup/index.js +1 -1
  3. package/es/column/index.js +1 -1
  4. package/es/components.d.ts +3 -0
  5. package/es/components.js +4 -8
  6. package/es/grid/index.js +1 -1
  7. package/es/grid/src/emits.js +1 -15
  8. package/es/grid/src/grid.js +398 -121
  9. package/es/grid/src/props.js +1 -1
  10. package/es/index.esm.js +6 -0
  11. package/es/index.js +6 -0
  12. package/es/table/index.js +1 -1
  13. package/es/table/module/custom/hook.js +50 -43
  14. package/es/table/module/custom/panel.js +778 -528
  15. package/es/table/module/edit/hook.js +141 -63
  16. package/es/table/module/export/export-panel.js +400 -317
  17. package/es/table/module/export/hook.js +396 -338
  18. package/es/table/module/export/import-panel.js +153 -124
  19. package/es/table/module/filter/hook.js +17 -3
  20. package/es/table/module/filter/panel.js +147 -85
  21. package/es/table/module/keyboard/hook.js +9 -5
  22. package/es/table/module/menu/hook.js +1 -1
  23. package/es/table/module/menu/panel.js +198 -127
  24. package/es/table/module/validator/hook.js +1 -1
  25. package/es/table/render/index.js +152 -99
  26. package/es/table/src/body.js +356 -234
  27. package/es/table/src/cell.js +427 -270
  28. package/es/table/src/columnInfo.js +2 -1
  29. package/es/table/src/footer.js +145 -100
  30. package/es/table/src/group.js +7 -3
  31. package/es/table/src/header.js +230 -173
  32. package/es/table/src/props.js +1 -1
  33. package/es/table/src/table.js +1504 -1031
  34. package/es/table/src/util.js +15 -19
  35. package/es/toolbar/index.js +1 -1
  36. package/es/toolbar/src/toolbar.js +133 -76
  37. package/es/ui/index.d.ts +0 -1
  38. package/es/ui/index.js +1 -2
  39. package/es/ui/src/dom.js +9 -6
  40. package/es/ui/src/log.js +1 -1
  41. package/es/ui/src/utils.d.ts +1 -1
  42. package/es/v-x-e-table/index.d.ts +0 -1
  43. package/es/v-x-e-table/index.js +0 -1
  44. package/lib/colgroup/index.js +5 -5
  45. package/lib/column/index.js +5 -5
  46. package/lib/components.js +8 -12
  47. package/lib/grid/index.js +4 -4
  48. package/lib/grid/src/emits.js +1 -15
  49. package/lib/grid/src/grid.js +419 -142
  50. package/lib/grid/src/props.js +2 -2
  51. package/lib/index.common.js +6 -0
  52. package/lib/index.js +6 -0
  53. package/lib/index.umd.js +5825 -3945
  54. package/lib/index.umd.min.js +3 -3
  55. package/lib/table/index.js +5 -5
  56. package/lib/table/module/custom/hook.js +51 -44
  57. package/lib/table/module/custom/panel.js +790 -540
  58. package/lib/table/module/edit/hook.js +142 -64
  59. package/lib/table/module/export/export-panel.js +406 -323
  60. package/lib/table/module/export/hook.js +419 -361
  61. package/lib/table/module/export/import-panel.js +157 -128
  62. package/lib/table/module/filter/hook.js +18 -4
  63. package/lib/table/module/filter/panel.js +149 -87
  64. package/lib/table/module/keyboard/hook.js +10 -6
  65. package/lib/table/module/menu/hook.js +2 -2
  66. package/lib/table/module/menu/panel.js +199 -128
  67. package/lib/table/module/validator/hook.js +2 -2
  68. package/lib/table/render/index.js +153 -100
  69. package/lib/table/src/body.js +357 -235
  70. package/lib/table/src/cell.js +428 -271
  71. package/lib/table/src/columnInfo.js +3 -2
  72. package/lib/table/src/footer.js +146 -101
  73. package/lib/table/src/group.js +7 -3
  74. package/lib/table/src/header.js +231 -174
  75. package/lib/table/src/props.js +2 -2
  76. package/lib/table/src/table.js +1487 -1045
  77. package/lib/table/src/util.js +15 -19
  78. package/lib/toolbar/index.js +4 -4
  79. package/lib/toolbar/src/toolbar.js +135 -78
  80. package/lib/ui/index.js +1 -3
  81. package/lib/ui/src/dom.js +9 -6
  82. package/lib/ui/src/log.js +1 -1
  83. package/lib/v-x-e-table/index.js +0 -2
  84. package/package.json +8 -3
  85. package/packages/colgroup/index.ts +22 -22
  86. package/packages/column/index.ts +22 -22
  87. package/packages/components.ts +41 -43
  88. package/packages/grid/index.ts +18 -18
  89. package/packages/grid/src/emits.ts +5 -19
  90. package/packages/grid/src/grid.ts +2229 -1925
  91. package/packages/grid/src/props.ts +22 -23
  92. package/packages/index.ts +11 -4
  93. package/packages/locale/lang/fr-FR.ts +15 -15
  94. package/packages/locale/lang/it-IT.ts +4 -4
  95. package/packages/locale/lang/uk-UA.ts +1 -1
  96. package/packages/locale/lang/uz-UZ.ts +13 -13
  97. package/packages/locale/lang/zh-CN.ts +907 -907
  98. package/packages/table/index.ts +26 -26
  99. package/packages/table/module/custom/hook.ts +510 -503
  100. package/packages/table/module/custom/panel.ts +2002 -1743
  101. package/packages/table/module/edit/hook.ts +1224 -1131
  102. package/packages/table/module/export/export-panel.ts +697 -611
  103. package/packages/table/module/export/hook.ts +2160 -2059
  104. package/packages/table/module/export/import-panel.ts +319 -279
  105. package/packages/table/module/export/util.ts +25 -24
  106. package/packages/table/module/filter/hook.ts +519 -501
  107. package/packages/table/module/filter/panel.ts +368 -304
  108. package/packages/table/module/keyboard/hook.ts +498 -494
  109. package/packages/table/module/menu/hook.ts +330 -330
  110. package/packages/table/module/menu/panel.ts +272 -201
  111. package/packages/table/module/validator/hook.ts +653 -635
  112. package/packages/table/render/index.ts +1819 -1744
  113. package/packages/table/src/body.ts +1078 -955
  114. package/packages/table/src/cell.ts +1524 -1359
  115. package/packages/table/src/column.ts +192 -192
  116. package/packages/table/src/columnInfo.ts +232 -232
  117. package/packages/table/src/emits.ts +134 -134
  118. package/packages/table/src/footer.ts +425 -380
  119. package/packages/table/src/group.ts +67 -63
  120. package/packages/table/src/header.ts +642 -581
  121. package/packages/table/src/props.ts +336 -336
  122. package/packages/table/src/store.ts +14 -14
  123. package/packages/table/src/table.ts +16011 -15454
  124. package/packages/table/src/use/cell-view.ts +41 -44
  125. package/packages/table/src/use/index.ts +1 -1
  126. package/packages/table/src/util.ts +1206 -1216
  127. package/packages/toolbar/index.ts +18 -18
  128. package/packages/toolbar/src/toolbar.ts +768 -706
  129. package/packages/ui/index.ts +519 -521
  130. package/packages/ui/src/anime.ts +51 -52
  131. package/packages/ui/src/comp.ts +3 -3
  132. package/packages/ui/src/dom.ts +466 -463
  133. package/packages/ui/src/log.ts +19 -19
  134. package/packages/ui/src/utils.ts +66 -66
  135. package/packages/ui/src/vn.ts +55 -55
  136. package/packages/v-x-e-table/index.d.ts +3 -4
  137. package/packages/v-x-e-table/index.ts +3 -4
  138. package/types/all.d.ts +76 -76
  139. package/types/index.d.ts +4 -4
  140. /package/dist/{iconfont.1792979665397.ttf → iconfont.1793009263429.ttf} +0 -0
  141. /package/dist/{iconfont.1792979665397.woff → iconfont.1793009263429.woff} +0 -0
  142. /package/dist/{iconfont.1792979665397.woff2 → iconfont.1793009263429.woff2} +0 -0
  143. /package/es/{iconfont.1792979665397.ttf → iconfont.1793009263429.ttf} +0 -0
  144. /package/es/{iconfont.1792979665397.woff → iconfont.1793009263429.woff} +0 -0
  145. /package/es/{iconfont.1792979665397.woff2 → iconfont.1793009263429.woff2} +0 -0
  146. /package/lib/{iconfont.1792979665397.ttf → iconfont.1793009263429.ttf} +0 -0
  147. /package/lib/{iconfont.1792979665397.woff → iconfont.1793009263429.woff} +0 -0
  148. /package/lib/{iconfont.1792979665397.woff2 → iconfont.1793009263429.woff2} +0 -0
@@ -23,14 +23,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
23
  ));
24
24
  var import_vue = require("vue");
25
25
  var import_xe_utils = __toESM(require("xe-utils"));
26
- var import_ui = require("../../../ui");
26
+ var import_core = require("@vxe-ui/core");
27
27
  var import_util = require("../../src/util");
28
28
  var import_utils = require("../../../ui/src/utils");
29
29
  var import_dom = require("../../../ui/src/dom");
30
30
  var import_util2 = require("./util");
31
31
  var import_log = require("../../../ui/src/log");
32
32
  const { warnLog, errLog } = (0, import_log.createComponentLog)("table");
33
- const { getI18n, hooks, renderer } = import_ui.VxeUI;
33
+ const { getI18n, hooks, renderer } = import_core.VxeUI;
34
34
  let htmlCellElem;
35
35
  const csvBOM = "\uFEFF";
36
36
  const enterSymbol = "\r\n";
@@ -263,13 +263,17 @@ function parseXML(tableConf, content) {
263
263
  return { fields, rows };
264
264
  }
265
265
  function clearColumnConvert(columns) {
266
- import_xe_utils.default.eachTree(columns, (column) => {
267
- delete column._level;
268
- delete column._colSpan;
269
- delete column._rowSpan;
270
- delete column._children;
271
- delete column.childNodes;
272
- }, { children: "children" });
266
+ import_xe_utils.default.eachTree(
267
+ columns,
268
+ (column) => {
269
+ delete column._level;
270
+ delete column._colSpan;
271
+ delete column._rowSpan;
272
+ delete column._children;
273
+ delete column.childNodes;
274
+ },
275
+ { children: "children" }
276
+ );
273
277
  }
274
278
  const tableExportMethodKeys = ["exportData", "importByFile", "importData", "saveFile", "readFile", "print", "getPrintHtml", "openImport", "closeImport", "openExport", "closeExport", "openPrint", "closePrint"];
275
279
  hooks.add("tableExportModule", {
@@ -325,136 +329,140 @@ hooks.add("tableExportModule", {
325
329
  const rest = [];
326
330
  const expandMaps = {};
327
331
  const useMaps = {};
328
- import_xe_utils.default.eachTree(datas, (item, $rowIndex, items, path, parentItem, nodes) => {
329
- const row = item._row || item;
330
- const rowid = handleGetRowId(row);
331
- if (useMaps[rowid]) {
332
- return;
333
- }
334
- const parentRow = parentItem && parentItem._row ? parentItem._row : parentItem;
335
- const pRowid = parentRow ? handleGetRowId(parentRow) : "";
336
- if (isRowGroupAllExpanded || !parentRow || expandMaps[pRowid] && $xeTable.isRowExpandByRow(parentRow)) {
337
- const hasRowChild = mapChildrenField && row[mapChildrenField] && row[mapChildrenField].length;
338
- const item2 = {
339
- _row: row,
340
- _level: nodes.length - 1,
341
- _hasChild: hasRowChild,
342
- _expand: hasRowChild && $xeTable.isRowExpandByRow(row)
343
- };
344
- columns.forEach((column, $columnIndex) => {
345
- const { field, editRender, cellRender, aggFunc, rowGroupNode } = column;
346
- let cellValue = "";
347
- const renderOpts = editRender || cellRender;
348
- let bodyExportMethod = column.exportMethod || columnOpts.exportMethod;
349
- if (!bodyExportMethod && renderOpts && renderOpts.name) {
350
- const compConf = rendererOpts[renderOpts.name] || renderer.get(renderOpts.name);
351
- if (compConf) {
352
- bodyExportMethod = compConf.tableExportMethod || compConf.exportMethod;
353
- }
354
- }
355
- if (!bodyExportMethod) {
356
- bodyExportMethod = columnOpts.exportMethod;
357
- }
358
- if (bodyExportMethod) {
359
- cellValue = bodyExportMethod({ $table: $xeTable, row, column, options: opts });
360
- } else {
361
- switch (column.type) {
362
- case "seq": {
363
- const seqVal = path.map((num, i) => i % 2 === 0 ? Number(num) + 1 : ".").join("");
364
- cellValue = expMode === "all" ? seqVal : getSeq(seqVal, row, $rowIndex, column, $columnIndex);
365
- break;
366
- }
367
- case "checkbox": {
368
- cellValue = toBooleanValue($xeTable.isCheckedByCheckboxRow(row));
369
- item2._checkboxLabel = checkboxOpts.labelField ? import_xe_utils.default.get(row, checkboxOpts.labelField) : "";
370
- item2._checkboxDisabled = checkboxOpts.checkMethod && !checkboxOpts.checkMethod({ $table: $xeTable, row });
371
- break;
372
- }
373
- case "radio": {
374
- cellValue = toBooleanValue($xeTable.isCheckedByRadioRow(row));
375
- item2._radioLabel = radioOpts.labelField ? import_xe_utils.default.get(row, radioOpts.labelField) : "";
376
- item2._radioDisabled = radioOpts.checkMethod && !radioOpts.checkMethod({ $table: $xeTable, row });
377
- break;
332
+ import_xe_utils.default.eachTree(
333
+ datas,
334
+ (item, $rowIndex, items, path, parentItem, nodes) => {
335
+ const row = item._row || item;
336
+ const rowid = handleGetRowId(row);
337
+ if (useMaps[rowid]) {
338
+ return;
339
+ }
340
+ const parentRow = parentItem && parentItem._row ? parentItem._row : parentItem;
341
+ const pRowid = parentRow ? handleGetRowId(parentRow) : "";
342
+ if (isRowGroupAllExpanded || !parentRow || expandMaps[pRowid] && $xeTable.isRowExpandByRow(parentRow)) {
343
+ const hasRowChild = mapChildrenField && row[mapChildrenField] && row[mapChildrenField].length;
344
+ const item2 = {
345
+ _row: row,
346
+ _level: nodes.length - 1,
347
+ _hasChild: hasRowChild,
348
+ _expand: hasRowChild && $xeTable.isRowExpandByRow(row)
349
+ };
350
+ columns.forEach((column, $columnIndex) => {
351
+ const { field, editRender, cellRender, aggFunc, rowGroupNode } = column;
352
+ let cellValue = "";
353
+ const renderOpts = editRender || cellRender;
354
+ let bodyExportMethod = column.exportMethod || columnOpts.exportMethod;
355
+ if (!bodyExportMethod && renderOpts && renderOpts.name) {
356
+ const compConf = rendererOpts[renderOpts.name] || renderer.get(renderOpts.name);
357
+ if (compConf) {
358
+ bodyExportMethod = compConf.tableExportMethod || compConf.exportMethod;
378
359
  }
379
- default: {
380
- if (field && row.isAggregate) {
381
- const aggRow = row;
382
- const aggData = aggRow.aggData;
383
- const currAggData = aggData ? aggData[field] : null;
384
- const groupField = aggRow.groupField;
385
- const groupContent = aggRow.groupContent;
386
- const childList = mapChildrenField ? aggRow[mapChildrenField] || [] : [];
387
- const childCount = aggRow.childCount;
388
- const colRest = fullColumnFieldData[groupField] || {};
389
- const ctParams = {
390
- $table: $xeTable,
391
- groupField,
392
- groupColumn: colRest ? colRest.column : null,
393
- column,
394
- groupValue: groupContent,
395
- childList,
396
- childCount,
397
- aggValue: null,
398
- /**
399
- * 已废弃
400
- * @deprecated
401
- */
402
- children: childList,
403
- /**
404
- * 已废弃
405
- * @deprecated
406
- */
407
- totalValue: childCount
408
- };
409
- if (aggMode === "column" ? field === aggRow.groupField : rowGroupNode) {
410
- cellValue = groupContent;
411
- if (contentMethod) {
412
- cellValue = `${contentMethod(ctParams)}`;
413
- }
414
- if (showTotal) {
415
- cellValue = getI18n("vxe.table.rowGroupContentTotal", [cellValue, totalMethod ? totalMethod(ctParams) : childCount, childCount]);
416
- }
417
- } else if ($xeTable.getPivotTableAggregateCellAggValue) {
418
- const aggParams = {
360
+ }
361
+ if (!bodyExportMethod) {
362
+ bodyExportMethod = columnOpts.exportMethod;
363
+ }
364
+ if (bodyExportMethod) {
365
+ cellValue = bodyExportMethod({ $table: $xeTable, row, column, options: opts });
366
+ } else {
367
+ switch (column.type) {
368
+ case "seq": {
369
+ const seqVal = path.map((num, i) => i % 2 === 0 ? Number(num) + 1 : ".").join("");
370
+ cellValue = expMode === "all" ? seqVal : getSeq(seqVal, row, $rowIndex, column, $columnIndex);
371
+ break;
372
+ }
373
+ case "checkbox": {
374
+ cellValue = toBooleanValue($xeTable.isCheckedByCheckboxRow(row));
375
+ item2._checkboxLabel = checkboxOpts.labelField ? import_xe_utils.default.get(row, checkboxOpts.labelField) : "";
376
+ item2._checkboxDisabled = checkboxOpts.checkMethod && !checkboxOpts.checkMethod({ $table: $xeTable, row });
377
+ break;
378
+ }
379
+ case "radio": {
380
+ cellValue = toBooleanValue($xeTable.isCheckedByRadioRow(row));
381
+ item2._radioLabel = radioOpts.labelField ? import_xe_utils.default.get(row, radioOpts.labelField) : "";
382
+ item2._radioDisabled = radioOpts.checkMethod && !radioOpts.checkMethod({ $table: $xeTable, row });
383
+ break;
384
+ }
385
+ default: {
386
+ if (field && row.isAggregate) {
387
+ const aggRow = row;
388
+ const aggData = aggRow.aggData;
389
+ const currAggData = aggData ? aggData[field] : null;
390
+ const groupField = aggRow.groupField;
391
+ const groupContent = aggRow.groupContent;
392
+ const childList = mapChildrenField ? aggRow[mapChildrenField] || [] : [];
393
+ const childCount = aggRow.childCount;
394
+ const colRest = fullColumnFieldData[groupField] || {};
395
+ const ctParams = {
419
396
  $table: $xeTable,
420
- row,
421
- column
397
+ groupField,
398
+ groupColumn: colRest ? colRest.column : null,
399
+ column,
400
+ groupValue: groupContent,
401
+ childList,
402
+ childCount,
403
+ aggValue: null,
404
+ /**
405
+ * 已废弃
406
+ * @deprecated
407
+ */
408
+ children: childList,
409
+ /**
410
+ * 已废弃
411
+ * @deprecated
412
+ */
413
+ totalValue: childCount
422
414
  };
423
- cellValue = $xeTable.getPivotTableAggregateCellAggValue(aggParams);
424
- } else if (aggFunc === true || countFields && countFields.includes(field)) {
425
- cellValue = currAggData ? currAggData.value : childCount;
426
- ctParams.aggValue = cellValue;
427
- if (formatValuesMethod) {
428
- cellValue = formatValuesMethod(ctParams);
415
+ if (aggMode === "column" ? field === aggRow.groupField : rowGroupNode) {
416
+ cellValue = groupContent;
417
+ if (contentMethod) {
418
+ cellValue = `${contentMethod(ctParams)}`;
419
+ }
420
+ if (showTotal) {
421
+ cellValue = getI18n("vxe.table.rowGroupContentTotal", [cellValue, totalMethod ? totalMethod(ctParams) : childCount, childCount]);
422
+ }
423
+ } else if ($xeTable.getPivotTableAggregateCellAggValue) {
424
+ const aggParams = {
425
+ $table: $xeTable,
426
+ row,
427
+ column
428
+ };
429
+ cellValue = $xeTable.getPivotTableAggregateCellAggValue(aggParams);
430
+ } else if (aggFunc === true || countFields && countFields.includes(field)) {
431
+ cellValue = currAggData ? currAggData.value : childCount;
432
+ ctParams.aggValue = cellValue;
433
+ if (formatValuesMethod) {
434
+ cellValue = formatValuesMethod(ctParams);
435
+ }
429
436
  }
430
- }
431
- } else if (opts.original) {
432
- cellValue = (0, import_util.getCellValue)(row, column);
433
- } else {
434
- cellValue = $xeTable.getCellLabel(row, column);
435
- if (column.type === "html") {
436
- htmlCellElem.innerHTML = cellValue;
437
- cellValue = htmlCellElem.innerText.trim();
437
+ } else if (opts.original) {
438
+ cellValue = (0, import_util.getCellValue)(row, column);
438
439
  } else {
439
- const cell = $xeTable.getCellElement(row, column);
440
- if (cell && !(0, import_dom.hasClass)(cell, "is--progress")) {
441
- cellValue = cell.innerText.trim();
440
+ cellValue = $xeTable.getCellLabel(row, column);
441
+ if (column.type === "html") {
442
+ htmlCellElem.innerHTML = cellValue;
443
+ cellValue = htmlCellElem.innerText.trim();
444
+ } else {
445
+ const cell = $xeTable.getCellElement(row, column);
446
+ if (cell && !(0, import_dom.hasClass)(cell, "is--progress")) {
447
+ cellValue = cell.innerText.trim();
448
+ }
442
449
  }
443
450
  }
451
+ break;
444
452
  }
445
- break;
446
453
  }
447
454
  }
455
+ item2[column.id] = toStringValue(cellValue);
456
+ });
457
+ useMaps[rowid] = true;
458
+ if (pRowid) {
459
+ expandMaps[pRowid] = true;
448
460
  }
449
- item2[column.id] = toStringValue(cellValue);
450
- });
451
- useMaps[rowid] = true;
452
- if (pRowid) {
453
- expandMaps[pRowid] = true;
461
+ rest.push(Object.assign(item2, row));
454
462
  }
455
- rest.push(Object.assign(item2, row));
456
- }
457
- }, { children: mapChildrenField });
463
+ },
464
+ { children: mapChildrenField }
465
+ );
458
466
  return rest;
459
467
  }
460
468
  if (treeConfig) {
@@ -463,84 +471,88 @@ hooks.add("tableExportModule", {
463
471
  const rest = [];
464
472
  const expandMaps = {};
465
473
  const useMaps = {};
466
- import_xe_utils.default.eachTree(datas, (item, $rowIndex, items, path, parentItem, nodes) => {
467
- const row = item._row || item;
468
- const rowid = handleGetRowId(row);
469
- if (useMaps[rowid]) {
470
- return;
471
- }
472
- const parentRow = parentItem && parentItem._row ? parentItem._row : parentItem;
473
- const pRowid = parentRow ? handleGetRowId(parentRow) : "";
474
- if (isTreeAllExpanded || !parentRow || expandMaps[pRowid] && $xeTable.isTreeExpandByRow(parentRow)) {
475
- const hasRowChild = row[childrenField] && row[childrenField].length;
476
- const item2 = {
477
- _row: row,
478
- _level: nodes.length - 1,
479
- _hasChild: hasRowChild,
480
- _expand: hasRowChild && $xeTable.isTreeExpandByRow(row)
481
- };
482
- const rowRest = fullAllDataRowIdData[rowid] || {};
483
- columns.forEach((column, $columnIndex) => {
484
- let cellValue = "";
485
- const renderOpts = column.editRender || column.cellRender;
486
- let bodyExportMethod = column.exportMethod || columnOpts.exportMethod;
487
- if (!bodyExportMethod && renderOpts && renderOpts.name) {
488
- const compConf = rendererOpts[renderOpts.name] || renderer.get(renderOpts.name);
489
- if (compConf) {
490
- bodyExportMethod = compConf.tableExportMethod || compConf.exportMethod;
474
+ import_xe_utils.default.eachTree(
475
+ datas,
476
+ (item, $rowIndex, items, path, parentItem, nodes) => {
477
+ const row = item._row || item;
478
+ const rowid = handleGetRowId(row);
479
+ if (useMaps[rowid]) {
480
+ return;
481
+ }
482
+ const parentRow = parentItem && parentItem._row ? parentItem._row : parentItem;
483
+ const pRowid = parentRow ? handleGetRowId(parentRow) : "";
484
+ if (isTreeAllExpanded || !parentRow || expandMaps[pRowid] && $xeTable.isTreeExpandByRow(parentRow)) {
485
+ const hasRowChild = row[childrenField] && row[childrenField].length;
486
+ const item2 = {
487
+ _row: row,
488
+ _level: nodes.length - 1,
489
+ _hasChild: hasRowChild,
490
+ _expand: hasRowChild && $xeTable.isTreeExpandByRow(row)
491
+ };
492
+ const rowRest = fullAllDataRowIdData[rowid] || {};
493
+ columns.forEach((column, $columnIndex) => {
494
+ let cellValue = "";
495
+ const renderOpts = column.editRender || column.cellRender;
496
+ let bodyExportMethod = column.exportMethod || columnOpts.exportMethod;
497
+ if (!bodyExportMethod && renderOpts && renderOpts.name) {
498
+ const compConf = rendererOpts[renderOpts.name] || renderer.get(renderOpts.name);
499
+ if (compConf) {
500
+ bodyExportMethod = compConf.tableExportMethod || compConf.exportMethod;
501
+ }
491
502
  }
492
- }
493
- if (!bodyExportMethod) {
494
- bodyExportMethod = columnOpts.exportMethod;
495
- }
496
- if (bodyExportMethod) {
497
- cellValue = bodyExportMethod({ $table: $xeTable, row, column, options: opts });
498
- } else {
499
- switch (column.type) {
500
- case "seq": {
501
- let seqVal = path.map((num, i) => i % 2 === 0 ? Number(num) + 1 : ".").join("");
502
- if (seqMode === "increasing") {
503
- seqVal = rowRest ? rowRest._index + 1 : -1;
503
+ if (!bodyExportMethod) {
504
+ bodyExportMethod = columnOpts.exportMethod;
505
+ }
506
+ if (bodyExportMethod) {
507
+ cellValue = bodyExportMethod({ $table: $xeTable, row, column, options: opts });
508
+ } else {
509
+ switch (column.type) {
510
+ case "seq": {
511
+ let seqVal = path.map((num, i) => i % 2 === 0 ? Number(num) + 1 : ".").join("");
512
+ if (seqMode === "increasing") {
513
+ seqVal = rowRest ? rowRest._index + 1 : -1;
514
+ }
515
+ cellValue = expMode === "all" ? seqVal : getSeq(seqVal, row, $rowIndex, column, $columnIndex);
516
+ break;
504
517
  }
505
- cellValue = expMode === "all" ? seqVal : getSeq(seqVal, row, $rowIndex, column, $columnIndex);
506
- break;
507
- }
508
- case "checkbox":
509
- cellValue = toBooleanValue($xeTable.isCheckedByCheckboxRow(row));
510
- item2._checkboxLabel = checkboxOpts.labelField ? import_xe_utils.default.get(row, checkboxOpts.labelField) : "";
511
- item2._checkboxDisabled = checkboxOpts.checkMethod && !checkboxOpts.checkMethod({ $table: $xeTable, row });
512
- break;
513
- case "radio":
514
- cellValue = toBooleanValue($xeTable.isCheckedByRadioRow(row));
515
- item2._radioLabel = radioOpts.labelField ? import_xe_utils.default.get(row, radioOpts.labelField) : "";
516
- item2._radioDisabled = radioOpts.checkMethod && !radioOpts.checkMethod({ $table: $xeTable, row });
517
- break;
518
- default:
519
- if (opts.original) {
520
- cellValue = (0, import_util.getCellValue)(row, column);
521
- } else {
522
- cellValue = $xeTable.getCellLabel(row, column);
523
- if (column.type === "html") {
524
- htmlCellElem.innerHTML = cellValue;
525
- cellValue = htmlCellElem.innerText.trim();
518
+ case "checkbox":
519
+ cellValue = toBooleanValue($xeTable.isCheckedByCheckboxRow(row));
520
+ item2._checkboxLabel = checkboxOpts.labelField ? import_xe_utils.default.get(row, checkboxOpts.labelField) : "";
521
+ item2._checkboxDisabled = checkboxOpts.checkMethod && !checkboxOpts.checkMethod({ $table: $xeTable, row });
522
+ break;
523
+ case "radio":
524
+ cellValue = toBooleanValue($xeTable.isCheckedByRadioRow(row));
525
+ item2._radioLabel = radioOpts.labelField ? import_xe_utils.default.get(row, radioOpts.labelField) : "";
526
+ item2._radioDisabled = radioOpts.checkMethod && !radioOpts.checkMethod({ $table: $xeTable, row });
527
+ break;
528
+ default:
529
+ if (opts.original) {
530
+ cellValue = (0, import_util.getCellValue)(row, column);
526
531
  } else {
527
- const cell = $xeTable.getCellElement(row, column);
528
- if (cell && !(0, import_dom.hasClass)(cell, "is--progress")) {
529
- cellValue = cell.innerText.trim();
532
+ cellValue = $xeTable.getCellLabel(row, column);
533
+ if (column.type === "html") {
534
+ htmlCellElem.innerHTML = cellValue;
535
+ cellValue = htmlCellElem.innerText.trim();
536
+ } else {
537
+ const cell = $xeTable.getCellElement(row, column);
538
+ if (cell && !(0, import_dom.hasClass)(cell, "is--progress")) {
539
+ cellValue = cell.innerText.trim();
540
+ }
530
541
  }
531
542
  }
532
- }
543
+ }
533
544
  }
545
+ item2[column.id] = toStringValue(cellValue);
546
+ });
547
+ useMaps[rowid] = true;
548
+ if (pRowid) {
549
+ expandMaps[pRowid] = true;
534
550
  }
535
- item2[column.id] = toStringValue(cellValue);
536
- });
537
- useMaps[rowid] = true;
538
- if (pRowid) {
539
- expandMaps[pRowid] = true;
551
+ rest.push(Object.assign(item2, row));
540
552
  }
541
- rest.push(Object.assign(item2, row));
542
- }
543
- }, { children: childrenField });
553
+ },
554
+ { children: childrenField }
555
+ );
544
556
  return rest;
545
557
  }
546
558
  return datas.map((row, $rowIndex) => {
@@ -713,13 +725,17 @@ hooks.add("tableExportModule", {
713
725
  }
714
726
  let childWidth = 0;
715
727
  let countChild = 0;
716
- import_xe_utils.default.eachTree([column], (item) => {
717
- if (!item.childNodes || !column.childNodes.length) {
718
- countChild++;
719
- }
720
- const ptWidth = printWidthMaps[item.id];
721
- childWidth += ptWidth || 0;
722
- }, { children: "childNodes" });
728
+ import_xe_utils.default.eachTree(
729
+ [column],
730
+ (item) => {
731
+ if (!item.childNodes || !column.childNodes.length) {
732
+ countChild++;
733
+ }
734
+ const ptWidth = printWidthMaps[item.id];
735
+ childWidth += ptWidth || 0;
736
+ },
737
+ { children: "childNodes" }
738
+ );
723
739
  const colWidth = childWidth - countChild;
724
740
  colWidthMaps[column.id] = colWidth;
725
741
  printWidthMaps[column.id] = import_xe_utils.default.floor(colWidth / tableWidth * 180, 2);
@@ -763,19 +779,8 @@ hooks.add("tableExportModule", {
763
779
  return colWidthMaps[column.id] ? "width:" + (0, import_dom.toCssUnit)(colWidthMaps[column.id]) : "";
764
780
  };
765
781
  const allCls = "check-all";
766
- const clss = [
767
- "vxe-table",
768
- `border--${toTableBorder(border)}`,
769
- isPrint ? "is--print" : "",
770
- isAutoWidth ? "is--auto-width" : "",
771
- isScaleWidth ? "is--scale-width" : "",
772
- isDefaultWidth ? "is--default-width" : "",
773
- isHeader ? "is--header" : ""
774
- ].filter((cls) => cls);
775
- const tables = [
776
- `<table class="${clss.join(" ")}" border="0" cellspacing="0" cellpadding="0">`,
777
- `<colgroup>${columns.map((column) => `<col style="${getHeaderWidthStyle(column)}">`).join("")}</colgroup>`
778
- ];
782
+ 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);
783
+ const tables = [`<table class="${clss.join(" ")}" border="0" cellspacing="0" cellpadding="0">`, `<colgroup>${columns.map((column) => `<col style="${getHeaderWidthStyle(column)}">`).join("")}</colgroup>`];
779
784
  if (isHeader) {
780
785
  tables.push("<thead>");
781
786
  if (isColgroup && !original) {
@@ -989,11 +994,11 @@ hooks.add("tableExportModule", {
989
994
  const blob = (0, import_util2.getExportBlobByContent)(content, opts);
990
995
  return Promise.resolve({ type, content, blob });
991
996
  }
992
- if (import_ui.VxeUI.saveFile) {
993
- import_ui.VxeUI.saveFile({ filename, type, content }).then(() => {
997
+ if (import_core.VxeUI.saveFile) {
998
+ import_core.VxeUI.saveFile({ filename, type, content }).then(() => {
994
999
  if (opts.message !== false) {
995
- if (import_ui.VxeUI.modal) {
996
- import_ui.VxeUI.modal.message({ content: getI18n("vxe.table.expSuccess"), status: "success" });
1000
+ if (import_core.VxeUI.modal) {
1001
+ import_core.VxeUI.modal.message({ content: getI18n("vxe.table.expSuccess"), status: "success" });
997
1002
  }
998
1003
  }
999
1004
  });
@@ -1080,8 +1085,8 @@ hooks.add("tableExportModule", {
1080
1085
  loadRest = $xeTable.reloadData(data);
1081
1086
  }
1082
1087
  if (opts.message !== false) {
1083
- if (import_ui.VxeUI.modal) {
1084
- import_ui.VxeUI.modal.message({ content: getI18n("vxe.table.impSuccess", [rows.length]), status: "success" });
1088
+ if (import_core.VxeUI.modal) {
1089
+ import_core.VxeUI.modal.message({ content: getI18n("vxe.table.impSuccess", [rows.length]), status: "success" });
1085
1090
  }
1086
1091
  }
1087
1092
  return loadRest.then(() => {
@@ -1091,8 +1096,8 @@ hooks.add("tableExportModule", {
1091
1096
  });
1092
1097
  });
1093
1098
  } else if (opts.message !== false) {
1094
- if (import_ui.VxeUI.modal) {
1095
- import_ui.VxeUI.modal.message({ content: getI18n("vxe.error.impFields"), status: "error" });
1099
+ if (import_core.VxeUI.modal) {
1100
+ import_core.VxeUI.modal.message({ content: getI18n("vxe.error.impFields"), status: "error" });
1096
1101
  }
1097
1102
  if (_importReject) {
1098
1103
  _importReject({ status: false, msg: "field mismatching" });
@@ -1105,8 +1110,8 @@ hooks.add("tableExportModule", {
1105
1110
  const importOpts = computeImportOpts.value;
1106
1111
  if (!importMethod && !import_xe_utils.default.includes(import_xe_utils.default.keys(importOpts._typeMaps), type)) {
1107
1112
  if (opts.message !== false) {
1108
- if (import_ui.VxeUI.modal) {
1109
- import_ui.VxeUI.modal.message({ content: getI18n("vxe.error.notType", [type]), status: "error" });
1113
+ if (import_core.VxeUI.modal) {
1114
+ import_core.VxeUI.modal.message({ content: getI18n("vxe.error.notType", [type]), status: "error" });
1110
1115
  }
1111
1116
  }
1112
1117
  const params = { status: false, msg: "type error" };
@@ -1221,17 +1226,20 @@ hooks.add("tableExportModule", {
1221
1226
  const proxyOpts = $xeGGWrapper ? $xeGGWrapper.getComputeMaps().computeProxyOpts.value : {};
1222
1227
  const hasFooter = !!footerTableData.length;
1223
1228
  const hasMerge = !!(mergeBodyList.length || mergeFooterList.length);
1224
- const defOpts = Object.assign({
1225
- message: true,
1226
- isHeader: showHeader,
1227
- isTitle: showHeader,
1228
- isFooter: showFooter,
1229
- isColgroup: isGroup,
1230
- isMerge: hasMerge,
1231
- useStyle: true,
1232
- current: "current",
1233
- modes: (proxyOpts.ajax && proxyOpts.ajax.queryAll ? ["all"] : []).concat(["current", "selected", "empty"])
1234
- }, options);
1229
+ const defOpts = Object.assign(
1230
+ {
1231
+ message: true,
1232
+ isHeader: showHeader,
1233
+ isTitle: showHeader,
1234
+ isFooter: showFooter,
1235
+ isColgroup: isGroup,
1236
+ isMerge: hasMerge,
1237
+ useStyle: true,
1238
+ current: "current",
1239
+ modes: (proxyOpts.ajax && proxyOpts.ajax.queryAll ? ["all"] : []).concat(["current", "selected", "empty"])
1240
+ },
1241
+ options
1242
+ );
1235
1243
  if (import_xe_utils.default.isBoolean(defOpts.isAllExpand)) {
1236
1244
  warnLog("vxe.error.delProp", ["isAllExpand", "isTreeAllExpanded"]);
1237
1245
  defOpts.isTreeAllExpanded = defOpts.isAllExpand;
@@ -1306,9 +1314,13 @@ hooks.add("tableExportModule", {
1306
1314
  exportStore.isPrint = !!isPrint;
1307
1315
  exportStore.hasColgroup = isGroup;
1308
1316
  exportStore.visible = true;
1309
- Object.assign(exportParams, {
1310
- mode: selectRecords.length ? "selected" : "current"
1311
- }, defOpts);
1317
+ Object.assign(
1318
+ exportParams,
1319
+ {
1320
+ mode: selectRecords.length ? "selected" : "current"
1321
+ },
1322
+ defOpts
1323
+ );
1312
1324
  const { filename, sheetName, mode, type } = exportParams;
1313
1325
  if (filename) {
1314
1326
  if (import_xe_utils.default.isFunction(filename)) {
@@ -1347,8 +1359,8 @@ hooks.add("tableExportModule", {
1347
1359
  return (0, import_vue.nextTick)();
1348
1360
  };
1349
1361
  const handleCloseExport = () => {
1350
- if (import_ui.VxeUI.modal) {
1351
- return import_ui.VxeUI.modal.close("VXE_EXPORT_MODAL");
1362
+ if (import_core.VxeUI.modal) {
1363
+ return import_core.VxeUI.modal.close("VXE_EXPORT_MODAL");
1352
1364
  }
1353
1365
  return Promise.resolve();
1354
1366
  };
@@ -1370,32 +1382,36 @@ hooks.add("tableExportModule", {
1370
1382
  const treeOpts = computeTreeOpts.value;
1371
1383
  const proxyOpts = $xeGGWrapper ? $xeGGWrapper.getComputeMaps().computeProxyOpts.value : {};
1372
1384
  const hasMerge = !!(mergeBodyList.length || mergeFooterList.length);
1373
- const opts = Object.assign({
1374
- message: true,
1375
- isHeader: showHeader,
1376
- isTitle: showHeader,
1377
- isFooter: showFooter,
1378
- isColgroup: isGroup,
1379
- isMerge: hasMerge,
1380
- useStyle: true,
1381
- current: "current",
1382
- modes: (proxyOpts.ajax && proxyOpts.ajax.queryAll ? ["all"] : []).concat(["current", "selected", "empty"]),
1383
- download: true,
1384
- type: "csv"
1385
- // filename: '',
1386
- // sheetName: '',
1387
- // original: false,
1388
- // isTreeAllExpanded: false,
1389
- // isRowGroupAllExpanded: false,
1390
- // data: null,
1391
- // remote: false,
1392
- // dataFilterMethod: null,
1393
- // footerFilterMethod: null,
1394
- // exportMethod: null,
1395
- // columnFilterMethod: null,
1396
- // beforeExportMethod: null,
1397
- // afterExportMethod: null
1398
- }, exportOpts, options);
1385
+ const opts = Object.assign(
1386
+ {
1387
+ message: true,
1388
+ isHeader: showHeader,
1389
+ isTitle: showHeader,
1390
+ isFooter: showFooter,
1391
+ isColgroup: isGroup,
1392
+ isMerge: hasMerge,
1393
+ useStyle: true,
1394
+ current: "current",
1395
+ modes: (proxyOpts.ajax && proxyOpts.ajax.queryAll ? ["all"] : []).concat(["current", "selected", "empty"]),
1396
+ download: true,
1397
+ type: "csv"
1398
+ // filename: '',
1399
+ // sheetName: '',
1400
+ // original: false,
1401
+ // isTreeAllExpanded: false,
1402
+ // isRowGroupAllExpanded: false,
1403
+ // data: null,
1404
+ // remote: false,
1405
+ // dataFilterMethod: null,
1406
+ // footerFilterMethod: null,
1407
+ // exportMethod: null,
1408
+ // columnFilterMethod: null,
1409
+ // beforeExportMethod: null,
1410
+ // afterExportMethod: null
1411
+ },
1412
+ exportOpts,
1413
+ options
1414
+ );
1399
1415
  if (import_xe_utils.default.isBoolean(opts.isAllExpand)) {
1400
1416
  warnLog("vxe.error.delProp", ["isAllExpand", "isTreeAllExpanded"]);
1401
1417
  opts.isTreeAllExpanded = opts.isAllExpand;
@@ -1434,23 +1450,27 @@ hooks.add("tableExportModule", {
1434
1450
  isCustomCol = true;
1435
1451
  customCols = import_xe_utils.default.searchTree(columns, () => true, { children: "children", mapChildren: "childNodes", original: true });
1436
1452
  } else {
1437
- customCols = import_xe_utils.default.searchTree(collectColumn, (column) => {
1438
- const isColGroup = column.children && column.children.length > 0;
1439
- let isChecked = false;
1440
- const isExtraChecked = extraFdMaps[column.field];
1441
- if (columns) {
1442
- isChecked = handleFilterColumns(opts, column, columns);
1443
- } else if (excludeFields || includeFields) {
1444
- isChecked = handleFilterFields(opts, column, includeFields, includeFdMaps, excludeFdMaps, extraFdMaps);
1445
- } else {
1446
- if (isExtraChecked) {
1447
- isChecked = true;
1453
+ customCols = import_xe_utils.default.searchTree(
1454
+ collectColumn,
1455
+ (column) => {
1456
+ const isColGroup = column.children && column.children.length > 0;
1457
+ let isChecked = false;
1458
+ const isExtraChecked = extraFdMaps[column.field];
1459
+ if (columns) {
1460
+ isChecked = handleFilterColumns(opts, column, columns);
1461
+ } else if (excludeFields || includeFields) {
1462
+ isChecked = handleFilterFields(opts, column, includeFields, includeFdMaps, excludeFdMaps, extraFdMaps);
1448
1463
  } else {
1449
- isChecked = column.visible && (isColGroup || defaultFilterExportColumn(column));
1464
+ if (isExtraChecked) {
1465
+ isChecked = true;
1466
+ } else {
1467
+ isChecked = column.visible && (isColGroup || defaultFilterExportColumn(column));
1468
+ }
1450
1469
  }
1451
- }
1452
- return isChecked;
1453
- }, { children: "children", mapChildren: "childNodes", original: true });
1470
+ return isChecked;
1471
+ },
1472
+ { children: "children", mapChildren: "childNodes", original: true }
1473
+ );
1454
1474
  }
1455
1475
  const handleOptions = Object.assign({}, opts, { filename: "", sheetName: "", _columnConfs: columns });
1456
1476
  if (!isCustomCol && !columnFilterMethod) {
@@ -1460,33 +1480,37 @@ hooks.add("tableExportModule", {
1460
1480
  if (customCols) {
1461
1481
  handleOptions._isCustomColumn = true;
1462
1482
  groups = import_xe_utils.default.searchTree(
1463
- import_xe_utils.default.mapTree(customCols, (item) => {
1464
- let targetColumn;
1465
- if (item) {
1466
- if ((0, import_util.isColumnInfo)(item)) {
1467
- targetColumn = item;
1468
- } else if (import_xe_utils.default.isString(item)) {
1469
- targetColumn = $xeTable.getColumnByField(item);
1470
- } else {
1471
- const colid = item.id || item.colId;
1472
- const type2 = item.type;
1473
- const field = item.field;
1474
- if (colid) {
1475
- targetColumn = $xeTable.getColumnById(colid);
1476
- } else if (field && type2) {
1477
- targetColumn = tableFullColumn.find((column) => column.field === field && column.type === type2);
1478
- } else if (field) {
1479
- targetColumn = $xeTable.getColumnByField(field);
1480
- } else if (type2) {
1481
- targetColumn = tableFullColumn.find((column) => column.type === type2);
1483
+ import_xe_utils.default.mapTree(
1484
+ customCols,
1485
+ (item) => {
1486
+ let targetColumn;
1487
+ if (item) {
1488
+ if ((0, import_util.isColumnInfo)(item)) {
1489
+ targetColumn = item;
1490
+ } else if (import_xe_utils.default.isString(item)) {
1491
+ targetColumn = $xeTable.getColumnByField(item);
1492
+ } else {
1493
+ const colid = item.id || item.colId;
1494
+ const type2 = item.type;
1495
+ const field = item.field;
1496
+ if (colid) {
1497
+ targetColumn = $xeTable.getColumnById(colid);
1498
+ } else if (field && type2) {
1499
+ targetColumn = tableFullColumn.find((column) => column.field === field && column.type === type2);
1500
+ } else if (field) {
1501
+ targetColumn = $xeTable.getColumnByField(field);
1502
+ } else if (type2) {
1503
+ targetColumn = tableFullColumn.find((column) => column.type === type2);
1504
+ }
1482
1505
  }
1506
+ return targetColumn || {};
1483
1507
  }
1484
- return targetColumn || {};
1508
+ },
1509
+ {
1510
+ children: "childNodes",
1511
+ mapChildren: "_children"
1485
1512
  }
1486
- }, {
1487
- children: "childNodes",
1488
- mapChildren: "_children"
1489
- }),
1513
+ ),
1490
1514
  (column, index) => (0, import_util.isColumnInfo)(column) && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column, $columnIndex: index })),
1491
1515
  {
1492
1516
  children: "_children",
@@ -1495,15 +1519,23 @@ hooks.add("tableExportModule", {
1495
1519
  }
1496
1520
  );
1497
1521
  } else {
1498
- groups = import_xe_utils.default.searchTree(isGroup ? collectColumn : tableFullColumn, (column, index) => column.visible && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column, $columnIndex: index })), { children: "children", mapChildren: "childNodes", original: true });
1522
+ groups = import_xe_utils.default.searchTree(isGroup ? collectColumn : tableFullColumn, (column, index) => column.visible && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column, $columnIndex: index })), {
1523
+ children: "children",
1524
+ mapChildren: "childNodes",
1525
+ original: true
1526
+ });
1499
1527
  }
1500
1528
  const cols = [];
1501
- import_xe_utils.default.eachTree(groups, (column) => {
1502
- const isColGroup = column.children && column.children.length;
1503
- if (!isColGroup) {
1504
- cols.push(column);
1505
- }
1506
- }, { children: "childNodes" });
1529
+ import_xe_utils.default.eachTree(
1530
+ groups,
1531
+ (column) => {
1532
+ const isColGroup = column.children && column.children.length;
1533
+ if (!isColGroup) {
1534
+ cols.push(column);
1535
+ }
1536
+ },
1537
+ { children: "childNodes" }
1538
+ );
1507
1539
  handleOptions.columns = cols;
1508
1540
  handleOptions.colgroups = convertToRows(groups);
1509
1541
  if (filename) {
@@ -1668,11 +1700,15 @@ hooks.add("tableExportModule", {
1668
1700
  },
1669
1701
  importData(options) {
1670
1702
  const importOpts = computeImportOpts.value;
1671
- const opts = Object.assign({
1672
- types: import_xe_utils.default.keys(importOpts._typeMaps)
1673
- // beforeImportMethod: null,
1674
- // afterImportMethod: null
1675
- }, importOpts, options);
1703
+ const opts = Object.assign(
1704
+ {
1705
+ types: import_xe_utils.default.keys(importOpts._typeMaps)
1706
+ // beforeImportMethod: null,
1707
+ // afterImportMethod: null
1708
+ },
1709
+ importOpts,
1710
+ options
1711
+ );
1676
1712
  const { beforeImportMethod, afterImportMethod } = opts;
1677
1713
  if (beforeImportMethod) {
1678
1714
  const biRest = beforeImportMethod({ options: opts, $table: $xeTable });
@@ -1685,7 +1721,7 @@ hooks.add("tableExportModule", {
1685
1721
  warnLog("vxe.error.returnErr", ["beforeImportMethod", "boolean", biRest]);
1686
1722
  }
1687
1723
  }
1688
- return import_ui.VxeUI.readFile(opts).catch((e) => {
1724
+ return import_core.VxeUI.readFile(opts).catch((e) => {
1689
1725
  if (afterImportMethod) {
1690
1726
  afterImportMethod({ status: false, options: opts, $table: $xeTable });
1691
1727
  }
@@ -1696,24 +1732,29 @@ hooks.add("tableExportModule", {
1696
1732
  });
1697
1733
  },
1698
1734
  saveFile(options) {
1699
- return import_ui.VxeUI.saveFile(options);
1735
+ return import_core.VxeUI.saveFile(options);
1700
1736
  },
1701
1737
  readFile(options) {
1702
- return import_ui.VxeUI.readFile(options);
1738
+ return import_core.VxeUI.readFile(options);
1703
1739
  },
1704
1740
  print(options) {
1705
1741
  const $xeGrid = $xeTable.xeGrid;
1706
1742
  const $xeGantt = $xeTable.xeGantt;
1707
1743
  const printOpts = computePrintOpts.value;
1708
- const opts = Object.assign({
1709
- original: false
1710
- // beforePrintMethod
1711
- }, printOpts, options, {
1712
- type: "html",
1713
- download: false,
1714
- remote: false,
1715
- print: true
1716
- });
1744
+ const opts = Object.assign(
1745
+ {
1746
+ original: false
1747
+ // beforePrintMethod
1748
+ },
1749
+ printOpts,
1750
+ options,
1751
+ {
1752
+ type: "html",
1753
+ download: false,
1754
+ remote: false,
1755
+ print: true
1756
+ }
1757
+ );
1717
1758
  const { sheetName } = opts;
1718
1759
  let printTitle = "";
1719
1760
  if (sheetName) {
@@ -1735,10 +1776,10 @@ hooks.add("tableExportModule", {
1735
1776
  const printMethod = opts.printMethod;
1736
1777
  const tableHtml = opts.html || opts.content;
1737
1778
  return new Promise((resolve, reject) => {
1738
- if (import_ui.VxeUI.print) {
1779
+ if (import_core.VxeUI.print) {
1739
1780
  if (tableHtml) {
1740
1781
  resolve(
1741
- import_ui.VxeUI.print({
1782
+ import_core.VxeUI.print({
1742
1783
  title: printTitle,
1743
1784
  html: tableHtml,
1744
1785
  customStyle: opts.style,
@@ -1777,7 +1818,7 @@ hooks.add("tableExportModule", {
1777
1818
  } else {
1778
1819
  resolve(
1779
1820
  exportMethods.exportData(opts).then(({ content }) => {
1780
- return import_ui.VxeUI.print({
1821
+ return import_core.VxeUI.print({
1781
1822
  title: printTitle,
1782
1823
  html: content,
1783
1824
  customStyle: opts.style,
@@ -1824,15 +1865,20 @@ hooks.add("tableExportModule", {
1824
1865
  },
1825
1866
  getPrintHtml(options) {
1826
1867
  const printOpts = computePrintOpts.value;
1827
- const opts = Object.assign({
1828
- original: false
1829
- // beforePrintMethod
1830
- }, printOpts, options, {
1831
- type: "html",
1832
- download: false,
1833
- remote: false,
1834
- print: true
1835
- });
1868
+ const opts = Object.assign(
1869
+ {
1870
+ original: false
1871
+ // beforePrintMethod
1872
+ },
1873
+ printOpts,
1874
+ options,
1875
+ {
1876
+ type: "html",
1877
+ download: false,
1878
+ remote: false,
1879
+ print: true
1880
+ }
1881
+ );
1836
1882
  return $xeTable.exportData(opts).then(({ content }) => {
1837
1883
  return {
1838
1884
  html: content
@@ -1840,8 +1886,8 @@ hooks.add("tableExportModule", {
1840
1886
  });
1841
1887
  },
1842
1888
  closeImport() {
1843
- if (import_ui.VxeUI.modal) {
1844
- return import_ui.VxeUI.modal.close("VXE_IMPORT_MODAL");
1889
+ if (import_core.VxeUI.modal) {
1890
+ return import_core.VxeUI.modal.close("VXE_IMPORT_MODAL");
1845
1891
  }
1846
1892
  return Promise.resolve();
1847
1893
  },
@@ -1849,19 +1895,23 @@ hooks.add("tableExportModule", {
1849
1895
  const { treeConfig, importConfig } = props;
1850
1896
  const { initStore, importStore, importParams } = reactData;
1851
1897
  const importOpts = computeImportOpts.value;
1852
- const defOpts = Object.assign({
1853
- mode: "insertTop",
1854
- message: true,
1855
- types: import_xe_utils.default.keys(importOpts._typeMaps),
1856
- modes: ["insertTop", "covering"]
1857
- }, importOpts, options);
1898
+ const defOpts = Object.assign(
1899
+ {
1900
+ mode: "insertTop",
1901
+ message: true,
1902
+ types: import_xe_utils.default.keys(importOpts._typeMaps),
1903
+ modes: ["insertTop", "covering"]
1904
+ },
1905
+ importOpts,
1906
+ options
1907
+ );
1858
1908
  const types = defOpts.types || [];
1859
1909
  const modes = defOpts.modes || [];
1860
1910
  const isTree = !!treeConfig;
1861
1911
  if (isTree) {
1862
1912
  if (defOpts.message) {
1863
- if (import_ui.VxeUI.modal) {
1864
- import_ui.VxeUI.modal.message({ content: getI18n("vxe.error.treeNotImp"), status: "error" });
1913
+ if (import_core.VxeUI.modal) {
1914
+ import_core.VxeUI.modal.message({ content: getI18n("vxe.error.treeNotImp"), status: "error" });
1865
1915
  }
1866
1916
  }
1867
1917
  return;
@@ -1905,10 +1955,14 @@ hooks.add("tableExportModule", {
1905
1955
  openExport(options) {
1906
1956
  const { exportConfig } = props;
1907
1957
  const exportOpts = computeExportOpts.value;
1908
- const defOpts = Object.assign({
1909
- message: true,
1910
- types: import_xe_utils.default.keys(exportOpts._typeMaps)
1911
- }, exportOpts, options);
1958
+ const defOpts = Object.assign(
1959
+ {
1960
+ message: true,
1961
+ types: import_xe_utils.default.keys(exportOpts._typeMaps)
1962
+ },
1963
+ exportOpts,
1964
+ options
1965
+ );
1912
1966
  if (!(0, import_utils.hasEnableConf)(exportConfig, exportOpts)) {
1913
1967
  errLog("vxe.error.reqProp", ["export-config"]);
1914
1968
  }
@@ -1918,9 +1972,13 @@ hooks.add("tableExportModule", {
1918
1972
  openPrint(options) {
1919
1973
  const { printConfig } = props;
1920
1974
  const printOpts = computePrintOpts.value;
1921
- const defOpts = Object.assign({
1922
- message: true
1923
- }, printOpts, options);
1975
+ const defOpts = Object.assign(
1976
+ {
1977
+ message: true
1978
+ },
1979
+ printOpts,
1980
+ options
1981
+ );
1924
1982
  if (!(0, import_utils.hasEnableConf)(printConfig, printOpts)) {
1925
1983
  errLog("vxe.error.reqProp", ["print-config"]);
1926
1984
  }