vxe-table 3.22.2 → 3.22.3

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 (160) hide show
  1. package/es/locale/lang/ar-EG.js +7 -0
  2. package/es/locale/lang/de-DE.js +7 -0
  3. package/es/locale/lang/en-US.js +7 -0
  4. package/es/locale/lang/es-ES.js +7 -0
  5. package/es/locale/lang/fr-FR.js +7 -0
  6. package/es/locale/lang/hu-HU.js +7 -0
  7. package/es/locale/lang/hy-AM.js +7 -0
  8. package/es/locale/lang/id-ID.js +7 -0
  9. package/es/locale/lang/it-IT.js +7 -0
  10. package/es/locale/lang/ja-JP.js +7 -0
  11. package/es/locale/lang/ko-KR.js +7 -0
  12. package/es/locale/lang/ms-MY.js +7 -0
  13. package/es/locale/lang/nb-NO.js +7 -0
  14. package/es/locale/lang/pt-BR.js +7 -0
  15. package/es/locale/lang/ru-RU.js +7 -0
  16. package/es/locale/lang/th-TH.js +7 -0
  17. package/es/locale/lang/ug-CN.js +7 -0
  18. package/es/locale/lang/uk-UA.js +7 -0
  19. package/es/locale/lang/uz-UZ.js +7 -0
  20. package/es/locale/lang/vi-VN.js +7 -0
  21. package/es/locale/lang/zh-CHT.js +7 -0
  22. package/es/locale/lang/zh-CN.js +7 -0
  23. package/es/style.css +1 -1
  24. package/es/table/module/export/export-panel.js +384 -335
  25. package/es/table/module/export/mixin.js +106 -28
  26. package/es/table/module/export/util.js +1 -1
  27. package/es/table/src/body.js +1 -1
  28. package/es/table/src/footer.js +1 -1
  29. package/es/table/src/header.js +4 -2
  30. package/es/table/src/table.js +24 -24
  31. package/es/table/src/util.js +1 -0
  32. package/es/ui/index.js +2 -1
  33. package/es/ui/src/log.js +1 -1
  34. package/lib/index.umd.js +202 -79
  35. package/lib/index.umd.min.js +1 -1
  36. package/lib/locale/lang/ar-EG.js +7 -0
  37. package/lib/locale/lang/ar-EG.min.js +1 -1
  38. package/lib/locale/lang/ar-EG.umd.js +7 -0
  39. package/lib/locale/lang/de-DE.js +7 -0
  40. package/lib/locale/lang/de-DE.min.js +1 -1
  41. package/lib/locale/lang/de-DE.umd.js +7 -0
  42. package/lib/locale/lang/en-US.js +7 -0
  43. package/lib/locale/lang/en-US.min.js +1 -1
  44. package/lib/locale/lang/en-US.umd.js +7 -0
  45. package/lib/locale/lang/es-ES.js +7 -0
  46. package/lib/locale/lang/es-ES.min.js +1 -1
  47. package/lib/locale/lang/es-ES.umd.js +7 -0
  48. package/lib/locale/lang/fr-FR.js +7 -0
  49. package/lib/locale/lang/fr-FR.min.js +1 -1
  50. package/lib/locale/lang/fr-FR.umd.js +7 -0
  51. package/lib/locale/lang/hu-HU.js +7 -0
  52. package/lib/locale/lang/hu-HU.min.js +1 -1
  53. package/lib/locale/lang/hu-HU.umd.js +7 -0
  54. package/lib/locale/lang/hy-AM.js +7 -0
  55. package/lib/locale/lang/hy-AM.min.js +1 -1
  56. package/lib/locale/lang/hy-AM.umd.js +7 -0
  57. package/lib/locale/lang/id-ID.js +7 -0
  58. package/lib/locale/lang/id-ID.min.js +1 -1
  59. package/lib/locale/lang/id-ID.umd.js +7 -0
  60. package/lib/locale/lang/it-IT.js +7 -0
  61. package/lib/locale/lang/it-IT.min.js +1 -1
  62. package/lib/locale/lang/it-IT.umd.js +7 -0
  63. package/lib/locale/lang/ja-JP.js +7 -0
  64. package/lib/locale/lang/ja-JP.min.js +1 -1
  65. package/lib/locale/lang/ja-JP.umd.js +7 -0
  66. package/lib/locale/lang/ko-KR.js +7 -0
  67. package/lib/locale/lang/ko-KR.min.js +1 -1
  68. package/lib/locale/lang/ko-KR.umd.js +7 -0
  69. package/lib/locale/lang/ms-MY.js +7 -0
  70. package/lib/locale/lang/ms-MY.min.js +1 -1
  71. package/lib/locale/lang/ms-MY.umd.js +7 -0
  72. package/lib/locale/lang/nb-NO.js +7 -0
  73. package/lib/locale/lang/nb-NO.min.js +1 -1
  74. package/lib/locale/lang/nb-NO.umd.js +7 -0
  75. package/lib/locale/lang/pt-BR.js +7 -0
  76. package/lib/locale/lang/pt-BR.min.js +1 -1
  77. package/lib/locale/lang/pt-BR.umd.js +7 -0
  78. package/lib/locale/lang/ru-RU.js +7 -0
  79. package/lib/locale/lang/ru-RU.min.js +1 -1
  80. package/lib/locale/lang/ru-RU.umd.js +7 -0
  81. package/lib/locale/lang/th-TH.js +7 -0
  82. package/lib/locale/lang/th-TH.min.js +1 -1
  83. package/lib/locale/lang/th-TH.umd.js +7 -0
  84. package/lib/locale/lang/ug-CN.js +7 -0
  85. package/lib/locale/lang/ug-CN.min.js +1 -1
  86. package/lib/locale/lang/ug-CN.umd.js +7 -0
  87. package/lib/locale/lang/uk-UA.js +7 -0
  88. package/lib/locale/lang/uk-UA.min.js +1 -1
  89. package/lib/locale/lang/uk-UA.umd.js +7 -0
  90. package/lib/locale/lang/uz-UZ.js +7 -0
  91. package/lib/locale/lang/uz-UZ.min.js +1 -1
  92. package/lib/locale/lang/uz-UZ.umd.js +7 -0
  93. package/lib/locale/lang/vi-VN.js +7 -0
  94. package/lib/locale/lang/vi-VN.min.js +1 -1
  95. package/lib/locale/lang/vi-VN.umd.js +7 -0
  96. package/lib/locale/lang/zh-CHT.js +7 -0
  97. package/lib/locale/lang/zh-CHT.min.js +1 -1
  98. package/lib/locale/lang/zh-CHT.umd.js +7 -0
  99. package/lib/locale/lang/zh-CN.js +7 -0
  100. package/lib/locale/lang/zh-CN.min.js +1 -1
  101. package/lib/locale/lang/zh-CN.umd.js +7 -0
  102. package/lib/style.css +1 -1
  103. package/lib/table/module/export/export-panel.js +50 -22
  104. package/lib/table/module/export/export-panel.min.js +1 -1
  105. package/lib/table/module/export/mixin.js +106 -28
  106. package/lib/table/module/export/mixin.min.js +1 -1
  107. package/lib/table/module/export/util.js +1 -1
  108. package/lib/table/module/export/util.min.js +1 -1
  109. package/lib/table/src/body.js +1 -1
  110. package/lib/table/src/body.min.js +1 -1
  111. package/lib/table/src/footer.js +1 -1
  112. package/lib/table/src/footer.min.js +1 -1
  113. package/lib/table/src/header.js +4 -2
  114. package/lib/table/src/header.min.js +1 -1
  115. package/lib/table/src/table.js +28 -22
  116. package/lib/table/src/table.min.js +1 -1
  117. package/lib/table/src/util.js +1 -0
  118. package/lib/table/src/util.min.js +1 -1
  119. package/lib/ui/index.js +2 -1
  120. package/lib/ui/index.min.js +1 -1
  121. package/lib/ui/src/log.js +1 -1
  122. package/lib/ui/src/log.min.js +1 -1
  123. package/package.json +2 -2
  124. package/packages/locale/lang/ar-EG.ts +7 -0
  125. package/packages/locale/lang/de-DE.ts +7 -0
  126. package/packages/locale/lang/en-US.ts +7 -0
  127. package/packages/locale/lang/es-ES.ts +7 -0
  128. package/packages/locale/lang/fr-FR.ts +7 -0
  129. package/packages/locale/lang/hu-HU.ts +7 -0
  130. package/packages/locale/lang/hy-AM.ts +7 -0
  131. package/packages/locale/lang/id-ID.ts +7 -0
  132. package/packages/locale/lang/it-IT.ts +7 -0
  133. package/packages/locale/lang/ja-JP.ts +7 -0
  134. package/packages/locale/lang/ko-KR.ts +7 -0
  135. package/packages/locale/lang/ms-MY.ts +7 -0
  136. package/packages/locale/lang/nb-NO.ts +7 -0
  137. package/packages/locale/lang/pt-BR.ts +7 -0
  138. package/packages/locale/lang/ru-RU.ts +7 -0
  139. package/packages/locale/lang/th-TH.ts +7 -0
  140. package/packages/locale/lang/ug-CN.ts +7 -0
  141. package/packages/locale/lang/uk-UA.ts +7 -0
  142. package/packages/locale/lang/uz-UZ.ts +7 -0
  143. package/packages/locale/lang/vi-VN.ts +7 -0
  144. package/packages/locale/lang/zh-CHT.ts +7 -0
  145. package/packages/locale/lang/zh-CN.ts +7 -0
  146. package/packages/table/module/export/export-panel.ts +383 -333
  147. package/packages/table/module/export/mixin.ts +130 -46
  148. package/packages/table/module/export/util.ts +1 -1
  149. package/packages/table/src/body.ts +1 -1
  150. package/packages/table/src/footer.ts +1 -1
  151. package/packages/table/src/header.ts +4 -2
  152. package/packages/table/src/table.ts +24 -24
  153. package/packages/table/src/util.ts +1 -0
  154. package/packages/ui/index.ts +1 -0
  155. /package/es/{iconfont.1784122379007.ttf → iconfont.1784251254538.ttf} +0 -0
  156. /package/es/{iconfont.1784122379007.woff → iconfont.1784251254538.woff} +0 -0
  157. /package/es/{iconfont.1784122379007.woff2 → iconfont.1784251254538.woff2} +0 -0
  158. /package/lib/{iconfont.1784122379007.ttf → iconfont.1784251254538.ttf} +0 -0
  159. /package/lib/{iconfont.1784122379007.woff → iconfont.1784251254538.woff} +0 -0
  160. /package/lib/{iconfont.1784122379007.woff2 → iconfont.1784251254538.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -3311,7 +3311,7 @@ function getClass(property, params) {
3311
3311
  /* unused harmony import specifier */ var VxeUI;
3312
3312
 
3313
3313
 
3314
- const version = "3.22.2";
3314
+ const version = "3.22.3";
3315
3315
  core_.VxeUI.version = version;
3316
3316
  core_.VxeUI.tableVersion = version;
3317
3317
  core_.VxeUI.setConfig({
@@ -3378,6 +3378,7 @@ core_.VxeUI.setConfig({
3378
3378
  strict: true
3379
3379
  },
3380
3380
  tooltipConfig: {
3381
+ mode: 'tooltip',
3381
3382
  enterable: true,
3382
3383
  defaultPlacement: 'top'
3383
3384
  },
@@ -4086,7 +4087,7 @@ function wheelScrollTopTo(diffNum, cb) {
4086
4087
  const {
4087
4088
  log: log_log
4088
4089
  } = core_.VxeUI;
4089
- const tableVersion = `table v${"3.22.2"}`;
4090
+ const tableVersion = `table v${"3.22.3"}`;
4090
4091
  function createComponentLog(name) {
4091
4092
  const uiVersion = core_.VxeUI.uiVersion ? `ui v${core_.VxeUI.uiVersion}` : '';
4092
4093
  const ganttVersion = core_.VxeUI.ganttVersion ? `gantt v${core_.VxeUI.ganttVersion}` : '';
@@ -4733,6 +4734,7 @@ function createReactData() {
4733
4734
  mergeBodyFlag: 1,
4734
4735
  mergeFootFlag: 1,
4735
4736
  rowHeightStore: {
4737
+ xlarge: 54,
4736
4738
  large: 52,
4737
4739
  default: 48,
4738
4740
  medium: 44,
@@ -8900,7 +8902,7 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
8900
8902
  const cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(showOverflow) ? allShowOverflow : showOverflow;
8901
8903
  const showEllipsis = cellOverflow === 'ellipsis';
8902
8904
  const showTitle = cellOverflow === 'title';
8903
- const showTooltip = cellOverflow === true || cellOverflow === 'tooltip';
8905
+ const showTooltip = cellOverflow === true ? tooltipOpts.mode === 'tooltip' : cellOverflow === 'tooltip';
8904
8906
  const hasEllipsis = isAllOverflow || showTitle || showTooltip || showEllipsis;
8905
8907
  const showResizable = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable;
8906
8908
  const isCsHeight = !!customCellHeight;
@@ -9767,6 +9769,7 @@ function header_renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, _rowIn
9767
9769
  const virtualXOpts = $xeTable.computeVirtualXOpts;
9768
9770
  const columnOpts = $xeTable.computeColumnOpts;
9769
9771
  const columnDragOpts = $xeTable.computeColumnDragOpts;
9772
+ const headerTooltipOpts = $xeTable.computeHeaderTooltipOpts;
9770
9773
  const cellOpts = $xeTable.computeCellOpts;
9771
9774
  const defaultRowHeight = $xeTable.computeDefaultRowHeight;
9772
9775
  const headerCellOpts = $xeTable.computeHeaderCellOpts;
@@ -9800,7 +9803,7 @@ function header_renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, _rowIn
9800
9803
  const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
9801
9804
  const showEllipsis = headOverflow === 'ellipsis';
9802
9805
  const showTitle = headOverflow === 'title';
9803
- const showTooltip = headOverflow === true || headOverflow === 'tooltip';
9806
+ const showTooltip = headOverflow === true ? headerTooltipOpts.mode === 'tooltip' : headOverflow === 'tooltip';
9804
9807
  const hasEllipsis = showTitle || showTooltip || showEllipsis;
9805
9808
  let hasFilter = false;
9806
9809
  let firstFilterOption = null;
@@ -9976,6 +9979,7 @@ function renderFilterRows(h, _vm, isOptimizeMode, cols) {
9976
9979
  const {
9977
9980
  fullColumnIdData
9978
9981
  } = tableInternalData;
9982
+ const headerTooltipOpts = $xeTable.computeHeaderTooltipOpts;
9979
9983
  const cellOpts = $xeTable.computeCellOpts;
9980
9984
  const defaultRowHeight = $xeTable.computeDefaultRowHeight;
9981
9985
  const headerCellOpts = $xeTable.computeHeaderCellOpts;
@@ -10010,7 +10014,7 @@ function renderFilterRows(h, _vm, isOptimizeMode, cols) {
10010
10014
  const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
10011
10015
  const showEllipsis = headOverflow === 'ellipsis';
10012
10016
  const showTitle = headOverflow === 'title';
10013
- const showTooltip = headOverflow === true || headOverflow === 'tooltip';
10017
+ const showTooltip = headOverflow === true ? headerTooltipOpts.mode === 'tooltip' : headOverflow === 'tooltip';
10014
10018
  const hasEllipsis = showTitle || showTooltip || showEllipsis;
10015
10019
  let hasFilter = false;
10016
10020
  let firstFilterOption = null;
@@ -10443,7 +10447,7 @@ function footer_renderRows(h, _vm, isOptimizeMode, tableColumn, footerTableData,
10443
10447
  const footAlign = footerAlign || (compConf ? compConf.tableFooterCellAlign : '') || allFooterAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
10444
10448
  const showEllipsis = footOverflow === 'ellipsis';
10445
10449
  const showTitle = footOverflow === 'title';
10446
- const showTooltip = footOverflow === true || footOverflow === 'tooltip';
10450
+ const showTooltip = footOverflow === true ? footerTooltipOpts.mode === 'tooltip' : footOverflow === 'tooltip';
10447
10451
  const hasEllipsis = showTitle || showTooltip || showEllipsis;
10448
10452
  const showResizable = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable;
10449
10453
  const attrs = {
@@ -13280,6 +13284,18 @@ const {
13280
13284
  },
13281
13285
  computed: {
13282
13286
  ...{},
13287
+ computeColWidthModeOptions() {
13288
+ return [{
13289
+ value: '',
13290
+ label: export_panel_getI18n('vxe.export.wdModes.default')
13291
+ }, {
13292
+ value: 'auto',
13293
+ label: export_panel_getI18n('vxe.export.wdModes.auto')
13294
+ }, {
13295
+ value: 'scale',
13296
+ label: export_panel_getI18n('vxe.export.wdModes.scale')
13297
+ }];
13298
+ },
13283
13299
  computeCheckedAll() {
13284
13300
  const $xeExportPanel = this;
13285
13301
  const props = $xeExportPanel;
@@ -13483,6 +13499,11 @@ const {
13483
13499
  });
13484
13500
  },
13485
13501
  renderVN(h) {
13502
+ const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
13503
+ const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
13504
+ const VxeUISelectComponent = core_.VxeUI.getComponent('VxeSelect');
13505
+ const VxeUIInputComponent = core_.VxeUI.getComponent('VxeInput');
13506
+ const VxeUICheckboxComponent = core_.VxeUI.getComponent('VxeCheckbox');
13486
13507
  const $xeExportPanel = this;
13487
13508
  const props = $xeExportPanel;
13488
13509
  const reactData = $xeExportPanel.reactData;
@@ -13513,6 +13534,7 @@ const {
13513
13534
  const showSheet = $xeExportPanel.computeShowSheet;
13514
13535
  const supportMerge = $xeExportPanel.computeSupportMerge;
13515
13536
  const supportStyle = $xeExportPanel.computeSupportStyle;
13537
+ const colWidthModeOptions = $xeExportPanel.computeColWidthModeOptions;
13516
13538
  // const supportGroup = $xeExportPanel.computeSupportGroup
13517
13539
  const slots = defaultOptions.slots || {};
13518
13540
  const topSlot = slots.top;
@@ -13556,7 +13578,7 @@ const {
13556
13578
  class: 'vxe-checkbox--label'
13557
13579
  }, colTitle)]));
13558
13580
  });
13559
- return h('vxe-modal', {
13581
+ return VxeUIModalComponent ? h(VxeUIModalComponent, {
13560
13582
  ref: 'modal',
13561
13583
  props: {
13562
13584
  id: 'VXE_EXPORT_MODAL',
@@ -13604,7 +13626,7 @@ const {
13604
13626
  cellpadding: 0,
13605
13627
  border: 0
13606
13628
  }
13607
- }, [h('tbody', [[isPrint ? export_panel_renderEmptyElement($xeTable) : h('tr', [h('td', export_panel_getI18n('vxe.export.expName')), h('td', [h('vxe-input', {
13629
+ }, [h('tbody', [[isPrint ? export_panel_renderEmptyElement($xeTable) : h('tr', [h('td', export_panel_getI18n('vxe.export.expName')), h('td', [VxeUIInputComponent ? h(VxeUIInputComponent, {
13608
13630
  ref: 'filename',
13609
13631
  props: {
13610
13632
  value: defaultOptions.filename,
@@ -13617,7 +13639,7 @@ const {
13617
13639
  defaultOptions.filename = value;
13618
13640
  }
13619
13641
  }
13620
- })])]), isPrint ? export_panel_renderEmptyElement($xeTable) : h('tr', [h('td', export_panel_getI18n('vxe.export.expType')), h('td', [h('vxe-select', {
13642
+ }) : export_panel_renderEmptyElement($xeTable)])]), isPrint ? export_panel_renderEmptyElement($xeTable) : h('tr', [h('td', export_panel_getI18n('vxe.export.expType')), h('td', [h('vxe-select', {
13621
13643
  props: {
13622
13644
  value: defaultOptions.type,
13623
13645
  options: storeData.typeList
@@ -13627,7 +13649,7 @@ const {
13627
13649
  defaultOptions.type = value;
13628
13650
  }
13629
13651
  }
13630
- })])]), isPrint || showSheet ? h('tr', [h('td', export_panel_getI18n('vxe.export.expSheetName')), h('td', [h('vxe-input', {
13652
+ })])]), isPrint || showSheet ? h('tr', [h('td', export_panel_getI18n('vxe.export.expSheetName')), h('td', [VxeUIInputComponent ? h(VxeUIInputComponent, {
13631
13653
  ref: 'sheetname',
13632
13654
  props: {
13633
13655
  value: defaultOptions.sheetName,
@@ -13640,7 +13662,7 @@ const {
13640
13662
  defaultOptions.sheetName = value;
13641
13663
  }
13642
13664
  }
13643
- })])]) : export_panel_renderEmptyElement($xeTable), h('tr', [h('td', export_panel_getI18n('vxe.export.expMode')), h('td', [h('vxe-select', {
13665
+ }) : export_panel_renderEmptyElement($xeTable)])]) : export_panel_renderEmptyElement($xeTable), h('tr', [h('td', export_panel_getI18n('vxe.export.expMode')), h('td', [h(VxeUISelectComponent, {
13644
13666
  props: {
13645
13667
  value: defaultOptions.mode,
13646
13668
  options: storeData.modeList
@@ -13671,11 +13693,21 @@ const {
13671
13693
  class: 'vxe-checkbox--label'
13672
13694
  }, export_panel_getI18n('vxe.export.expCurrentColumn'))])]), h('ul', {
13673
13695
  class: 'vxe-table-export--panel-column-body'
13674
- }, colVNs)])])]), h('tr', [h('td', export_panel_getI18n('vxe.export.expOpts')), parameterSlot ? h('td', [h('div', {
13696
+ }, colVNs)])])]), isPrint ? h('tr', [h('td', export_panel_getI18n('vxe.export.widthMode')), h('td', [VxeUISelectComponent ? h(VxeUISelectComponent, {
13697
+ props: {
13698
+ value: defaultOptions.widthMode,
13699
+ options: colWidthModeOptions
13700
+ },
13701
+ on: {
13702
+ modelValue(value) {
13703
+ defaultOptions.widthMode = value;
13704
+ }
13705
+ }
13706
+ }) : export_panel_renderEmptyElement($xeTable)])]) : export_panel_renderEmptyElement($xeTable), h('tr', [h('td', export_panel_getI18n('vxe.export.expOpts')), parameterSlot ? h('td', [h('div', {
13675
13707
  class: 'vxe-table-export--panel-option-row'
13676
13708
  }, $xeTable.callSlot(parameterSlot, params, h))]) : h('td', [h('div', {
13677
13709
  class: 'vxe-table-export--panel-option-row'
13678
- }, [h('vxe-checkbox', {
13710
+ }, VxeUICheckboxComponent ? [h(VxeUICheckboxComponent, {
13679
13711
  props: {
13680
13712
  value: hasEmptyData || isHeader,
13681
13713
  disabled: hasEmptyData,
@@ -13687,7 +13719,7 @@ const {
13687
13719
  defaultOptions.isHeader = value;
13688
13720
  }
13689
13721
  }
13690
- }), h('vxe-checkbox', {
13722
+ }), h(VxeUICheckboxComponent, {
13691
13723
  props: {
13692
13724
  value: defaultOptions.isFooter,
13693
13725
  disabled: !storeData.hasFooter,
@@ -13699,7 +13731,7 @@ const {
13699
13731
  defaultOptions.isFooter = value;
13700
13732
  }
13701
13733
  }
13702
- }), h('vxe-checkbox', {
13734
+ }), h(VxeUICheckboxComponent, {
13703
13735
  props: {
13704
13736
  value: isHeader ? defaultOptions.isTitle : false,
13705
13737
  disabled: !isHeader,
@@ -13711,7 +13743,7 @@ const {
13711
13743
  defaultOptions.isTitle = value;
13712
13744
  }
13713
13745
  }
13714
- }), h('vxe-checkbox', {
13746
+ }), h(VxeUICheckboxComponent, {
13715
13747
  props: {
13716
13748
  value: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
13717
13749
  disabled: !isHeader || !hasColgroup || !supportMerge,
@@ -13723,9 +13755,9 @@ const {
13723
13755
  defaultOptions.isColgroup = value;
13724
13756
  }
13725
13757
  }
13726
- })]), h('div', {
13758
+ })] : []), h('div', {
13727
13759
  class: 'vxe-table-export--panel-option-row'
13728
- }, [h('vxe-checkbox', {
13760
+ }, VxeUICheckboxComponent ? [h(VxeUICheckboxComponent, {
13729
13761
  props: {
13730
13762
  value: hasEmptyData ? false : defaultOptions.original,
13731
13763
  disabled: hasEmptyData,
@@ -13737,7 +13769,7 @@ const {
13737
13769
  defaultOptions.original = value;
13738
13770
  }
13739
13771
  }
13740
- }), h('vxe-checkbox', {
13772
+ }), h(VxeUICheckboxComponent, {
13741
13773
  props: {
13742
13774
  value: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
13743
13775
  disabled: hasEmptyData || !hasMerge || !supportMerge || !checkedAll,
@@ -13749,7 +13781,7 @@ const {
13749
13781
  defaultOptions.isMerge = value;
13750
13782
  }
13751
13783
  }
13752
- }), isPrint ? export_panel_renderEmptyElement($xeTable) : h('vxe-checkbox', {
13784
+ }), isPrint ? export_panel_renderEmptyElement($xeTable) : h(VxeUICheckboxComponent, {
13753
13785
  props: {
13754
13786
  value: supportStyle ? defaultOptions.useStyle : false,
13755
13787
  disabled: !supportStyle,
@@ -13761,9 +13793,9 @@ const {
13761
13793
  defaultOptions.useStyle = value;
13762
13794
  }
13763
13795
  }
13764
- })]), h('div', {
13796
+ })] : []), h('div', {
13765
13797
  class: 'vxe-table-export--panel-option-row'
13766
- }, [h('vxe-checkbox', {
13798
+ }, VxeUICheckboxComponent ? [h(VxeUICheckboxComponent, {
13767
13799
  props: {
13768
13800
  value: hasTree ? defaultOptions.isTreeAllExpanded : false,
13769
13801
  disabled: hasEmptyData || !hasTree,
@@ -13775,7 +13807,7 @@ const {
13775
13807
  defaultOptions.isTreeAllExpanded = value;
13776
13808
  }
13777
13809
  }
13778
- }), h('vxe-checkbox', {
13810
+ }), h(VxeUICheckboxComponent, {
13779
13811
  props: {
13780
13812
  value: hasRowGroup ? defaultOptions.isRowGroupAllExpanded : false,
13781
13813
  disabled: hasEmptyData || !hasRowGroup,
@@ -13787,7 +13819,7 @@ const {
13787
13819
  defaultOptions.isRowGroupAllExpanded = value;
13788
13820
  }
13789
13821
  }
13790
- })])])])]])])]), bottomSlot ? h('div', {
13822
+ })] : [])])])]])])]), bottomSlot ? h('div', {
13791
13823
  class: 'vxe-table-export--panel-bottom'
13792
13824
  }, $xeTable.callSlot(bottomSlot, params, h)) : export_panel_renderEmptyElement($xeTable)]);
13793
13825
  },
@@ -13804,14 +13836,14 @@ const {
13804
13836
  class: 'vxe-table-export--panel-footer'
13805
13837
  }, footerSlot ? $xeTable.callSlot(footerSlot, params, h) : [h('div', {
13806
13838
  class: 'vxe-table-export--panel-btns'
13807
- }, [h('vxe-button', {
13839
+ }, [VxeUIButtonComponent ? h(VxeUIButtonComponent, {
13808
13840
  props: {
13809
13841
  content: export_panel_getI18n('vxe.export.expCancel')
13810
13842
  },
13811
13843
  on: {
13812
13844
  click: $xeExportPanel.cancelEvent
13813
13845
  }
13814
- }), h('vxe-button', {
13846
+ }) : export_panel_renderEmptyElement($xeTable), VxeUIButtonComponent ? h(VxeUIButtonComponent, {
13815
13847
  ref: 'confirmBtn',
13816
13848
  props: {
13817
13849
  status: 'primary',
@@ -13820,10 +13852,10 @@ const {
13820
13852
  on: {
13821
13853
  click: $xeExportPanel.confirmEvent
13822
13854
  }
13823
- })])]);
13855
+ }) : export_panel_renderEmptyElement($xeTable)])]);
13824
13856
  }
13825
13857
  }
13826
- });
13858
+ }) : export_panel_renderEmptyElement($xeTable);
13827
13859
  }
13828
13860
  },
13829
13861
  render(h) {
@@ -16435,7 +16467,7 @@ function handleEditCell($xeTable, row, fieldOrColumn, options) {
16435
16467
  });
16436
16468
  ;// ./packages/table/module/export/util.ts
16437
16469
  // 默认导出或打印的 HTML 样式
16438
- const defaultHtmlStyle = 'body{margin:0;padding: 0 1px;color:#333333;font-size:14px;font-family:"Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STHeiti,MingLiu}body *{-webkit-box-sizing:border-box;box-sizing:border-box}.vxe-table{border-collapse:collapse;text-align:left;border-spacing:0}.vxe-table:not(.is--print){table-layout:fixed}.vxe-table,.vxe-table th,.vxe-table td,.vxe-table td{border-color:#D0D0D0;border-style:solid;border-width:0}.vxe-table.is--print{width:100%}.border--default,.border--full,.border--outer{border-top-width:1px}.border--default,.border--full,.border--outer{border-left-width:1px}.border--outer,.border--default th,.border--default td,.border--full th,.border--full td,.border--outer th,.border--inner th,.border--inner td{border-bottom-width:1px}.border--default,.border--outer,.border--full th,.border--full td{border-right-width:1px}.border--default th,.border--full th,.border--outer th{background-color:#f8f8f9}.vxe-table td>div,.vxe-table th>div{padding:.5em .4em}.col--center{text-align:center}.col--right{text-align:right}.vxe-table:not(.is--print) .col--ellipsis>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.vxe-table--tree-node{text-align:left}.vxe-table--tree-node-wrapper{position:relative}.vxe-table--tree-icon-wrapper{position:absolute;top:50%;width:1em;height:1em;text-align:center;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.vxe-table--tree-unfold-icon,.vxe-table--tree-fold-icon{position:absolute;width:0;height:0;border-style:solid;border-width:.5em;border-right-color:transparent;border-bottom-color:transparent}.vxe-table--tree-unfold-icon{left:.3em;top:0;border-left-color:#939599;border-top-color:transparent}.vxe-table--tree-fold-icon{left:0;top:.3em;border-left-color:transparent;border-top-color:#939599}.vxe-table--tree-cell{display:block;padding-left:1.5em}.vxe-table input[type="checkbox"]{margin:0}.vxe-table input[type="checkbox"],.vxe-table input[type="radio"],.vxe-table input[type="checkbox"]+span,.vxe-table input[type="radio"]+span{vertical-align:middle;padding-left:0.4em}';
16470
+ const defaultHtmlStyle = 'body{padding:0;color:rgba(0,0,0,0.7);font-family:"Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STHeiti,MingLiu;}body *{-webkit-box-sizing:border-box;box-sizing:border-box;}.vxe-table{border-collapse:collapse;text-align:left;border-spacing:0;}.vxe-table.is--default-width,.vxe-table.is--auto-width{width:100%;}.vxe-table.is--scale-width{table-layout:fixed;}.vxe-table,.vxe-table th,.vxe-table td,.vxe-table td{word-break:break-all;border-color:#D0D0D0;border-style:solid;border-width:0;}.border--default,.border--full,.border--outer{border-top-width:1px;}.border--default,.border--full,.border--outer{border-left-width:1px}.border--outer,.border--default th,.border--default td,.border--full th,.border--full td,.border--outer th,.border--inner th,.border--inner td{border-bottom-width:1px;}.border--default,.border--outer,.border--full th,.border--full td{border-right-width:1px;}.border--default th,.border--full th,.border--outer th{background-color:#f8f8f9;}.vxe-table td>div,.vxe-table th>div{padding:0.5em 0.4em;}.col--center{text-align:center;}.col--right{text-align:right;}.vxe-table .col--ellipsis>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all;}.vxe-table--tree-node{text-align:left;}.vxe-table--tree-node-wrapper{position:relative;}.vxe-table--tree-icon-wrapper{position:absolute;top:50%;width:1em;height:1em;text-align:center;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;}.vxe-table--tree-unfold-icon,.vxe-table--tree-fold-icon{position:absolute;width:0;height:0;border-style:solid;border-width:0.5em;border-right-color:transparent;border-bottom-color:transparent;}.vxe-table--tree-unfold-icon{left:.3em;top:0;border-left-color:#939599;border-top-color:transparent;}.vxe-table--tree-fold-icon{left:0;top:.3em;border-left-color:transparent;border-top-color:#939599;}.vxe-table--tree-cell{display:block;padding-left:1.5em;}.vxe-table input[type="checkbox"]{margin:0;}.vxe-table input[type="checkbox"],.vxe-table input[type="radio"],.vxe-table input[type="checkbox"]+span,.vxe-table input[type="radio"]+span{vertical-align:middle;padding-left:0.4em}';
16439
16471
  function getExportBlobByContent(content, options) {
16440
16472
  return new Blob([content], {
16441
16473
  type: `text/${options.type};charset=utf-8;`
@@ -17030,6 +17062,9 @@ function hasEllipsis($xeTable, column, property, allColumnOverflow) {
17030
17062
  }
17031
17063
  return isEllipsis;
17032
17064
  }
17065
+ function getCustomColKey(conf) {
17066
+ return `${conf.field || ''}:${conf.type || ''}`;
17067
+ }
17033
17068
  function toHtml($xeTable, opts, columns, datas) {
17034
17069
  const props = $xeTable;
17035
17070
  const reactData = $xeTable;
@@ -17055,42 +17090,113 @@ function toHtml($xeTable, opts, columns, datas) {
17055
17090
  const treeOpts = $xeTable.computeTreeOpts;
17056
17091
  const {
17057
17092
  print: isPrint,
17093
+ widthMode,
17058
17094
  isHeader,
17059
17095
  isFooter,
17060
17096
  isColgroup,
17061
17097
  isMerge,
17062
17098
  colgroups,
17099
+ _columnConfs,
17063
17100
  original
17064
17101
  } = opts;
17065
- const allCls = 'check-all';
17066
- const clss = ['vxe-table', `border--${toTableBorder(border)}`, isPrint ? 'is--print' : '', isHeader ? 'is--header' : ''].filter(cls => cls);
17067
- const tables = [`<table class="${clss.join(' ')}" border="0" cellspacing="0" cellpadding="0">`, `<colgroup>${columns.map(column => `<col style="width:${column.renderWidth}px">`).join('')}</colgroup>`];
17068
- if (isHeader) {
17069
- tables.push('<thead>');
17070
- if (isColgroup && !original) {
17102
+ const isAutoWidth = widthMode === 'auto';
17103
+ const isScaleWidth = widthMode === 'scale';
17104
+ const isDefaultWidth = !isAutoWidth && !isScaleWidth;
17105
+ const customWidthMaps = {};
17106
+ if (_columnConfs) {
17107
+ _columnConfs.forEach(conf => {
17108
+ if (!isColumnInfo(conf)) {
17109
+ if ((conf.field || conf.type) && conf.width) {
17110
+ customWidthMaps[getCustomColKey(conf)] = conf.width;
17111
+ }
17112
+ }
17113
+ });
17114
+ }
17115
+ // 计算宽度
17116
+ const colWidthMaps = {};
17117
+ const printWidthMaps = {};
17118
+ if (isPrint) {
17119
+ let tableWidth = 0;
17120
+ columns.forEach(column => {
17121
+ tableWidth += column.renderWidth;
17122
+ });
17123
+ if (colgroups) {
17071
17124
  colgroups.forEach(cols => {
17072
- tables.push(`<tr>${cols.map(column => {
17073
- const headAlign = column.headerAlign || column.align || allHeaderAlign || allAlign;
17074
- const classNames = hasEllipsis($xeTable, column, 'showHeaderOverflow', allColumnHeaderOverflow) ? ['col--ellipsis'] : [];
17075
- const cellTitle = getHeaderTitle($xeTable, opts, column);
17125
+ cols.forEach(column => {
17126
+ if (!column.childNodes || !column.childNodes.length) {
17127
+ return;
17128
+ }
17076
17129
  let childWidth = 0;
17077
17130
  let countChild = 0;
17078
17131
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], item => {
17079
17132
  if (!item.childNodes || !column.childNodes.length) {
17080
17133
  countChild++;
17081
17134
  }
17082
- childWidth += item.renderWidth;
17135
+ const ptWidth = printWidthMaps[item.id];
17136
+ childWidth += ptWidth || 0;
17083
17137
  }, {
17084
17138
  children: 'childNodes'
17085
17139
  });
17086
- const cellWidth = childWidth - countChild;
17140
+ const colWidth = childWidth - countChild;
17141
+ colWidthMaps[column.id] = colWidth;
17142
+ printWidthMaps[column.id] = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(colWidth / tableWidth * 180, 2);
17143
+ });
17144
+ });
17145
+ }
17146
+ columns.forEach(column => {
17147
+ const colWidth = column.renderWidth;
17148
+ if (column.width) {
17149
+ colWidthMaps[column.id] = colWidth;
17150
+ }
17151
+ printWidthMaps[column.id] = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(colWidth / tableWidth * 180, 2);
17152
+ });
17153
+ }
17154
+ const getHeaderWidthStyle = column => {
17155
+ const cmColKey = getCustomColKey(column);
17156
+ const cmWidthMaps = customWidthMaps[cmColKey];
17157
+ if (cmWidthMaps) {
17158
+ return 'width:' + toCssUnit(cmWidthMaps);
17159
+ }
17160
+ if (isAutoWidth) {
17161
+ return '';
17162
+ }
17163
+ if (isScaleWidth) {
17164
+ return printWidthMaps[column.id] ? 'width:' + printWidthMaps[column.id] + 'mm' : '';
17165
+ }
17166
+ return colWidthMaps[column.id] ? 'width:' + toCssUnit(colWidthMaps[column.id]) : '';
17167
+ };
17168
+ const getCellWidthStyle = column => {
17169
+ const cmColKey = getCustomColKey(column);
17170
+ const cmWidthMaps = customWidthMaps[cmColKey];
17171
+ if (cmWidthMaps) {
17172
+ return 'width:' + toCssUnit(cmWidthMaps);
17173
+ }
17174
+ if (isAutoWidth || isDefaultWidth) {
17175
+ return '';
17176
+ }
17177
+ if (isScaleWidth) {
17178
+ return printWidthMaps[column.id] ? 'width:' + printWidthMaps[column.id] + 'mm' : '';
17179
+ }
17180
+ return colWidthMaps[column.id] ? 'width:' + toCssUnit(colWidthMaps[column.id]) : '';
17181
+ };
17182
+ const allCls = 'check-all';
17183
+ 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);
17184
+ const tables = [`<table class="${clss.join(' ')}" border="0" cellspacing="0" cellpadding="0">`, `<colgroup>${columns.map(column => `<col style="${getHeaderWidthStyle(column)}">`).join('')}</colgroup>`];
17185
+ if (isHeader) {
17186
+ tables.push('<thead>');
17187
+ if (isColgroup && !original) {
17188
+ colgroups.forEach(cols => {
17189
+ tables.push(`<tr>${cols.map(column => {
17190
+ const headAlign = column.headerAlign || column.align || allHeaderAlign || allAlign;
17191
+ const classNames = hasEllipsis($xeTable, column, 'showHeaderOverflow', allColumnHeaderOverflow) ? ['col--ellipsis'] : [];
17192
+ const cellTitle = getHeaderTitle($xeTable, opts, column);
17087
17193
  if (headAlign) {
17088
17194
  classNames.push(`col--${headAlign}`);
17089
17195
  }
17090
17196
  if (column.type === 'checkbox') {
17091
- return `<th class="${classNames.join(' ')}" colspan="${column._colSpan}" rowspan="${column._rowSpan}"><div ${isPrint ? '' : `style="width: ${cellWidth}px"`}><input type="checkbox" class="${allCls}" ${isAllSelected ? 'checked' : ''}><span>${cellTitle}</span></div></th>`;
17197
+ return `<th class="${classNames.join(' ')}" colspan="${column._colSpan}" rowspan="${column._rowSpan}"><div style="${getCellWidthStyle(column)}"><input type="checkbox" class="${allCls}" ${isAllSelected ? 'checked' : ''}><span>${cellTitle}</span></div></th>`;
17092
17198
  }
17093
- return `<th class="${classNames.join(' ')}" colspan="${column._colSpan}" rowspan="${column._rowSpan}" title="${cellTitle}"><div ${isPrint ? '' : `style="width: ${cellWidth}px"`}><span>${formatText(cellTitle, true)}</span></div></th>`;
17199
+ return `<th class="${classNames.join(' ')}" colspan="${column._colSpan}" rowspan="${column._rowSpan}" title="${cellTitle}"><div style="${getCellWidthStyle(column)}"><span>${formatText(cellTitle, true)}</span></div></th>`;
17094
17200
  }).join('')}</tr>`);
17095
17201
  });
17096
17202
  } else {
@@ -17102,9 +17208,9 @@ function toHtml($xeTable, opts, columns, datas) {
17102
17208
  classNames.push(`col--${headAlign}`);
17103
17209
  }
17104
17210
  if (column.type === 'checkbox') {
17105
- return `<th class="${classNames.join(' ')}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}><input type="checkbox" class="${allCls}" ${isAllSelected ? 'checked' : ''}><span>${cellTitle}</span></div></th>`;
17211
+ return `<th class="${classNames.join(' ')}"><div style="${getCellWidthStyle(column)}"><input type="checkbox" class="${allCls}" ${isAllSelected ? 'checked' : ''}><span>${cellTitle}</span></div></th>`;
17106
17212
  }
17107
- return `<th class="${classNames.join(' ')}" title="${cellTitle}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}><span>${formatText(cellTitle, true)}</span></div></th>`;
17213
+ return `<th class="${classNames.join(' ')}" title="${cellTitle}"><div style="${getCellWidthStyle(column)}"><span>${formatText(cellTitle, true)}</span></div></th>`;
17108
17214
  }).join('')}</tr>`);
17109
17215
  }
17110
17216
  tables.push('</thead>');
@@ -17127,18 +17233,18 @@ function toHtml($xeTable, opts, columns, datas) {
17127
17233
  }
17128
17234
  classNames.push('vxe-table--tree-node');
17129
17235
  if (column.type === 'radio') {
17130
- return `<td class="${classNames.join(' ')}" title="${cellValue}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}><div class="vxe-table--tree-node-wrapper" style="padding-left: ${item._level * treeOpts.indent}px"><div class="vxe-table--tree-icon-wrapper">${treeIcon}</div><div class="vxe-table--tree-cell"><input type="radio" name="radio_${id}" ${item._radioDisabled ? 'disabled ' : ''}${getBooleanValue(cellValue) ? 'checked' : ''}><span>${item._radioLabel}</span></div></div></div></td>`;
17236
+ return `<td class="${classNames.join(' ')}" title="${cellValue}"><div style="${getCellWidthStyle(column)}"><div class="vxe-table--tree-node-wrapper" style="padding-left: ${item._level * treeOpts.indent}px"><div class="vxe-table--tree-icon-wrapper">${treeIcon}</div><div class="vxe-table--tree-cell"><input type="radio" name="radio_${id}" ${item._radioDisabled ? 'disabled ' : ''}${getBooleanValue(cellValue) ? 'checked' : ''}><span>${item._radioLabel}</span></div></div></div></td>`;
17131
17237
  } else if (column.type === 'checkbox') {
17132
- return `<td class="${classNames.join(' ')}" title="${cellValue}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}><div class="vxe-table--tree-node-wrapper" style="padding-left: ${item._level * treeOpts.indent}px"><div class="vxe-table--tree-icon-wrapper">${treeIcon}</div><div class="vxe-table--tree-cell"><input type="checkbox" ${item._checkboxDisabled ? 'disabled ' : ''}${getBooleanValue(cellValue) ? 'checked' : ''}><span>${item._checkboxLabel}</span></div></div></div></td>`;
17238
+ return `<td class="${classNames.join(' ')}" title="${cellValue}"><div style="${getCellWidthStyle(column)}"><div class="vxe-table--tree-node-wrapper" style="padding-left: ${item._level * treeOpts.indent}px"><div class="vxe-table--tree-icon-wrapper">${treeIcon}</div><div class="vxe-table--tree-cell"><input type="checkbox" ${item._checkboxDisabled ? 'disabled ' : ''}${getBooleanValue(cellValue) ? 'checked' : ''}><span>${item._checkboxLabel}</span></div></div></div></td>`;
17133
17239
  }
17134
- return `<td class="${classNames.join(' ')}" title="${cellValue}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}><div class="vxe-table--tree-node-wrapper" style="padding-left: ${item._level * treeOpts.indent}px"><div class="vxe-table--tree-icon-wrapper">${treeIcon}</div><div class="vxe-table--tree-cell">${cellValue}</div></div></div></td>`;
17240
+ return `<td class="${classNames.join(' ')}" title="${cellValue}"><div style="${getCellWidthStyle(column)}"><div class="vxe-table--tree-node-wrapper" style="padding-left: ${item._level * treeOpts.indent}px"><div class="vxe-table--tree-icon-wrapper">${treeIcon}</div><div class="vxe-table--tree-cell">${cellValue}</div></div></div></td>`;
17135
17241
  }
17136
17242
  if (column.type === 'radio') {
17137
- return `<td class="${classNames.join(' ')}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}><input type="radio" name="radio_${id}" ${item._radioDisabled ? 'disabled ' : ''}${getBooleanValue(cellValue) ? 'checked' : ''}><span>${item._radioLabel}</span></div></td>`;
17243
+ return `<td class="${classNames.join(' ')}"><div style="${getCellWidthStyle(column)}"><input type="radio" name="radio_${id}" ${item._radioDisabled ? 'disabled ' : ''}${getBooleanValue(cellValue) ? 'checked' : ''}><span>${item._radioLabel}</span></div></td>`;
17138
17244
  } else if (column.type === 'checkbox') {
17139
- return `<td class="${classNames.join(' ')}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}><input type="checkbox" ${item._checkboxDisabled ? 'disabled ' : ''}${getBooleanValue(cellValue) ? 'checked' : ''}><span>${item._checkboxLabel}</span></div></td>`;
17245
+ return `<td class="${classNames.join(' ')}"><div style="${getCellWidthStyle(column)}"><input type="checkbox" ${item._checkboxDisabled ? 'disabled ' : ''}${getBooleanValue(cellValue) ? 'checked' : ''}><span>${item._checkboxLabel}</span></div></td>`;
17140
17246
  }
17141
- return `<td class="${classNames.join(' ')}" title="${cellValue}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}>${formatText(cellValue, true)}</div></td>`;
17247
+ return `<td class="${classNames.join(' ')}" title="${cellValue}"><div style="${getCellWidthStyle(column)}">${formatText(cellValue, true)}</div></td>`;
17142
17248
  }).join('') + '</tr>');
17143
17249
  });
17144
17250
  } else {
@@ -17174,11 +17280,11 @@ function toHtml($xeTable, opts, columns, datas) {
17174
17280
  classNames.push(`col--${cellAlign}`);
17175
17281
  }
17176
17282
  if (column.type === 'radio') {
17177
- return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}><input type="radio" name="radio_${id}" ${item._radioDisabled ? 'disabled ' : ''}${getBooleanValue(cellValue) ? 'checked' : ''}><span>${item._radioLabel}</span></div></td>`;
17283
+ return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}"><div style="${getCellWidthStyle(column)}"><input type="radio" name="radio_${id}" ${item._radioDisabled ? 'disabled ' : ''}${getBooleanValue(cellValue) ? 'checked' : ''}><span>${item._radioLabel}</span></div></td>`;
17178
17284
  } else if (column.type === 'checkbox') {
17179
- return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}><input type="checkbox" ${item._checkboxDisabled ? 'disabled ' : ''}${getBooleanValue(cellValue) ? 'checked' : ''}><span>${item._checkboxLabel}</span></div></td>`;
17285
+ return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}"><div style="${getCellWidthStyle(column)}"><input type="checkbox" ${item._checkboxDisabled ? 'disabled ' : ''}${getBooleanValue(cellValue) ? 'checked' : ''}><span>${item._checkboxLabel}</span></div></td>`;
17180
17286
  }
17181
- return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}>${formatText(cellValue, true)}</div></td>`;
17287
+ return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div style="${getCellWidthStyle(column)}">${formatText(cellValue, true)}</div></td>`;
17182
17288
  }).join('') + '</tr>');
17183
17289
  });
17184
17290
  }
@@ -17221,7 +17327,7 @@ function toHtml($xeTable, opts, columns, datas) {
17221
17327
  if (footAlign) {
17222
17328
  classNames.push(`col--${footAlign}`);
17223
17329
  }
17224
- return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}>${formatText(cellValue, true)}</div></td>`;
17330
+ return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div style="${getCellWidthStyle(column)}">${formatText(cellValue, true)}</div></td>`;
17225
17331
  }).join('')}</tr>`);
17226
17332
  });
17227
17333
  tables.push('</tfoot>');
@@ -17230,7 +17336,7 @@ function toHtml($xeTable, opts, columns, datas) {
17230
17336
  // 是否半选状态
17231
17337
  const script = !isAllSelected && isIndeterminate ? `<script>(function(){var a=document.querySelector(".${allCls}");if(a){a.indeterminate=true}})()</script>` : '';
17232
17338
  tables.push('</table>', script);
17233
- return isPrint ? tables.join('') : createHtmlPage(opts, tables.join(''));
17339
+ return isAutoWidth ? tables.join('') : createHtmlPage(opts, tables.join(''));
17234
17340
  }
17235
17341
  function toXML($xeTable, opts, columns, datas) {
17236
17342
  const reactData = $xeTable;
@@ -17911,6 +18017,9 @@ function handleExportAndPrint($xeTable, options, isPrint) {
17911
18017
  if (!typeList.some(item => item.value === type)) {
17912
18018
  exportParams.type = typeList[0].value;
17913
18019
  }
18020
+ if (!exportParams.widthMode) {
18021
+ exportParams.widthMode = '';
18022
+ }
17914
18023
  initStore.export = true;
17915
18024
  return $xeTable.$nextTick();
17916
18025
  }
@@ -18074,7 +18183,8 @@ const convertToRows = originColumns => {
18074
18183
  }
18075
18184
  const handleOptions = Object.assign({}, opts, {
18076
18185
  filename: '',
18077
- sheetName: ''
18186
+ sheetName: '',
18187
+ _columnConfs: columns
18078
18188
  });
18079
18189
  // 如果设置源数据,则默认导出设置了字段的列
18080
18190
  if (!isCustomCol && !columnFilterMethod) {
@@ -22559,33 +22669,39 @@ function renderBody(h, $xeTable) {
22559
22669
  // 使用已安装的组件,如果未安装则不渲染
22560
22670
  const VxeUILoadingComponent = core_.VxeUI.getComponent('VxeLoading');
22561
22671
  const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
22672
+ const {
22673
+ showOverflow,
22674
+ showHeaderOverflow,
22675
+ showFooterOverflow
22676
+ } = props;
22677
+ const tooltipOpts = $xeTable.computeTooltipOpts;
22678
+ const headerTooltipOpts = $xeTable.computeHeaderTooltipOpts;
22679
+ const footerTooltipOpts = $xeTable.computeFooterTooltipOpts;
22562
22680
  if (props.loading) {
22563
22681
  if (!VxeUILoadingComponent && !this.$scopedSlots.loading) {
22564
- table_errLog('vxe.error.errProp', ['loading=true', 'loading=false | <template #loading>...</template>']);
22565
22682
  table_errLog('vxe.error.reqComp', ['vxe-loading']);
22683
+ table_errLog('vxe.error.errProp', ['loading=true', 'loading=false | <template #loading>...</template>']);
22566
22684
  }
22567
22685
  }
22568
- if (props.showOverflow === true || props.showOverflow === 'tooltip' || props.showHeaderOverflow === true || props.showHeaderOverflow === 'tooltip' || props.showFooterOverflow === true || props.showFooterOverflow === 'tooltip') {
22569
- if (!VxeUITooltipComponent) {
22570
- if (props.showOverflow === true) {
22571
- table_errLog('vxe.error.errProp', ['show-overflow=true', 'show-overflow=title']);
22572
- }
22573
- if (props.showOverflow === 'tooltip') {
22574
- table_errLog('vxe.error.errProp', ['show-overflow=tooltip', 'show-overflow=title']);
22575
- }
22576
- if (props.showHeaderOverflow === true) {
22577
- table_errLog('vxe.error.errProp', ['show-header-overflow=true', 'show-header-overflow=title']);
22578
- }
22579
- if (props.showHeaderOverflow === 'tooltip') {
22580
- table_errLog('vxe.error.errProp', ['show-header-overflow=tooltip', 'show-header-overflow=title']);
22581
- }
22582
- if (props.showFooterOverflow === true) {
22583
- table_errLog('vxe.error.errProp', ['show-footer-overflow=true', 'show-footer-overflow=title']);
22584
- }
22585
- if (props.showFooterOverflow === 'tooltip') {
22586
- table_errLog('vxe.error.errProp', ['show-footer-overflow=tooltip', 'show-footer-overflow=title']);
22587
- }
22588
- table_errLog('vxe.error.reqComp', ['vxe-tooltip']);
22686
+ if (!VxeUITooltipComponent) {
22687
+ table_errLog('vxe.error.reqComp', ['vxe-tooltip']);
22688
+ if (showOverflow === 'tooltip') {
22689
+ table_errLog('vxe.error.errProp', ['show-overflow=' + showOverflow, 'show-overflow=false,title,ellipsis']);
22690
+ }
22691
+ if (showOverflow === true && tooltipOpts.mode === 'tooltip') {
22692
+ table_errLog('vxe.error.notSupportProp', ['show-overflow=' + showOverflow, 'tooltip-config.mode=tooltip', 'tooltip-config.mode=title,ellipsis']);
22693
+ }
22694
+ if (showHeaderOverflow === 'tooltip') {
22695
+ table_errLog('vxe.error.errProp', ['show-header-overflow=' + showHeaderOverflow, 'show-header-overflow=false,title,ellipsis']);
22696
+ }
22697
+ if (showHeaderOverflow === true && headerTooltipOpts.mode === 'tooltip') {
22698
+ table_errLog('vxe.error.notSupportProp', ['show-header-overflow=' + showHeaderOverflow, 'header-tooltip-config.mode=tooltip', 'header-tooltip-config.mode=title,ellipsis']);
22699
+ }
22700
+ if (showFooterOverflow === 'tooltip') {
22701
+ table_errLog('vxe.error.errProp', ['show-footer-overflow=' + showFooterOverflow, 'show-footer-overflow=false,title,ellipsis']);
22702
+ }
22703
+ if (showFooterOverflow === true && footerTooltipOpts.mode === 'tooltip') {
22704
+ table_errLog('vxe.error.notSupportProp', ['show-footer-overflow=' + showFooterOverflow, 'footer-tooltip-config.mode=tooltip', 'footer-tooltip-config.mode=title,ellipsis']);
22589
22705
  }
22590
22706
  }
22591
22707
  if (this.autoResize) {
@@ -28321,6 +28437,13 @@ const Toolbar = VxeToolbar;
28321
28437
  expMode: '选择数据',
28322
28438
  expCurrentColumn: '全部字段',
28323
28439
  expColumn: '选择字段',
28440
+ widthMode: '列宽方式',
28441
+ wModeTitle: '设置打印时列宽的渲染方式',
28442
+ wdModes: {
28443
+ default: '默认',
28444
+ auto: '自适应(根据内容自适应列宽)',
28445
+ scale: '等比例(根据页面比例渲染列宽)'
28446
+ },
28324
28447
  expOpts: '参数设置',
28325
28448
  expOptHeader: '表头',
28326
28449
  expHeaderTitle: '是否需要表头',