vxe-table 4.20.2 → 4.20.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 (162) hide show
  1. package/dist/all.esm.js +208 -105
  2. package/dist/style.css +1 -1
  3. package/es/locale/lang/ar-EG.js +7 -0
  4. package/es/locale/lang/de-DE.js +7 -0
  5. package/es/locale/lang/en-US.js +7 -0
  6. package/es/locale/lang/es-ES.js +7 -0
  7. package/es/locale/lang/fr-FR.js +7 -0
  8. package/es/locale/lang/hu-HU.js +7 -0
  9. package/es/locale/lang/hy-AM.js +7 -0
  10. package/es/locale/lang/id-ID.js +7 -0
  11. package/es/locale/lang/it-IT.js +7 -0
  12. package/es/locale/lang/ja-JP.js +7 -0
  13. package/es/locale/lang/ko-KR.js +7 -0
  14. package/es/locale/lang/ms-MY.js +7 -0
  15. package/es/locale/lang/nb-NO.js +7 -0
  16. package/es/locale/lang/pt-BR.js +7 -0
  17. package/es/locale/lang/ru-RU.js +7 -0
  18. package/es/locale/lang/th-TH.js +7 -0
  19. package/es/locale/lang/ug-CN.js +7 -0
  20. package/es/locale/lang/uk-UA.js +7 -0
  21. package/es/locale/lang/uz-UZ.js +7 -0
  22. package/es/locale/lang/vi-VN.js +7 -0
  23. package/es/locale/lang/zh-CHT.js +7 -0
  24. package/es/locale/lang/zh-CN.js +7 -0
  25. package/es/style.css +1 -1
  26. package/es/table/module/export/export-panel.js +61 -47
  27. package/es/table/module/export/hook.js +105 -27
  28. package/es/table/module/export/util.js +1 -1
  29. package/es/table/src/body.js +1 -1
  30. package/es/table/src/footer.js +1 -1
  31. package/es/table/src/header.js +5 -3
  32. package/es/table/src/table.js +24 -24
  33. package/es/table/src/util.js +1 -0
  34. package/es/ui/index.js +2 -1
  35. package/es/ui/src/log.js +1 -1
  36. package/lib/index.umd.js +158 -49
  37. package/lib/index.umd.min.js +1 -1
  38. package/lib/locale/lang/ar-EG.js +7 -0
  39. package/lib/locale/lang/ar-EG.min.js +1 -1
  40. package/lib/locale/lang/ar-EG.umd.js +7 -0
  41. package/lib/locale/lang/de-DE.js +7 -0
  42. package/lib/locale/lang/de-DE.min.js +1 -1
  43. package/lib/locale/lang/de-DE.umd.js +7 -0
  44. package/lib/locale/lang/en-US.js +7 -0
  45. package/lib/locale/lang/en-US.min.js +1 -1
  46. package/lib/locale/lang/en-US.umd.js +7 -0
  47. package/lib/locale/lang/es-ES.js +7 -0
  48. package/lib/locale/lang/es-ES.min.js +1 -1
  49. package/lib/locale/lang/es-ES.umd.js +7 -0
  50. package/lib/locale/lang/fr-FR.js +7 -0
  51. package/lib/locale/lang/fr-FR.min.js +1 -1
  52. package/lib/locale/lang/fr-FR.umd.js +7 -0
  53. package/lib/locale/lang/hu-HU.js +7 -0
  54. package/lib/locale/lang/hu-HU.min.js +1 -1
  55. package/lib/locale/lang/hu-HU.umd.js +7 -0
  56. package/lib/locale/lang/hy-AM.js +7 -0
  57. package/lib/locale/lang/hy-AM.min.js +1 -1
  58. package/lib/locale/lang/hy-AM.umd.js +7 -0
  59. package/lib/locale/lang/id-ID.js +7 -0
  60. package/lib/locale/lang/id-ID.min.js +1 -1
  61. package/lib/locale/lang/id-ID.umd.js +7 -0
  62. package/lib/locale/lang/it-IT.js +7 -0
  63. package/lib/locale/lang/it-IT.min.js +1 -1
  64. package/lib/locale/lang/it-IT.umd.js +7 -0
  65. package/lib/locale/lang/ja-JP.js +7 -0
  66. package/lib/locale/lang/ja-JP.min.js +1 -1
  67. package/lib/locale/lang/ja-JP.umd.js +7 -0
  68. package/lib/locale/lang/ko-KR.js +7 -0
  69. package/lib/locale/lang/ko-KR.min.js +1 -1
  70. package/lib/locale/lang/ko-KR.umd.js +7 -0
  71. package/lib/locale/lang/ms-MY.js +7 -0
  72. package/lib/locale/lang/ms-MY.min.js +1 -1
  73. package/lib/locale/lang/ms-MY.umd.js +7 -0
  74. package/lib/locale/lang/nb-NO.js +7 -0
  75. package/lib/locale/lang/nb-NO.min.js +1 -1
  76. package/lib/locale/lang/nb-NO.umd.js +7 -0
  77. package/lib/locale/lang/pt-BR.js +7 -0
  78. package/lib/locale/lang/pt-BR.min.js +1 -1
  79. package/lib/locale/lang/pt-BR.umd.js +7 -0
  80. package/lib/locale/lang/ru-RU.js +7 -0
  81. package/lib/locale/lang/ru-RU.min.js +1 -1
  82. package/lib/locale/lang/ru-RU.umd.js +7 -0
  83. package/lib/locale/lang/th-TH.js +7 -0
  84. package/lib/locale/lang/th-TH.min.js +1 -1
  85. package/lib/locale/lang/th-TH.umd.js +7 -0
  86. package/lib/locale/lang/ug-CN.js +7 -0
  87. package/lib/locale/lang/ug-CN.min.js +1 -1
  88. package/lib/locale/lang/ug-CN.umd.js +7 -0
  89. package/lib/locale/lang/uk-UA.js +7 -0
  90. package/lib/locale/lang/uk-UA.min.js +1 -1
  91. package/lib/locale/lang/uk-UA.umd.js +7 -0
  92. package/lib/locale/lang/uz-UZ.js +7 -0
  93. package/lib/locale/lang/uz-UZ.min.js +1 -1
  94. package/lib/locale/lang/uz-UZ.umd.js +7 -0
  95. package/lib/locale/lang/vi-VN.js +7 -0
  96. package/lib/locale/lang/vi-VN.min.js +1 -1
  97. package/lib/locale/lang/vi-VN.umd.js +7 -0
  98. package/lib/locale/lang/zh-CHT.js +7 -0
  99. package/lib/locale/lang/zh-CHT.min.js +1 -1
  100. package/lib/locale/lang/zh-CHT.umd.js +7 -0
  101. package/lib/locale/lang/zh-CN.js +7 -0
  102. package/lib/locale/lang/zh-CN.min.js +1 -1
  103. package/lib/locale/lang/zh-CN.umd.js +7 -0
  104. package/lib/style.css +1 -1
  105. package/lib/table/module/export/export-panel.js +32 -13
  106. package/lib/table/module/export/export-panel.min.js +1 -1
  107. package/lib/table/module/export/hook.js +105 -27
  108. package/lib/table/module/export/hook.min.js +1 -1
  109. package/lib/table/module/export/util.js +1 -1
  110. package/lib/table/module/export/util.min.js +1 -1
  111. package/lib/table/src/body.js +1 -1
  112. package/lib/table/src/body.min.js +1 -1
  113. package/lib/table/src/footer.js +1 -1
  114. package/lib/table/src/footer.min.js +1 -1
  115. package/lib/table/src/header.js +6 -3
  116. package/lib/table/src/header.min.js +1 -1
  117. package/lib/table/src/table.js +1 -1
  118. package/lib/table/src/table.min.js +1 -1
  119. package/lib/table/src/util.js +1 -0
  120. package/lib/table/src/util.min.js +1 -1
  121. package/lib/ui/index.js +2 -1
  122. package/lib/ui/index.min.js +1 -1
  123. package/lib/ui/src/log.js +1 -1
  124. package/lib/ui/src/log.min.js +1 -1
  125. package/package.json +2 -2
  126. package/packages/locale/lang/ar-EG.ts +7 -0
  127. package/packages/locale/lang/de-DE.ts +7 -0
  128. package/packages/locale/lang/en-US.ts +7 -0
  129. package/packages/locale/lang/es-ES.ts +7 -0
  130. package/packages/locale/lang/fr-FR.ts +7 -0
  131. package/packages/locale/lang/hu-HU.ts +7 -0
  132. package/packages/locale/lang/hy-AM.ts +7 -0
  133. package/packages/locale/lang/id-ID.ts +7 -0
  134. package/packages/locale/lang/it-IT.ts +7 -0
  135. package/packages/locale/lang/ja-JP.ts +7 -0
  136. package/packages/locale/lang/ko-KR.ts +7 -0
  137. package/packages/locale/lang/ms-MY.ts +7 -0
  138. package/packages/locale/lang/nb-NO.ts +7 -0
  139. package/packages/locale/lang/pt-BR.ts +7 -0
  140. package/packages/locale/lang/ru-RU.ts +7 -0
  141. package/packages/locale/lang/th-TH.ts +7 -0
  142. package/packages/locale/lang/ug-CN.ts +7 -0
  143. package/packages/locale/lang/uk-UA.ts +7 -0
  144. package/packages/locale/lang/uz-UZ.ts +7 -0
  145. package/packages/locale/lang/vi-VN.ts +7 -0
  146. package/packages/locale/lang/zh-CHT.ts +7 -0
  147. package/packages/locale/lang/zh-CN.ts +7 -0
  148. package/packages/table/module/export/export-panel.ts +120 -105
  149. package/packages/table/module/export/hook.ts +112 -28
  150. package/packages/table/module/export/util.ts +1 -1
  151. package/packages/table/src/body.ts +1 -1
  152. package/packages/table/src/footer.ts +1 -1
  153. package/packages/table/src/header.ts +5 -3
  154. package/packages/table/src/table.ts +24 -24
  155. package/packages/table/src/util.ts +1 -0
  156. package/packages/ui/index.ts +1 -0
  157. /package/es/{iconfont.1784122393131.ttf → iconfont.1784251273954.ttf} +0 -0
  158. /package/es/{iconfont.1784122393131.woff → iconfont.1784251273954.woff} +0 -0
  159. /package/es/{iconfont.1784122393131.woff2 → iconfont.1784251273954.woff2} +0 -0
  160. /package/lib/{iconfont.1784122393131.ttf → iconfont.1784251273954.ttf} +0 -0
  161. /package/lib/{iconfont.1784122393131.woff → iconfont.1784251273954.woff} +0 -0
  162. /package/lib/{iconfont.1784122393131.woff2 → iconfont.1784251273954.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -3314,7 +3314,7 @@ function getDefaultConfig(val1, def1) {
3314
3314
  /* unused harmony import specifier */ var VxeUI;
3315
3315
 
3316
3316
 
3317
- const version = "4.20.2";
3317
+ const version = "4.20.3";
3318
3318
  core_.VxeUI.version = version;
3319
3319
  core_.VxeUI.tableVersion = version;
3320
3320
  core_.VxeUI.setConfig({
@@ -3380,6 +3380,7 @@ core_.VxeUI.setConfig({
3380
3380
  strict: true
3381
3381
  },
3382
3382
  tooltipConfig: {
3383
+ mode: 'tooltip',
3383
3384
  enterable: true,
3384
3385
  defaultPlacement: 'top'
3385
3386
  },
@@ -4113,7 +4114,7 @@ function wheelScrollTopTo(diffNum, cb) {
4113
4114
  const {
4114
4115
  log: log_log
4115
4116
  } = core_.VxeUI;
4116
- const tableVersion = `table v${"4.20.2"}`;
4117
+ const tableVersion = `table v${"4.20.3"}`;
4117
4118
  function createComponentLog(name) {
4118
4119
  const uiVersion = core_.VxeUI.uiVersion ? `ui v${core_.VxeUI.uiVersion}` : '';
4119
4120
  const ganttVersion = core_.VxeUI.ganttVersion ? `gantt v${core_.VxeUI.ganttVersion}` : '';
@@ -4753,6 +4754,7 @@ function createReactData() {
4753
4754
  mergeBodyFlag: 1,
4754
4755
  mergeFootFlag: 1,
4755
4756
  rowHeightStore: {
4757
+ xlarge: 54,
4756
4758
  large: 52,
4757
4759
  default: 48,
4758
4760
  medium: 44,
@@ -8140,7 +8142,7 @@ const renderType = 'body';
8140
8142
  const cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(showOverflow) ? allShowOverflow : showOverflow;
8141
8143
  const showEllipsis = cellOverflow === 'ellipsis';
8142
8144
  const showTitle = cellOverflow === 'title';
8143
- const showTooltip = cellOverflow === true || cellOverflow === 'tooltip';
8145
+ const showTooltip = cellOverflow === true ? tooltipOpts.mode === 'tooltip' : cellOverflow === 'tooltip';
8144
8146
  const hasEllipsis = isAllOverflow || showTitle || showTooltip || showEllipsis;
8145
8147
  const showResizable = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable;
8146
8148
  const isCsHeight = !!customCellHeight;
@@ -8944,7 +8946,8 @@ const header_renderType = 'header';
8944
8946
  computeDefaultRowHeight,
8945
8947
  computeVirtualXOpts,
8946
8948
  computeFloatingFilterOpts,
8947
- computeIsHeaderRenderOptimize
8949
+ computeIsHeaderRenderOptimize,
8950
+ computeHeaderTooltipOpts
8948
8951
  } = $xeTable.getComputeMaps();
8949
8952
  const headerColumn = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)([]);
8950
8953
  const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
@@ -9018,6 +9021,7 @@ const header_renderType = 'header';
9018
9021
  const virtualXOpts = computeVirtualXOpts.value;
9019
9022
  const columnOpts = computeColumnOpts.value;
9020
9023
  const columnDragOpts = computeColumnDragOpts.value;
9024
+ const headerTooltipOpts = computeHeaderTooltipOpts.value;
9021
9025
  const cellOpts = computeCellOpts.value;
9022
9026
  const defaultRowHeight = computeDefaultRowHeight.value;
9023
9027
  const headerCellOpts = computeHeaderCellOpts.value;
@@ -9050,7 +9054,7 @@ const header_renderType = 'header';
9050
9054
  const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
9051
9055
  const showEllipsis = headOverflow === 'ellipsis';
9052
9056
  const showTitle = headOverflow === 'title';
9053
- const showTooltip = headOverflow === true || headOverflow === 'tooltip';
9057
+ const showTooltip = headOverflow === true ? headerTooltipOpts.mode === 'tooltip' : headOverflow === 'tooltip';
9054
9058
  const hasEllipsis = showTitle || showTooltip || showEllipsis;
9055
9059
  let hasFilter = false;
9056
9060
  let firstFilterOption = null;
@@ -9217,6 +9221,7 @@ const header_renderType = 'header';
9217
9221
  const {
9218
9222
  fullColumnIdData
9219
9223
  } = tableInternalData;
9224
+ const headerTooltipOpts = computeHeaderTooltipOpts.value;
9220
9225
  const cellOpts = computeCellOpts.value;
9221
9226
  const defaultRowHeight = computeDefaultRowHeight.value;
9222
9227
  const headerCellOpts = computeHeaderCellOpts.value;
@@ -9251,7 +9256,7 @@ const header_renderType = 'header';
9251
9256
  const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
9252
9257
  const showEllipsis = headOverflow === 'ellipsis';
9253
9258
  const showTitle = headOverflow === 'title';
9254
- const showTooltip = headOverflow === true || headOverflow === 'tooltip';
9259
+ const showTooltip = headOverflow === true ? headerTooltipOpts.mode === 'tooltip' : headOverflow === 'tooltip';
9255
9260
  const hasEllipsis = showTitle || showTooltip || showEllipsis;
9256
9261
  let hasFilter = false;
9257
9262
  let firstFilterOption = null;
@@ -9635,7 +9640,7 @@ const footer_renderType = 'footer';
9635
9640
  const footAlign = footerAlign || (compConf ? compConf.tableFooterCellAlign : '') || allFooterAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
9636
9641
  const showEllipsis = footOverflow === 'ellipsis';
9637
9642
  const showTitle = footOverflow === 'title';
9638
- const showTooltip = footOverflow === true || footOverflow === 'tooltip';
9643
+ const showTooltip = footOverflow === true ? footerTooltipOpts.mode === 'tooltip' : footOverflow === 'tooltip';
9639
9644
  const hasEllipsis = showTitle || showTooltip || showEllipsis;
9640
9645
  const showResizable = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable;
9641
9646
  const attrs = {
@@ -12137,6 +12142,18 @@ const {
12137
12142
  const xButtonConfirm = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
12138
12143
  const xInputFilename = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
12139
12144
  const xInputSheetname = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
12145
+ const computeColWidthModeOptions = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
12146
+ return [{
12147
+ value: '',
12148
+ label: export_panel_getI18n('vxe.export.wdModes.default')
12149
+ }, {
12150
+ value: 'auto',
12151
+ label: export_panel_getI18n('vxe.export.wdModes.auto')
12152
+ }, {
12153
+ value: 'scale',
12154
+ label: export_panel_getI18n('vxe.export.wdModes.scale')
12155
+ }];
12156
+ });
12140
12157
  const computeCheckedAll = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
12141
12158
  const {
12142
12159
  storeData
@@ -12310,6 +12327,7 @@ const {
12310
12327
  const showSheet = computeShowSheet.value;
12311
12328
  const supportMerge = computeSupportMerge.value;
12312
12329
  const supportStyle = computeSupportStyle.value;
12330
+ const colWidthModeOptions = computeColWidthModeOptions.value;
12313
12331
  // const supportGroup = computeSupportGroup.value
12314
12332
  const slots = defaultOptions.slots || {};
12315
12333
  const topSlot = slots.top;
@@ -12442,11 +12460,17 @@ const {
12442
12460
  class: 'vxe-checkbox--label'
12443
12461
  }, export_panel_getI18n('vxe.export.expCurrentColumn'))])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('ul', {
12444
12462
  class: 'vxe-table-export--panel-column-body'
12445
- }, colVNs)])])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tr', [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', export_panel_getI18n('vxe.export.expOpts')), parameterSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
12463
+ }, colVNs)])])]), isPrint ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tr', [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', export_panel_getI18n('vxe.export.widthMode')), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', [VxeUISelectComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUISelectComponent, {
12464
+ modelValue: defaultOptions.widthMode,
12465
+ options: colWidthModeOptions,
12466
+ 'onUpdate:modelValue'(value) {
12467
+ defaultOptions.widthMode = value;
12468
+ }
12469
+ }) : export_panel_renderEmptyElement($xeTable)])]) : export_panel_renderEmptyElement($xeTable), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tr', [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', export_panel_getI18n('vxe.export.expOpts')), parameterSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
12446
12470
  class: 'vxe-table-export--panel-option-row'
12447
12471
  }, $xeTable.callSlot(parameterSlot, params))]) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
12448
12472
  class: 'vxe-table-export--panel-option-row'
12449
- }, [VxeUICheckboxComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUICheckboxComponent, {
12473
+ }, VxeUICheckboxComponent ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUICheckboxComponent, {
12450
12474
  modelValue: hasEmptyData || isHeader,
12451
12475
  disabled: hasEmptyData,
12452
12476
  title: export_panel_getI18n('vxe.export.expHeaderTitle'),
@@ -12454,7 +12478,7 @@ const {
12454
12478
  'onUpdate:modelValue'(value) {
12455
12479
  defaultOptions.isHeader = value;
12456
12480
  }
12457
- }) : export_panel_renderEmptyElement($xeTable), VxeUICheckboxComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUICheckboxComponent, {
12481
+ }), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUICheckboxComponent, {
12458
12482
  modelValue: defaultOptions.isFooter,
12459
12483
  disabled: !storeData.hasFooter,
12460
12484
  title: export_panel_getI18n('vxe.export.expFooterTitle'),
@@ -12462,7 +12486,7 @@ const {
12462
12486
  'onUpdate:modelValue'(value) {
12463
12487
  defaultOptions.isFooter = value;
12464
12488
  }
12465
- }) : export_panel_renderEmptyElement($xeTable), VxeUICheckboxComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUICheckboxComponent, {
12489
+ }), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUICheckboxComponent, {
12466
12490
  modelValue: isHeader ? defaultOptions.isTitle : false,
12467
12491
  disabled: !isHeader,
12468
12492
  title: export_panel_getI18n('vxe.export.expTitleTitle'),
@@ -12470,7 +12494,7 @@ const {
12470
12494
  'onUpdate:modelValue'(value) {
12471
12495
  defaultOptions.isTitle = value;
12472
12496
  }
12473
- }) : export_panel_renderEmptyElement($xeTable), VxeUICheckboxComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUICheckboxComponent, {
12497
+ }), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUICheckboxComponent, {
12474
12498
  modelValue: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
12475
12499
  title: export_panel_getI18n('vxe.export.expColgroupTitle'),
12476
12500
  disabled: !isHeader || !hasColgroup || !supportMerge,
@@ -12478,9 +12502,9 @@ const {
12478
12502
  'onUpdate:modelValue'(value) {
12479
12503
  defaultOptions.isColgroup = value;
12480
12504
  }
12481
- }) : export_panel_renderEmptyElement($xeTable)]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
12505
+ })] : []), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
12482
12506
  class: 'vxe-table-export--panel-option-row'
12483
- }, [VxeUICheckboxComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUICheckboxComponent, {
12507
+ }, VxeUICheckboxComponent ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUICheckboxComponent, {
12484
12508
  modelValue: hasEmptyData ? false : defaultOptions.original,
12485
12509
  disabled: hasEmptyData,
12486
12510
  title: export_panel_getI18n('vxe.export.expOriginalTitle'),
@@ -12488,7 +12512,7 @@ const {
12488
12512
  'onUpdate:modelValue'(value) {
12489
12513
  defaultOptions.original = value;
12490
12514
  }
12491
- }) : export_panel_renderEmptyElement($xeTable), VxeUICheckboxComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUICheckboxComponent, {
12515
+ }), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUICheckboxComponent, {
12492
12516
  modelValue: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
12493
12517
  title: export_panel_getI18n('vxe.export.expMergeTitle'),
12494
12518
  disabled: hasEmptyData || !hasMerge || !supportMerge || !checkedAll,
@@ -12496,7 +12520,7 @@ const {
12496
12520
  'onUpdate:modelValue'(value) {
12497
12521
  defaultOptions.isMerge = value;
12498
12522
  }
12499
- }) : export_panel_renderEmptyElement($xeTable), isPrint || !VxeUICheckboxComponent ? export_panel_renderEmptyElement($xeTable) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUICheckboxComponent, {
12523
+ }), isPrint ? export_panel_renderEmptyElement($xeTable) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUICheckboxComponent, {
12500
12524
  modelValue: supportStyle ? defaultOptions.useStyle : false,
12501
12525
  disabled: !supportStyle,
12502
12526
  title: export_panel_getI18n('vxe.export.expUseStyleTitle'),
@@ -12504,9 +12528,9 @@ const {
12504
12528
  'onUpdate:modelValue'(value) {
12505
12529
  defaultOptions.useStyle = value;
12506
12530
  }
12507
- })]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
12531
+ })] : []), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
12508
12532
  class: 'vxe-table-export--panel-option-row'
12509
- }, [VxeUICheckboxComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUICheckboxComponent, {
12533
+ }, VxeUICheckboxComponent ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUICheckboxComponent, {
12510
12534
  modelValue: hasTree ? defaultOptions.isTreeAllExpanded : false,
12511
12535
  disabled: hasEmptyData || !hasTree,
12512
12536
  title: export_panel_getI18n('vxe.export.expTreeAllExpandTitle'),
@@ -12514,7 +12538,7 @@ const {
12514
12538
  'onUpdate:modelValue'(value) {
12515
12539
  defaultOptions.isTreeAllExpanded = value;
12516
12540
  }
12517
- }) : export_panel_renderEmptyElement($xeTable), VxeUICheckboxComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUICheckboxComponent, {
12541
+ }), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUICheckboxComponent, {
12518
12542
  modelValue: hasRowGroup ? defaultOptions.isRowGroupAllExpanded : false,
12519
12543
  disabled: hasEmptyData || !hasRowGroup,
12520
12544
  title: export_panel_getI18n('vxe.export.expRowGroupAllExpandTitle'),
@@ -12522,7 +12546,7 @@ const {
12522
12546
  'onUpdate:modelValue'(value) {
12523
12547
  defaultOptions.isRowGroupAllExpanded = value;
12524
12548
  }
12525
- }) : export_panel_renderEmptyElement($xeTable)])])])]])])]), bottomSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
12549
+ })] : [])])])]])])]), bottomSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
12526
12550
  class: 'vxe-table-export--panel-bottom'
12527
12551
  }, $xeTable.callSlot(bottomSlot, params)) : export_panel_renderEmptyElement($xeTable)]);
12528
12552
  },
@@ -15115,7 +15139,7 @@ edit_hook_hooks.add('tableEditModule', {
15115
15139
  });
15116
15140
  ;// ./packages/table/module/export/util.ts
15117
15141
  // 默认导出或打印的 HTML 样式
15118
- 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}';
15142
+ 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}';
15119
15143
  function getExportBlobByContent(content, options) {
15120
15144
  return new Blob([content], {
15121
15145
  type: `text/${options.type};charset=utf-8;`
@@ -15929,6 +15953,9 @@ export_hook_hooks.add('tableExportModule', {
15929
15953
  }
15930
15954
  return isEllipsis;
15931
15955
  };
15956
+ const getCustomColKey = conf => {
15957
+ return `${conf.field || ''}:${conf.type || ''}`;
15958
+ };
15932
15959
  const toHtml = (opts, columns, datas) => {
15933
15960
  const {
15934
15961
  id,
@@ -15951,42 +15978,113 @@ export_hook_hooks.add('tableExportModule', {
15951
15978
  const treeOpts = computeTreeOpts.value;
15952
15979
  const {
15953
15980
  print: isPrint,
15981
+ widthMode,
15954
15982
  isHeader,
15955
15983
  isFooter,
15956
15984
  isColgroup,
15957
15985
  isMerge,
15958
15986
  colgroups,
15987
+ _columnConfs,
15959
15988
  original
15960
15989
  } = opts;
15961
- const allCls = 'check-all';
15962
- const clss = ['vxe-table', `border--${toTableBorder(border)}`, isPrint ? 'is--print' : '', isHeader ? 'is--header' : ''].filter(cls => cls);
15963
- const tables = [`<table class="${clss.join(' ')}" border="0" cellspacing="0" cellpadding="0">`, `<colgroup>${columns.map(column => `<col style="width:${column.renderWidth}px">`).join('')}</colgroup>`];
15964
- if (isHeader) {
15965
- tables.push('<thead>');
15966
- if (isColgroup && !original) {
15990
+ const isAutoWidth = widthMode === 'auto';
15991
+ const isScaleWidth = widthMode === 'scale';
15992
+ const isDefaultWidth = !isAutoWidth && !isScaleWidth;
15993
+ const customWidthMaps = {};
15994
+ if (_columnConfs) {
15995
+ _columnConfs.forEach(conf => {
15996
+ if (!isColumnInfo(conf)) {
15997
+ if ((conf.field || conf.type) && conf.width) {
15998
+ customWidthMaps[getCustomColKey(conf)] = conf.width;
15999
+ }
16000
+ }
16001
+ });
16002
+ }
16003
+ // 计算宽度
16004
+ const colWidthMaps = {};
16005
+ const printWidthMaps = {};
16006
+ if (isPrint) {
16007
+ let tableWidth = 0;
16008
+ columns.forEach(column => {
16009
+ tableWidth += column.renderWidth;
16010
+ });
16011
+ if (colgroups) {
15967
16012
  colgroups.forEach(cols => {
15968
- tables.push(`<tr>${cols.map(column => {
15969
- const headAlign = column.headerAlign || column.align || allHeaderAlign || allAlign;
15970
- const classNames = hasEllipsis(column, 'showHeaderOverflow', allColumnHeaderOverflow) ? ['col--ellipsis'] : [];
15971
- const cellTitle = getHeaderTitle(opts, column);
16013
+ cols.forEach(column => {
16014
+ if (!column.childNodes || !column.childNodes.length) {
16015
+ return;
16016
+ }
15972
16017
  let childWidth = 0;
15973
16018
  let countChild = 0;
15974
16019
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], item => {
15975
16020
  if (!item.childNodes || !column.childNodes.length) {
15976
16021
  countChild++;
15977
16022
  }
15978
- childWidth += item.renderWidth;
16023
+ const ptWidth = printWidthMaps[item.id];
16024
+ childWidth += ptWidth || 0;
15979
16025
  }, {
15980
16026
  children: 'childNodes'
15981
16027
  });
15982
- const cellWidth = childWidth - countChild;
16028
+ const colWidth = childWidth - countChild;
16029
+ colWidthMaps[column.id] = colWidth;
16030
+ printWidthMaps[column.id] = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(colWidth / tableWidth * 180, 2);
16031
+ });
16032
+ });
16033
+ }
16034
+ columns.forEach(column => {
16035
+ const colWidth = column.renderWidth;
16036
+ if (column.width) {
16037
+ colWidthMaps[column.id] = colWidth;
16038
+ }
16039
+ printWidthMaps[column.id] = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(colWidth / tableWidth * 180, 2);
16040
+ });
16041
+ }
16042
+ const getHeaderWidthStyle = column => {
16043
+ const cmColKey = getCustomColKey(column);
16044
+ const cmWidthMaps = customWidthMaps[cmColKey];
16045
+ if (cmWidthMaps) {
16046
+ return 'width:' + toCssUnit(cmWidthMaps);
16047
+ }
16048
+ if (isAutoWidth) {
16049
+ return '';
16050
+ }
16051
+ if (isScaleWidth) {
16052
+ return printWidthMaps[column.id] ? 'width:' + printWidthMaps[column.id] + 'mm' : '';
16053
+ }
16054
+ return colWidthMaps[column.id] ? 'width:' + toCssUnit(colWidthMaps[column.id]) : '';
16055
+ };
16056
+ const getCellWidthStyle = column => {
16057
+ const cmColKey = getCustomColKey(column);
16058
+ const cmWidthMaps = customWidthMaps[cmColKey];
16059
+ if (cmWidthMaps) {
16060
+ return 'width:' + toCssUnit(cmWidthMaps);
16061
+ }
16062
+ if (isAutoWidth || isDefaultWidth) {
16063
+ return '';
16064
+ }
16065
+ if (isScaleWidth) {
16066
+ return printWidthMaps[column.id] ? 'width:' + printWidthMaps[column.id] + 'mm' : '';
16067
+ }
16068
+ return colWidthMaps[column.id] ? 'width:' + toCssUnit(colWidthMaps[column.id]) : '';
16069
+ };
16070
+ const allCls = 'check-all';
16071
+ 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);
16072
+ const tables = [`<table class="${clss.join(' ')}" border="0" cellspacing="0" cellpadding="0">`, `<colgroup>${columns.map(column => `<col style="${getHeaderWidthStyle(column)}">`).join('')}</colgroup>`];
16073
+ if (isHeader) {
16074
+ tables.push('<thead>');
16075
+ if (isColgroup && !original) {
16076
+ colgroups.forEach(cols => {
16077
+ tables.push(`<tr>${cols.map(column => {
16078
+ const headAlign = column.headerAlign || column.align || allHeaderAlign || allAlign;
16079
+ const classNames = hasEllipsis(column, 'showHeaderOverflow', allColumnHeaderOverflow) ? ['col--ellipsis'] : [];
16080
+ const cellTitle = getHeaderTitle(opts, column);
15983
16081
  if (headAlign) {
15984
16082
  classNames.push(`col--${headAlign}`);
15985
16083
  }
15986
16084
  if (column.type === 'checkbox') {
15987
- 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>`;
16085
+ 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>`;
15988
16086
  }
15989
- 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>`;
16087
+ return `<th class="${classNames.join(' ')}" colspan="${column._colSpan}" rowspan="${column._rowSpan}" title="${cellTitle}"><div style="${getCellWidthStyle(column)}"><span>${formatText(cellTitle, true)}</span></div></th>`;
15990
16088
  }).join('')}</tr>`);
15991
16089
  });
15992
16090
  } else {
@@ -15998,9 +16096,9 @@ export_hook_hooks.add('tableExportModule', {
15998
16096
  classNames.push(`col--${headAlign}`);
15999
16097
  }
16000
16098
  if (column.type === 'checkbox') {
16001
- return `<th class="${classNames.join(' ')}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}><input type="checkbox" class="${allCls}" ${isAllSelected ? 'checked' : ''}><span>${cellTitle}</span></div></th>`;
16099
+ return `<th class="${classNames.join(' ')}"><div style="${getCellWidthStyle(column)}"><input type="checkbox" class="${allCls}" ${isAllSelected ? 'checked' : ''}><span>${cellTitle}</span></div></th>`;
16002
16100
  }
16003
- return `<th class="${classNames.join(' ')}" title="${cellTitle}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}><span>${formatText(cellTitle, true)}</span></div></th>`;
16101
+ return `<th class="${classNames.join(' ')}" title="${cellTitle}"><div style="${getCellWidthStyle(column)}"><span>${formatText(cellTitle, true)}</span></div></th>`;
16004
16102
  }).join('')}</tr>`);
16005
16103
  }
16006
16104
  tables.push('</thead>');
@@ -16024,18 +16122,18 @@ export_hook_hooks.add('tableExportModule', {
16024
16122
  }
16025
16123
  classNames.push('vxe-table--tree-node');
16026
16124
  if (column.type === 'radio') {
16027
- 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>`;
16125
+ 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>`;
16028
16126
  } else if (column.type === 'checkbox') {
16029
- 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>`;
16127
+ 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>`;
16030
16128
  }
16031
- 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>`;
16129
+ 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>`;
16032
16130
  }
16033
16131
  if (column.type === 'radio') {
16034
- 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>`;
16132
+ 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>`;
16035
16133
  } else if (column.type === 'checkbox') {
16036
- 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>`;
16134
+ return `<td class="${classNames.join(' ')}"><div style="${getCellWidthStyle(column)}"><input type="checkbox" ${item._checkboxDisabled ? 'disabled ' : ''}${getBooleanValue(cellValue) ? 'checked' : ''}><span>${item._checkboxLabel}</span></div></td>`;
16037
16135
  }
16038
- return `<td class="${classNames.join(' ')}" title="${cellValue}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}>${formatText(cellValue, true)}</div></td>`;
16136
+ return `<td class="${classNames.join(' ')}" title="${cellValue}"><div style="${getCellWidthStyle(column)}">${formatText(cellValue, true)}</div></td>`;
16039
16137
  }).join('') + '</tr>');
16040
16138
  });
16041
16139
  } else {
@@ -16070,11 +16168,11 @@ export_hook_hooks.add('tableExportModule', {
16070
16168
  classNames.push(`col--${cellAlign}`);
16071
16169
  }
16072
16170
  if (column.type === 'radio') {
16073
- 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>`;
16171
+ 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>`;
16074
16172
  } else if (column.type === 'checkbox') {
16075
- 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>`;
16173
+ 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>`;
16076
16174
  }
16077
- return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}>${formatText(cellValue, true)}</div></td>`;
16175
+ return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div style="${getCellWidthStyle(column)}">${formatText(cellValue, true)}</div></td>`;
16078
16176
  }).join('') + '</tr>');
16079
16177
  });
16080
16178
  }
@@ -16117,7 +16215,7 @@ export_hook_hooks.add('tableExportModule', {
16117
16215
  if (footAlign) {
16118
16216
  classNames.push(`col--${footAlign}`);
16119
16217
  }
16120
- return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}>${formatText(cellValue, true)}</div></td>`;
16218
+ return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div style="${getCellWidthStyle(column)}">${formatText(cellValue, true)}</div></td>`;
16121
16219
  }).join('')}</tr>`);
16122
16220
  });
16123
16221
  tables.push('</tfoot>');
@@ -16637,6 +16735,9 @@ export_hook_hooks.add('tableExportModule', {
16637
16735
  if (!typeList.some(item => item.value === type)) {
16638
16736
  exportParams.type = typeList[0].value;
16639
16737
  }
16738
+ if (!exportParams.widthMode) {
16739
+ exportParams.widthMode = '';
16740
+ }
16640
16741
  initStore.export = true;
16641
16742
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
16642
16743
  };
@@ -16750,7 +16851,8 @@ export_hook_hooks.add('tableExportModule', {
16750
16851
  }
16751
16852
  const handleOptions = Object.assign({}, opts, {
16752
16853
  filename: '',
16753
- sheetName: ''
16854
+ sheetName: '',
16855
+ _columnConfs: columns
16754
16856
  });
16755
16857
  // 如果设置源数据,则默认导出设置了字段的列
16756
16858
  if (!isCustomCol && !columnFilterMethod) {
@@ -22079,7 +22181,7 @@ if(importConfig&&importOpts.types&&!importOpts.importMethod&&!external_root_XEUt
22079
22181
  // if ((props.printConfig || props.importConfig || props.exportConfig) && !$xeTable.exportData) {
22080
22182
  // errLog('vxe.error.reqModule', ['Export'])
22081
22183
  // }
22082
- Object.assign(scrollYStore,{startIndex:0,endIndex:0,visibleSize:0});Object.assign(scrollXStore,{startIndex:0,endIndex:0,visibleSize:0});handleUpdateRowGroup(groupFields);initData();(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{if(props.autoResize){const el=refElem.value;const parentEl=$xeTable.getParentElem();resizeObserver=table_globalResize.create(()=>{if(props.autoResize){handleResizeEvent();}});if(el){resizeObserver.observe(el);}if(parentEl){resizeObserver.observe(parentEl);}}});if(virtualYOpts.mode!=='scroll'){const tableViewportEl=refTableViewportElem.value;if(tableViewportEl){tableViewportEl.addEventListener('wheel',$xeTable.triggerBodyWheelEvent,{passive:false});}}table_globalEvents.on($xeTable,'paste',handleGlobalPasteEvent);table_globalEvents.on($xeTable,'copy',handleGlobalCopyEvent);table_globalEvents.on($xeTable,'cut',handleGlobalCutEvent);table_globalEvents.on($xeTable,'mousedown',handleGlobalMousedownEvent);table_globalEvents.on($xeTable,'blur',handleGlobalBlurEvent);table_globalEvents.on($xeTable,'mousewheel',handleGlobalMousewheelEvent);table_globalEvents.on($xeTable,'keydown',handleGlobalKeydownEvent);table_globalEvents.on($xeTable,'resize',handleGlobalResizeEvent);table_globalEvents.on($xeTable,'scroll',handleGlobalScrollEvent);table_globalEvents.on($xeTable,'contextmenu',$xeTable.handleGlobalContextmenuEvent);$xeTable.preventEvent(null,'mounted',{$table:$xeTable});});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(()=>{const{_sToTime}=internalData;if(_sToTime){clearTimeout(_sToTime);}const tableViewportEl=refTableViewportElem.value;if(tableViewportEl){tableViewportEl.removeEventListener('wheel',$xeTable.triggerBodyWheelEvent);}internalData.cvCacheMaps={};internalData.prevDragRow=null;internalData.prevDragCol=null;if(resizeObserver){resizeObserver.disconnect();}$xeTable.closeTooltip();$xeTable.closeFilter();if($xeTable.closeMenu){$xeTable.closeMenu();}table_globalEvents.off($xeTable,'paste');table_globalEvents.off($xeTable,'copy');table_globalEvents.off($xeTable,'cut');table_globalEvents.off($xeTable,'mousedown');table_globalEvents.off($xeTable,'blur');table_globalEvents.off($xeTable,'mousewheel');table_globalEvents.off($xeTable,'keydown');table_globalEvents.off($xeTable,'resize');table_globalEvents.off($xeTable,'scroll');table_globalEvents.off($xeTable,'contextmenu');$xeTable.preventEvent(null,'beforeUnmount',{$table:$xeTable});external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(reactData,createReactData());external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData,createInternalData());});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onUnmounted)(()=>{$xeTable.preventEvent(null,'unmounted',{$table:$xeTable});});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{if(props.loading){if(!VxeUILoadingComponent&&!slots.loading){table_errLog('vxe.error.errProp',['loading=true','loading=false | <template #loading>...</template>']);table_errLog('vxe.error.reqComp',['vxe-loading']);}}if(props.showOverflow===true||props.showOverflow==='tooltip'||props.showHeaderOverflow===true||props.showHeaderOverflow==='tooltip'||props.showFooterOverflow===true||props.showFooterOverflow==='tooltip'){if(!VxeUITooltipComponent){if(props.showOverflow===true){table_errLog('vxe.error.errProp',['show-overflow=true','show-overflow=title']);}if(props.showOverflow==='tooltip'){table_errLog('vxe.error.errProp',['show-overflow=tooltip','show-overflow=title']);}if(props.showHeaderOverflow===true){table_errLog('vxe.error.errProp',['show-header-overflow=true','show-header-overflow=title']);}if(props.showHeaderOverflow==='tooltip'){table_errLog('vxe.error.errProp',['show-header-overflow=tooltip','show-header-overflow=title']);}if(props.showFooterOverflow===true){table_errLog('vxe.error.errProp',['show-footer-overflow=true','show-footer-overflow=title']);}if(props.showFooterOverflow==='tooltip'){table_errLog('vxe.error.errProp',['show-footer-overflow=tooltip','show-footer-overflow=title']);}table_errLog('vxe.error.reqComp',['vxe-tooltip']);}}});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeColgroup',null);(0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeTable',$xeTable);$xeTable.renderVN=renderVN;return $xeTable;},render(){return this.renderVN();}}));
22184
+ Object.assign(scrollYStore,{startIndex:0,endIndex:0,visibleSize:0});Object.assign(scrollXStore,{startIndex:0,endIndex:0,visibleSize:0});handleUpdateRowGroup(groupFields);initData();(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{if(props.autoResize){const el=refElem.value;const parentEl=$xeTable.getParentElem();resizeObserver=table_globalResize.create(()=>{if(props.autoResize){handleResizeEvent();}});if(el){resizeObserver.observe(el);}if(parentEl){resizeObserver.observe(parentEl);}}});if(virtualYOpts.mode!=='scroll'){const tableViewportEl=refTableViewportElem.value;if(tableViewportEl){tableViewportEl.addEventListener('wheel',$xeTable.triggerBodyWheelEvent,{passive:false});}}table_globalEvents.on($xeTable,'paste',handleGlobalPasteEvent);table_globalEvents.on($xeTable,'copy',handleGlobalCopyEvent);table_globalEvents.on($xeTable,'cut',handleGlobalCutEvent);table_globalEvents.on($xeTable,'mousedown',handleGlobalMousedownEvent);table_globalEvents.on($xeTable,'blur',handleGlobalBlurEvent);table_globalEvents.on($xeTable,'mousewheel',handleGlobalMousewheelEvent);table_globalEvents.on($xeTable,'keydown',handleGlobalKeydownEvent);table_globalEvents.on($xeTable,'resize',handleGlobalResizeEvent);table_globalEvents.on($xeTable,'scroll',handleGlobalScrollEvent);table_globalEvents.on($xeTable,'contextmenu',$xeTable.handleGlobalContextmenuEvent);$xeTable.preventEvent(null,'mounted',{$table:$xeTable});});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(()=>{const{_sToTime}=internalData;if(_sToTime){clearTimeout(_sToTime);}const tableViewportEl=refTableViewportElem.value;if(tableViewportEl){tableViewportEl.removeEventListener('wheel',$xeTable.triggerBodyWheelEvent);}internalData.cvCacheMaps={};internalData.prevDragRow=null;internalData.prevDragCol=null;if(resizeObserver){resizeObserver.disconnect();}$xeTable.closeTooltip();$xeTable.closeFilter();if($xeTable.closeMenu){$xeTable.closeMenu();}table_globalEvents.off($xeTable,'paste');table_globalEvents.off($xeTable,'copy');table_globalEvents.off($xeTable,'cut');table_globalEvents.off($xeTable,'mousedown');table_globalEvents.off($xeTable,'blur');table_globalEvents.off($xeTable,'mousewheel');table_globalEvents.off($xeTable,'keydown');table_globalEvents.off($xeTable,'resize');table_globalEvents.off($xeTable,'scroll');table_globalEvents.off($xeTable,'contextmenu');$xeTable.preventEvent(null,'beforeUnmount',{$table:$xeTable});external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(reactData,createReactData());external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData,createInternalData());});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onUnmounted)(()=>{$xeTable.preventEvent(null,'unmounted',{$table:$xeTable});});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{const{showOverflow,showHeaderOverflow,showFooterOverflow}=props;const tooltipOpts=computeTooltipOpts.value;const headerTooltipOpts=computeHeaderTooltipOpts.value;const footerTooltipOpts=computeFooterTooltipOpts.value;if(props.loading){if(!VxeUILoadingComponent&&!slots.loading){table_errLog('vxe.error.reqComp',['vxe-loading']);table_errLog('vxe.error.errProp',['loading=true','loading=false | <template #loading>...</template>']);}}if(!VxeUITooltipComponent){table_errLog('vxe.error.reqComp',['vxe-tooltip']);if(showOverflow==='tooltip'){table_errLog('vxe.error.errProp',['show-overflow='+showOverflow,'show-overflow=false,title,ellipsis']);}if(showOverflow===true&&tooltipOpts.mode==='tooltip'){table_errLog('vxe.error.notSupportProp',['show-overflow='+showOverflow,'tooltip-config.mode=tooltip','tooltip-config.mode=title,ellipsis']);}if(showHeaderOverflow==='tooltip'){table_errLog('vxe.error.errProp',['show-header-overflow='+showHeaderOverflow,'show-header-overflow=false,title,ellipsis']);}if(showHeaderOverflow===true&&headerTooltipOpts.mode==='tooltip'){table_errLog('vxe.error.notSupportProp',['show-header-overflow='+showHeaderOverflow,'header-tooltip-config.mode=tooltip','header-tooltip-config.mode=title,ellipsis']);}if(showFooterOverflow==='tooltip'){table_errLog('vxe.error.errProp',['show-footer-overflow='+showFooterOverflow,'show-footer-overflow=false,title,ellipsis']);}if(showFooterOverflow===true&&footerTooltipOpts.mode==='tooltip'){table_errLog('vxe.error.notSupportProp',['show-footer-overflow='+showFooterOverflow,'footer-tooltip-config.mode=tooltip','footer-tooltip-config.mode=title,ellipsis']);}}});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeColgroup',null);(0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeTable',$xeTable);$xeTable.renderVN=renderVN;return $xeTable;},render(){return this.renderVN();}}));
22083
22185
  ;// ./packages/toolbar/src/toolbar.ts
22084
22186
 
22085
22187
 
@@ -25131,6 +25233,13 @@ const Toolbar = VxeToolbar;
25131
25233
  expMode: '选择数据',
25132
25234
  expCurrentColumn: '全部字段',
25133
25235
  expColumn: '选择字段',
25236
+ widthMode: '列宽方式',
25237
+ wModeTitle: '设置打印时列宽的渲染方式',
25238
+ wdModes: {
25239
+ default: '默认',
25240
+ auto: '自适应(根据内容自适应列宽)',
25241
+ scale: '等比例(根据页面比例渲染列宽)'
25242
+ },
25134
25243
  expOpts: '参数设置',
25135
25244
  expOptHeader: '表头',
25136
25245
  expHeaderTitle: '是否需要表头',