vxe-table 4.20.1 → 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.
- package/README.en.md +3 -3
- package/README.ja-JP.md +3 -3
- package/README.md +3 -3
- package/README.zh-TW.md +3 -3
- package/dist/all.esm.js +211 -108
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +7 -0
- package/es/locale/lang/de-DE.js +7 -0
- package/es/locale/lang/en-US.js +10 -3
- package/es/locale/lang/es-ES.js +7 -0
- package/es/locale/lang/fr-FR.js +7 -0
- package/es/locale/lang/hu-HU.js +7 -0
- package/es/locale/lang/hy-AM.js +10 -3
- package/es/locale/lang/id-ID.js +7 -0
- package/es/locale/lang/it-IT.js +7 -0
- package/es/locale/lang/ja-JP.js +7 -0
- package/es/locale/lang/ko-KR.js +7 -0
- package/es/locale/lang/ms-MY.js +7 -0
- package/es/locale/lang/nb-NO.js +7 -0
- package/es/locale/lang/pt-BR.js +7 -0
- package/es/locale/lang/ru-RU.js +7 -0
- package/es/locale/lang/th-TH.js +7 -0
- package/es/locale/lang/ug-CN.js +7 -0
- package/es/locale/lang/uk-UA.js +7 -0
- package/es/locale/lang/uz-UZ.js +7 -0
- package/es/locale/lang/vi-VN.js +7 -0
- package/es/locale/lang/zh-CHT.js +7 -0
- package/es/locale/lang/zh-CN.js +10 -3
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/export/export-panel.js +61 -47
- package/es/table/module/export/hook.js +105 -27
- package/es/table/module/export/util.js +1 -1
- package/es/table/src/body.js +1 -1
- package/es/table/src/footer.js +1 -1
- package/es/table/src/header.js +5 -3
- package/es/table/src/table.js +24 -24
- package/es/table/src/util.js +1 -0
- package/es/ui/index.js +2 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +161 -52
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +7 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +7 -0
- package/lib/locale/lang/de-DE.js +7 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +7 -0
- package/lib/locale/lang/en-US.js +10 -3
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +10 -3
- package/lib/locale/lang/es-ES.js +7 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +7 -0
- package/lib/locale/lang/fr-FR.js +7 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +7 -0
- package/lib/locale/lang/hu-HU.js +7 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +7 -0
- package/lib/locale/lang/hy-AM.js +10 -3
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +10 -3
- package/lib/locale/lang/id-ID.js +7 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +7 -0
- package/lib/locale/lang/it-IT.js +7 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +7 -0
- package/lib/locale/lang/ja-JP.js +7 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +7 -0
- package/lib/locale/lang/ko-KR.js +7 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +7 -0
- package/lib/locale/lang/ms-MY.js +7 -0
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +7 -0
- package/lib/locale/lang/nb-NO.js +7 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +7 -0
- package/lib/locale/lang/pt-BR.js +7 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +7 -0
- package/lib/locale/lang/ru-RU.js +7 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +7 -0
- package/lib/locale/lang/th-TH.js +7 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +7 -0
- package/lib/locale/lang/ug-CN.js +7 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +7 -0
- package/lib/locale/lang/uk-UA.js +7 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +7 -0
- package/lib/locale/lang/uz-UZ.js +7 -0
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +7 -0
- package/lib/locale/lang/vi-VN.js +7 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +7 -0
- package/lib/locale/lang/zh-CHT.js +7 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +7 -0
- package/lib/locale/lang/zh-CN.js +10 -3
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +10 -3
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/export/export-panel.js +32 -13
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/hook.js +105 -27
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/export/util.js +1 -1
- package/lib/table/module/export/util.min.js +1 -1
- package/lib/table/src/body.js +1 -1
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/footer.js +1 -1
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +6 -3
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +1 -1
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +1 -0
- package/lib/table/src/util.min.js +1 -1
- package/lib/ui/index.js +2 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/ar-EG.ts +7 -0
- package/packages/locale/lang/de-DE.ts +7 -0
- package/packages/locale/lang/en-US.ts +10 -3
- package/packages/locale/lang/es-ES.ts +7 -0
- package/packages/locale/lang/fr-FR.ts +7 -0
- package/packages/locale/lang/hu-HU.ts +7 -0
- package/packages/locale/lang/hy-AM.ts +10 -3
- package/packages/locale/lang/id-ID.ts +7 -0
- package/packages/locale/lang/it-IT.ts +7 -0
- package/packages/locale/lang/ja-JP.ts +7 -0
- package/packages/locale/lang/ko-KR.ts +7 -0
- package/packages/locale/lang/ms-MY.ts +7 -0
- package/packages/locale/lang/nb-NO.ts +7 -0
- package/packages/locale/lang/pt-BR.ts +7 -0
- package/packages/locale/lang/ru-RU.ts +7 -0
- package/packages/locale/lang/th-TH.ts +7 -0
- package/packages/locale/lang/ug-CN.ts +7 -0
- package/packages/locale/lang/uk-UA.ts +7 -0
- package/packages/locale/lang/uz-UZ.ts +7 -0
- package/packages/locale/lang/vi-VN.ts +7 -0
- package/packages/locale/lang/zh-CHT.ts +7 -0
- package/packages/locale/lang/zh-CN.ts +10 -3
- package/packages/table/module/export/export-panel.ts +120 -105
- package/packages/table/module/export/hook.ts +112 -28
- package/packages/table/module/export/util.ts +1 -1
- package/packages/table/src/body.ts +1 -1
- package/packages/table/src/footer.ts +1 -1
- package/packages/table/src/header.ts +5 -3
- package/packages/table/src/table.ts +24 -24
- package/packages/table/src/util.ts +1 -0
- package/packages/ui/index.ts +1 -0
- package/styles/theme/base.scss +11 -0
- package/styles/variable.scss +1 -1
- /package/es/{iconfont.1783908880309.ttf → iconfont.1784251273954.ttf} +0 -0
- /package/es/{iconfont.1783908880309.woff → iconfont.1784251273954.woff} +0 -0
- /package/es/{iconfont.1783908880309.woff2 → iconfont.1784251273954.woff2} +0 -0
- /package/lib/{iconfont.1783908880309.ttf → iconfont.1784251273954.ttf} +0 -0
- /package/lib/{iconfont.1783908880309.woff → iconfont.1784251273954.woff} +0 -0
- /package/lib/{iconfont.1783908880309.woff2 → iconfont.1784251273954.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -44,7 +44,7 @@ function eqEmptyValue(cellValue) {
|
|
|
44
44
|
return cellValue === '' || XEUtils.eqNull(cellValue);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
const version = "4.20.
|
|
47
|
+
const version = "4.20.3";
|
|
48
48
|
VxeUI.version = version;
|
|
49
49
|
VxeUI.tableVersion = version;
|
|
50
50
|
VxeUI.setConfig({
|
|
@@ -110,6 +110,7 @@ VxeUI.setConfig({
|
|
|
110
110
|
strict: true
|
|
111
111
|
},
|
|
112
112
|
tooltipConfig: {
|
|
113
|
+
mode: 'tooltip',
|
|
113
114
|
enterable: true,
|
|
114
115
|
defaultPlacement: 'top'
|
|
115
116
|
},
|
|
@@ -755,7 +756,7 @@ function wheelScrollTopTo(diffNum, cb) {
|
|
|
755
756
|
}
|
|
756
757
|
|
|
757
758
|
const { log } = VxeUI;
|
|
758
|
-
const tableVersion = `table v${"4.20.
|
|
759
|
+
const tableVersion = `table v${"4.20.3"}`;
|
|
759
760
|
function createComponentLog(name) {
|
|
760
761
|
const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
|
|
761
762
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -1328,6 +1329,7 @@ function createReactData$2() {
|
|
|
1328
1329
|
mergeBodyFlag: 1,
|
|
1329
1330
|
mergeFootFlag: 1,
|
|
1330
1331
|
rowHeightStore: {
|
|
1332
|
+
xlarge: 54,
|
|
1331
1333
|
large: 52,
|
|
1332
1334
|
default: 48,
|
|
1333
1335
|
medium: 44,
|
|
@@ -4172,7 +4174,7 @@ var TableBodyComponent = defineVxeComponent({
|
|
|
4172
4174
|
const cellOverflow = XEUtils.eqNull(showOverflow) ? allShowOverflow : showOverflow;
|
|
4173
4175
|
const showEllipsis = cellOverflow === 'ellipsis';
|
|
4174
4176
|
const showTitle = cellOverflow === 'title';
|
|
4175
|
-
const showTooltip = cellOverflow === true
|
|
4177
|
+
const showTooltip = cellOverflow === true ? tooltipOpts.mode === 'tooltip' : cellOverflow === 'tooltip';
|
|
4176
4178
|
const hasEllipsis = isAllOverflow || showTitle || showTooltip || showEllipsis;
|
|
4177
4179
|
const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable));
|
|
4178
4180
|
const isCsHeight = !!customCellHeight;
|
|
@@ -4916,7 +4918,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
4916
4918
|
setup(props) {
|
|
4917
4919
|
const $xeTable = inject('$xeTable', {});
|
|
4918
4920
|
const { xID, props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
|
|
4919
|
-
const { computeColumnOpts, computeColumnDragOpts, computeCellOpts, computeMouseOpts, computeHeaderCellOpts, computeDefaultRowHeight, computeVirtualXOpts, computeFloatingFilterOpts, computeIsHeaderRenderOptimize } = $xeTable.getComputeMaps();
|
|
4921
|
+
const { computeColumnOpts, computeColumnDragOpts, computeCellOpts, computeMouseOpts, computeHeaderCellOpts, computeDefaultRowHeight, computeVirtualXOpts, computeFloatingFilterOpts, computeIsHeaderRenderOptimize, computeHeaderTooltipOpts } = $xeTable.getComputeMaps();
|
|
4920
4922
|
const headerColumn = ref([]);
|
|
4921
4923
|
const refElem = ref();
|
|
4922
4924
|
const refHeaderScroll = ref();
|
|
@@ -4951,6 +4953,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
4951
4953
|
const virtualXOpts = computeVirtualXOpts.value;
|
|
4952
4954
|
const columnOpts = computeColumnOpts.value;
|
|
4953
4955
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
4956
|
+
const headerTooltipOpts = computeHeaderTooltipOpts.value;
|
|
4954
4957
|
const cellOpts = computeCellOpts.value;
|
|
4955
4958
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
4956
4959
|
const headerCellOpts = computeHeaderCellOpts.value;
|
|
@@ -4970,7 +4973,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
4970
4973
|
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
4971
4974
|
const showEllipsis = headOverflow === 'ellipsis';
|
|
4972
4975
|
const showTitle = headOverflow === 'title';
|
|
4973
|
-
const showTooltip = headOverflow === true
|
|
4976
|
+
const showTooltip = headOverflow === true ? headerTooltipOpts.mode === 'tooltip' : headOverflow === 'tooltip';
|
|
4974
4977
|
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
4975
4978
|
let hasFilter = false;
|
|
4976
4979
|
let firstFilterOption = null;
|
|
@@ -5128,6 +5131,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
5128
5131
|
const { showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign } = tableProps;
|
|
5129
5132
|
const { currentColumn, overflowX } = tableReactData;
|
|
5130
5133
|
const { fullColumnIdData } = tableInternalData;
|
|
5134
|
+
const headerTooltipOpts = computeHeaderTooltipOpts.value;
|
|
5131
5135
|
const cellOpts = computeCellOpts.value;
|
|
5132
5136
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
5133
5137
|
const headerCellOpts = computeHeaderCellOpts.value;
|
|
@@ -5149,7 +5153,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
5149
5153
|
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
5150
5154
|
const showEllipsis = headOverflow === 'ellipsis';
|
|
5151
5155
|
const showTitle = headOverflow === 'title';
|
|
5152
|
-
const showTooltip = headOverflow === true
|
|
5156
|
+
const showTooltip = headOverflow === true ? headerTooltipOpts.mode === 'tooltip' : headOverflow === 'tooltip';
|
|
5153
5157
|
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
5154
5158
|
let hasFilter = false;
|
|
5155
5159
|
let firstFilterOption = null;
|
|
@@ -5470,7 +5474,7 @@ var TableFooterComponent = defineVxeComponent({
|
|
|
5470
5474
|
const footAlign = footerAlign || (compConf ? compConf.tableFooterCellAlign : '') || allFooterAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
5471
5475
|
const showEllipsis = footOverflow === 'ellipsis';
|
|
5472
5476
|
const showTitle = footOverflow === 'title';
|
|
5473
|
-
const showTooltip = footOverflow === true
|
|
5477
|
+
const showTooltip = footOverflow === true ? footerTooltipOpts.mode === 'tooltip' : footOverflow === 'tooltip';
|
|
5474
5478
|
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
5475
5479
|
const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable));
|
|
5476
5480
|
const attrs = { colid };
|
|
@@ -7881,6 +7885,13 @@ var TableExportPanelComponent = defineVxeComponent({
|
|
|
7881
7885
|
const xButtonConfirm = ref();
|
|
7882
7886
|
const xInputFilename = ref();
|
|
7883
7887
|
const xInputSheetname = ref();
|
|
7888
|
+
const computeColWidthModeOptions = computed(() => {
|
|
7889
|
+
return [
|
|
7890
|
+
{ value: '', label: getI18n$7('vxe.export.wdModes.default') },
|
|
7891
|
+
{ value: 'auto', label: getI18n$7('vxe.export.wdModes.auto') },
|
|
7892
|
+
{ value: 'scale', label: getI18n$7('vxe.export.wdModes.scale') }
|
|
7893
|
+
];
|
|
7894
|
+
});
|
|
7884
7895
|
const computeCheckedAll = computed(() => {
|
|
7885
7896
|
const { storeData } = props;
|
|
7886
7897
|
return storeData.columns.every((column) => column.checked);
|
|
@@ -8005,6 +8016,7 @@ var TableExportPanelComponent = defineVxeComponent({
|
|
|
8005
8016
|
const showSheet = computeShowSheet.value;
|
|
8006
8017
|
const supportMerge = computeSupportMerge.value;
|
|
8007
8018
|
const supportStyle = computeSupportStyle.value;
|
|
8019
|
+
const colWidthModeOptions = computeColWidthModeOptions.value;
|
|
8008
8020
|
// const supportGroup = computeSupportGroup.value
|
|
8009
8021
|
const slots = defaultOptions.slots || {};
|
|
8010
8022
|
const topSlot = slots.top;
|
|
@@ -8205,6 +8217,22 @@ var TableExportPanelComponent = defineVxeComponent({
|
|
|
8205
8217
|
])
|
|
8206
8218
|
])
|
|
8207
8219
|
]),
|
|
8220
|
+
isPrint
|
|
8221
|
+
? h('tr', [
|
|
8222
|
+
h('td', getI18n$7('vxe.export.widthMode')),
|
|
8223
|
+
h('td', [
|
|
8224
|
+
VxeUISelectComponent
|
|
8225
|
+
? h(VxeUISelectComponent, {
|
|
8226
|
+
modelValue: defaultOptions.widthMode,
|
|
8227
|
+
options: colWidthModeOptions,
|
|
8228
|
+
'onUpdate:modelValue'(value) {
|
|
8229
|
+
defaultOptions.widthMode = value;
|
|
8230
|
+
}
|
|
8231
|
+
})
|
|
8232
|
+
: renderEmptyElement$3($xeTable)
|
|
8233
|
+
])
|
|
8234
|
+
])
|
|
8235
|
+
: renderEmptyElement$3($xeTable),
|
|
8208
8236
|
h('tr', [
|
|
8209
8237
|
h('td', getI18n$7('vxe.export.expOpts')),
|
|
8210
8238
|
parameterSlot
|
|
@@ -8216,9 +8244,9 @@ var TableExportPanelComponent = defineVxeComponent({
|
|
|
8216
8244
|
: h('td', [
|
|
8217
8245
|
h('div', {
|
|
8218
8246
|
class: 'vxe-table-export--panel-option-row'
|
|
8219
|
-
},
|
|
8220
|
-
|
|
8221
|
-
|
|
8247
|
+
}, VxeUICheckboxComponent
|
|
8248
|
+
? [
|
|
8249
|
+
h(VxeUICheckboxComponent, {
|
|
8222
8250
|
modelValue: hasEmptyData || isHeader,
|
|
8223
8251
|
disabled: hasEmptyData,
|
|
8224
8252
|
title: getI18n$7('vxe.export.expHeaderTitle'),
|
|
@@ -8226,10 +8254,8 @@ var TableExportPanelComponent = defineVxeComponent({
|
|
|
8226
8254
|
'onUpdate:modelValue'(value) {
|
|
8227
8255
|
defaultOptions.isHeader = value;
|
|
8228
8256
|
}
|
|
8229
|
-
})
|
|
8230
|
-
|
|
8231
|
-
VxeUICheckboxComponent
|
|
8232
|
-
? h(VxeUICheckboxComponent, {
|
|
8257
|
+
}),
|
|
8258
|
+
h(VxeUICheckboxComponent, {
|
|
8233
8259
|
modelValue: defaultOptions.isFooter,
|
|
8234
8260
|
disabled: !storeData.hasFooter,
|
|
8235
8261
|
title: getI18n$7('vxe.export.expFooterTitle'),
|
|
@@ -8237,10 +8263,8 @@ var TableExportPanelComponent = defineVxeComponent({
|
|
|
8237
8263
|
'onUpdate:modelValue'(value) {
|
|
8238
8264
|
defaultOptions.isFooter = value;
|
|
8239
8265
|
}
|
|
8240
|
-
})
|
|
8241
|
-
|
|
8242
|
-
VxeUICheckboxComponent
|
|
8243
|
-
? h(VxeUICheckboxComponent, {
|
|
8266
|
+
}),
|
|
8267
|
+
h(VxeUICheckboxComponent, {
|
|
8244
8268
|
modelValue: isHeader ? defaultOptions.isTitle : false,
|
|
8245
8269
|
disabled: !isHeader,
|
|
8246
8270
|
title: getI18n$7('vxe.export.expTitleTitle'),
|
|
@@ -8248,10 +8272,8 @@ var TableExportPanelComponent = defineVxeComponent({
|
|
|
8248
8272
|
'onUpdate:modelValue'(value) {
|
|
8249
8273
|
defaultOptions.isTitle = value;
|
|
8250
8274
|
}
|
|
8251
|
-
})
|
|
8252
|
-
|
|
8253
|
-
VxeUICheckboxComponent
|
|
8254
|
-
? h(VxeUICheckboxComponent, {
|
|
8275
|
+
}),
|
|
8276
|
+
h(VxeUICheckboxComponent, {
|
|
8255
8277
|
modelValue: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
|
|
8256
8278
|
title: getI18n$7('vxe.export.expColgroupTitle'),
|
|
8257
8279
|
disabled: !isHeader || !hasColgroup || !supportMerge,
|
|
@@ -8260,13 +8282,13 @@ var TableExportPanelComponent = defineVxeComponent({
|
|
|
8260
8282
|
defaultOptions.isColgroup = value;
|
|
8261
8283
|
}
|
|
8262
8284
|
})
|
|
8263
|
-
|
|
8264
|
-
|
|
8285
|
+
]
|
|
8286
|
+
: []),
|
|
8265
8287
|
h('div', {
|
|
8266
8288
|
class: 'vxe-table-export--panel-option-row'
|
|
8267
|
-
},
|
|
8268
|
-
|
|
8269
|
-
|
|
8289
|
+
}, VxeUICheckboxComponent
|
|
8290
|
+
? [
|
|
8291
|
+
h(VxeUICheckboxComponent, {
|
|
8270
8292
|
modelValue: hasEmptyData ? false : defaultOptions.original,
|
|
8271
8293
|
disabled: hasEmptyData,
|
|
8272
8294
|
title: getI18n$7('vxe.export.expOriginalTitle'),
|
|
@@ -8274,10 +8296,8 @@ var TableExportPanelComponent = defineVxeComponent({
|
|
|
8274
8296
|
'onUpdate:modelValue'(value) {
|
|
8275
8297
|
defaultOptions.original = value;
|
|
8276
8298
|
}
|
|
8277
|
-
})
|
|
8278
|
-
|
|
8279
|
-
VxeUICheckboxComponent
|
|
8280
|
-
? h(VxeUICheckboxComponent, {
|
|
8299
|
+
}),
|
|
8300
|
+
h(VxeUICheckboxComponent, {
|
|
8281
8301
|
modelValue: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
|
|
8282
8302
|
title: getI18n$7('vxe.export.expMergeTitle'),
|
|
8283
8303
|
disabled: hasEmptyData || !hasMerge || !supportMerge || !checkedAll,
|
|
@@ -8285,25 +8305,25 @@ var TableExportPanelComponent = defineVxeComponent({
|
|
|
8285
8305
|
'onUpdate:modelValue'(value) {
|
|
8286
8306
|
defaultOptions.isMerge = value;
|
|
8287
8307
|
}
|
|
8288
|
-
})
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
|
|
8293
|
-
|
|
8294
|
-
|
|
8295
|
-
|
|
8296
|
-
|
|
8297
|
-
|
|
8298
|
-
|
|
8299
|
-
}
|
|
8300
|
-
|
|
8301
|
-
|
|
8308
|
+
}),
|
|
8309
|
+
isPrint
|
|
8310
|
+
? renderEmptyElement$3($xeTable)
|
|
8311
|
+
: h(VxeUICheckboxComponent, {
|
|
8312
|
+
modelValue: supportStyle ? defaultOptions.useStyle : false,
|
|
8313
|
+
disabled: !supportStyle,
|
|
8314
|
+
title: getI18n$7('vxe.export.expUseStyleTitle'),
|
|
8315
|
+
content: getI18n$7('vxe.export.expOptUseStyle'),
|
|
8316
|
+
'onUpdate:modelValue'(value) {
|
|
8317
|
+
defaultOptions.useStyle = value;
|
|
8318
|
+
}
|
|
8319
|
+
})
|
|
8320
|
+
]
|
|
8321
|
+
: []),
|
|
8302
8322
|
h('div', {
|
|
8303
8323
|
class: 'vxe-table-export--panel-option-row'
|
|
8304
|
-
},
|
|
8305
|
-
|
|
8306
|
-
|
|
8324
|
+
}, VxeUICheckboxComponent
|
|
8325
|
+
? [
|
|
8326
|
+
h(VxeUICheckboxComponent, {
|
|
8307
8327
|
modelValue: hasTree ? defaultOptions.isTreeAllExpanded : false,
|
|
8308
8328
|
disabled: hasEmptyData || !hasTree,
|
|
8309
8329
|
title: getI18n$7('vxe.export.expTreeAllExpandTitle'),
|
|
@@ -8311,10 +8331,8 @@ var TableExportPanelComponent = defineVxeComponent({
|
|
|
8311
8331
|
'onUpdate:modelValue'(value) {
|
|
8312
8332
|
defaultOptions.isTreeAllExpanded = value;
|
|
8313
8333
|
}
|
|
8314
|
-
})
|
|
8315
|
-
|
|
8316
|
-
VxeUICheckboxComponent
|
|
8317
|
-
? h(VxeUICheckboxComponent, {
|
|
8334
|
+
}),
|
|
8335
|
+
h(VxeUICheckboxComponent, {
|
|
8318
8336
|
modelValue: hasRowGroup ? defaultOptions.isRowGroupAllExpanded : false,
|
|
8319
8337
|
disabled: hasEmptyData || !hasRowGroup,
|
|
8320
8338
|
title: getI18n$7('vxe.export.expRowGroupAllExpandTitle'),
|
|
@@ -8323,8 +8341,8 @@ var TableExportPanelComponent = defineVxeComponent({
|
|
|
8323
8341
|
defaultOptions.isRowGroupAllExpanded = value;
|
|
8324
8342
|
}
|
|
8325
8343
|
})
|
|
8326
|
-
|
|
8327
|
-
|
|
8344
|
+
]
|
|
8345
|
+
: [])
|
|
8328
8346
|
])
|
|
8329
8347
|
])
|
|
8330
8348
|
]
|
|
@@ -10429,7 +10447,7 @@ hooks$5.add('tableEditModule', {
|
|
|
10429
10447
|
});
|
|
10430
10448
|
|
|
10431
10449
|
// 默认导出或打印的 HTML 样式
|
|
10432
|
-
const defaultHtmlStyle = 'body{
|
|
10450
|
+
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}';
|
|
10433
10451
|
function getExportBlobByContent(content, options) {
|
|
10434
10452
|
return new Blob([content], { type: `text/${options.type};charset=utf-8;` });
|
|
10435
10453
|
}
|
|
@@ -11109,22 +11127,106 @@ hooks$4.add('tableExportModule', {
|
|
|
11109
11127
|
}
|
|
11110
11128
|
return isEllipsis;
|
|
11111
11129
|
};
|
|
11130
|
+
const getCustomColKey = (conf) => {
|
|
11131
|
+
return `${conf.field || ''}:${conf.type || ''}`;
|
|
11132
|
+
};
|
|
11112
11133
|
const toHtml = (opts, columns, datas) => {
|
|
11113
11134
|
const { id, border, treeConfig, headerAlign: allHeaderAlign, align: allAlign, footerAlign: allFooterAlign, showOverflow: allColumnOverflow, showHeaderOverflow: allColumnHeaderOverflow } = props;
|
|
11114
11135
|
const { isAllSelected, isIndeterminate } = reactData;
|
|
11115
11136
|
const { mergeBodyCellMaps, mergeFooterCellMaps } = internalData;
|
|
11116
11137
|
const treeOpts = computeTreeOpts.value;
|
|
11117
|
-
const { print: isPrint, isHeader, isFooter, isColgroup, isMerge, colgroups, original } = opts;
|
|
11138
|
+
const { print: isPrint, widthMode, isHeader, isFooter, isColgroup, isMerge, colgroups, _columnConfs, original } = opts;
|
|
11139
|
+
const isAutoWidth = widthMode === 'auto';
|
|
11140
|
+
const isScaleWidth = widthMode === 'scale';
|
|
11141
|
+
const isDefaultWidth = !isAutoWidth && !isScaleWidth;
|
|
11142
|
+
const customWidthMaps = {};
|
|
11143
|
+
if (_columnConfs) {
|
|
11144
|
+
_columnConfs.forEach(conf => {
|
|
11145
|
+
if (!isColumnInfo(conf)) {
|
|
11146
|
+
if ((conf.field || conf.type) && conf.width) {
|
|
11147
|
+
customWidthMaps[getCustomColKey(conf)] = conf.width;
|
|
11148
|
+
}
|
|
11149
|
+
}
|
|
11150
|
+
});
|
|
11151
|
+
}
|
|
11152
|
+
// 计算宽度
|
|
11153
|
+
const colWidthMaps = {};
|
|
11154
|
+
const printWidthMaps = {};
|
|
11155
|
+
if (isPrint) {
|
|
11156
|
+
let tableWidth = 0;
|
|
11157
|
+
columns.forEach(column => {
|
|
11158
|
+
tableWidth += column.renderWidth;
|
|
11159
|
+
});
|
|
11160
|
+
if (colgroups) {
|
|
11161
|
+
colgroups.forEach((cols) => {
|
|
11162
|
+
cols.forEach((column) => {
|
|
11163
|
+
if (!column.childNodes || !column.childNodes.length) {
|
|
11164
|
+
return;
|
|
11165
|
+
}
|
|
11166
|
+
let childWidth = 0;
|
|
11167
|
+
let countChild = 0;
|
|
11168
|
+
XEUtils.eachTree([column], item => {
|
|
11169
|
+
if (!item.childNodes || !column.childNodes.length) {
|
|
11170
|
+
countChild++;
|
|
11171
|
+
}
|
|
11172
|
+
const ptWidth = printWidthMaps[item.id];
|
|
11173
|
+
childWidth += ptWidth || 0;
|
|
11174
|
+
}, { children: 'childNodes' });
|
|
11175
|
+
const colWidth = childWidth - countChild;
|
|
11176
|
+
colWidthMaps[column.id] = colWidth;
|
|
11177
|
+
printWidthMaps[column.id] = XEUtils.floor(colWidth / tableWidth * 180, 2);
|
|
11178
|
+
});
|
|
11179
|
+
});
|
|
11180
|
+
}
|
|
11181
|
+
columns.forEach(column => {
|
|
11182
|
+
const colWidth = column.renderWidth;
|
|
11183
|
+
if (column.width) {
|
|
11184
|
+
colWidthMaps[column.id] = colWidth;
|
|
11185
|
+
}
|
|
11186
|
+
printWidthMaps[column.id] = XEUtils.floor(colWidth / tableWidth * 180, 2);
|
|
11187
|
+
});
|
|
11188
|
+
}
|
|
11189
|
+
const getHeaderWidthStyle = (column) => {
|
|
11190
|
+
const cmColKey = getCustomColKey(column);
|
|
11191
|
+
const cmWidthMaps = customWidthMaps[cmColKey];
|
|
11192
|
+
if (cmWidthMaps) {
|
|
11193
|
+
return 'width:' + toCssUnit(cmWidthMaps);
|
|
11194
|
+
}
|
|
11195
|
+
if (isAutoWidth) {
|
|
11196
|
+
return '';
|
|
11197
|
+
}
|
|
11198
|
+
if (isScaleWidth) {
|
|
11199
|
+
return printWidthMaps[column.id] ? ('width:' + printWidthMaps[column.id] + 'mm') : '';
|
|
11200
|
+
}
|
|
11201
|
+
return colWidthMaps[column.id] ? ('width:' + toCssUnit(colWidthMaps[column.id])) : '';
|
|
11202
|
+
};
|
|
11203
|
+
const getCellWidthStyle = (column) => {
|
|
11204
|
+
const cmColKey = getCustomColKey(column);
|
|
11205
|
+
const cmWidthMaps = customWidthMaps[cmColKey];
|
|
11206
|
+
if (cmWidthMaps) {
|
|
11207
|
+
return 'width:' + toCssUnit(cmWidthMaps);
|
|
11208
|
+
}
|
|
11209
|
+
if (isAutoWidth || isDefaultWidth) {
|
|
11210
|
+
return '';
|
|
11211
|
+
}
|
|
11212
|
+
if (isScaleWidth) {
|
|
11213
|
+
return printWidthMaps[column.id] ? ('width:' + printWidthMaps[column.id] + 'mm') : '';
|
|
11214
|
+
}
|
|
11215
|
+
return colWidthMaps[column.id] ? ('width:' + toCssUnit(colWidthMaps[column.id])) : '';
|
|
11216
|
+
};
|
|
11118
11217
|
const allCls = 'check-all';
|
|
11119
11218
|
const clss = [
|
|
11120
11219
|
'vxe-table',
|
|
11121
11220
|
`border--${toTableBorder(border)}`,
|
|
11122
11221
|
isPrint ? 'is--print' : '',
|
|
11222
|
+
isAutoWidth ? 'is--auto-width' : '',
|
|
11223
|
+
isScaleWidth ? 'is--scale-width' : '',
|
|
11224
|
+
isDefaultWidth ? 'is--default-width' : '',
|
|
11123
11225
|
isHeader ? 'is--header' : ''
|
|
11124
11226
|
].filter(cls => cls);
|
|
11125
11227
|
const tables = [
|
|
11126
11228
|
`<table class="${clss.join(' ')}" border="0" cellspacing="0" cellpadding="0">`,
|
|
11127
|
-
`<colgroup>${columns.map((column) => `<col style="
|
|
11229
|
+
`<colgroup>${columns.map((column) => `<col style="${getHeaderWidthStyle(column)}">`).join('')}</colgroup>`
|
|
11128
11230
|
];
|
|
11129
11231
|
if (isHeader) {
|
|
11130
11232
|
tables.push('<thead>');
|
|
@@ -11134,22 +11236,13 @@ hooks$4.add('tableExportModule', {
|
|
|
11134
11236
|
const headAlign = column.headerAlign || column.align || allHeaderAlign || allAlign;
|
|
11135
11237
|
const classNames = hasEllipsis(column, 'showHeaderOverflow', allColumnHeaderOverflow) ? ['col--ellipsis'] : [];
|
|
11136
11238
|
const cellTitle = getHeaderTitle(opts, column);
|
|
11137
|
-
let childWidth = 0;
|
|
11138
|
-
let countChild = 0;
|
|
11139
|
-
XEUtils.eachTree([column], item => {
|
|
11140
|
-
if (!item.childNodes || !column.childNodes.length) {
|
|
11141
|
-
countChild++;
|
|
11142
|
-
}
|
|
11143
|
-
childWidth += item.renderWidth;
|
|
11144
|
-
}, { children: 'childNodes' });
|
|
11145
|
-
const cellWidth = childWidth - countChild;
|
|
11146
11239
|
if (headAlign) {
|
|
11147
11240
|
classNames.push(`col--${headAlign}`);
|
|
11148
11241
|
}
|
|
11149
11242
|
if (column.type === 'checkbox') {
|
|
11150
|
-
return `<th class="${classNames.join(' ')}" colspan="${column._colSpan}" rowspan="${column._rowSpan}"><div
|
|
11243
|
+
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>`;
|
|
11151
11244
|
}
|
|
11152
|
-
return `<th class="${classNames.join(' ')}" colspan="${column._colSpan}" rowspan="${column._rowSpan}" title="${cellTitle}"><div
|
|
11245
|
+
return `<th class="${classNames.join(' ')}" colspan="${column._colSpan}" rowspan="${column._rowSpan}" title="${cellTitle}"><div style="${getCellWidthStyle(column)}"><span>${formatText(cellTitle, true)}</span></div></th>`;
|
|
11153
11246
|
}).join('')}</tr>`);
|
|
11154
11247
|
});
|
|
11155
11248
|
}
|
|
@@ -11162,9 +11255,9 @@ hooks$4.add('tableExportModule', {
|
|
|
11162
11255
|
classNames.push(`col--${headAlign}`);
|
|
11163
11256
|
}
|
|
11164
11257
|
if (column.type === 'checkbox') {
|
|
11165
|
-
return `<th class="${classNames.join(' ')}"><div
|
|
11258
|
+
return `<th class="${classNames.join(' ')}"><div style="${getCellWidthStyle(column)}"><input type="checkbox" class="${allCls}" ${isAllSelected ? 'checked' : ''}><span>${cellTitle}</span></div></th>`;
|
|
11166
11259
|
}
|
|
11167
|
-
return `<th class="${classNames.join(' ')}" title="${cellTitle}"><div
|
|
11260
|
+
return `<th class="${classNames.join(' ')}" title="${cellTitle}"><div style="${getCellWidthStyle(column)}"><span>${formatText(cellTitle, true)}</span></div></th>`;
|
|
11168
11261
|
}).join('')}</tr>`);
|
|
11169
11262
|
}
|
|
11170
11263
|
tables.push('</thead>');
|
|
@@ -11188,20 +11281,20 @@ hooks$4.add('tableExportModule', {
|
|
|
11188
11281
|
}
|
|
11189
11282
|
classNames.push('vxe-table--tree-node');
|
|
11190
11283
|
if (column.type === 'radio') {
|
|
11191
|
-
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div
|
|
11284
|
+
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>`;
|
|
11192
11285
|
}
|
|
11193
11286
|
else if (column.type === 'checkbox') {
|
|
11194
|
-
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div
|
|
11287
|
+
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>`;
|
|
11195
11288
|
}
|
|
11196
|
-
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div
|
|
11289
|
+
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>`;
|
|
11197
11290
|
}
|
|
11198
11291
|
if (column.type === 'radio') {
|
|
11199
|
-
return `<td class="${classNames.join(' ')}"><div
|
|
11292
|
+
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>`;
|
|
11200
11293
|
}
|
|
11201
11294
|
else if (column.type === 'checkbox') {
|
|
11202
|
-
return `<td class="${classNames.join(' ')}"><div
|
|
11295
|
+
return `<td class="${classNames.join(' ')}"><div style="${getCellWidthStyle(column)}"><input type="checkbox" ${item._checkboxDisabled ? 'disabled ' : ''}${getBooleanValue(cellValue) ? 'checked' : ''}><span>${item._checkboxLabel}</span></div></td>`;
|
|
11203
11296
|
}
|
|
11204
|
-
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div
|
|
11297
|
+
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div style="${getCellWidthStyle(column)}">${formatText(cellValue, true)}</div></td>`;
|
|
11205
11298
|
}).join('') + '</tr>');
|
|
11206
11299
|
});
|
|
11207
11300
|
}
|
|
@@ -11234,12 +11327,12 @@ hooks$4.add('tableExportModule', {
|
|
|
11234
11327
|
classNames.push(`col--${cellAlign}`);
|
|
11235
11328
|
}
|
|
11236
11329
|
if (column.type === 'radio') {
|
|
11237
|
-
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}"><div
|
|
11330
|
+
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>`;
|
|
11238
11331
|
}
|
|
11239
11332
|
else if (column.type === 'checkbox') {
|
|
11240
|
-
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}"><div
|
|
11333
|
+
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>`;
|
|
11241
11334
|
}
|
|
11242
|
-
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div
|
|
11335
|
+
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div style="${getCellWidthStyle(column)}">${formatText(cellValue, true)}</div></td>`;
|
|
11243
11336
|
}).join('') + '</tr>');
|
|
11244
11337
|
});
|
|
11245
11338
|
}
|
|
@@ -11277,7 +11370,7 @@ hooks$4.add('tableExportModule', {
|
|
|
11277
11370
|
if (footAlign) {
|
|
11278
11371
|
classNames.push(`col--${footAlign}`);
|
|
11279
11372
|
}
|
|
11280
|
-
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div
|
|
11373
|
+
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div style="${getCellWidthStyle(column)}">${formatText(cellValue, true)}</div></td>`;
|
|
11281
11374
|
}).join('')}</tr>`);
|
|
11282
11375
|
});
|
|
11283
11376
|
tables.push('</tfoot>');
|
|
@@ -11692,6 +11785,9 @@ hooks$4.add('tableExportModule', {
|
|
|
11692
11785
|
if (!typeList.some(item => item.value === type)) {
|
|
11693
11786
|
exportParams.type = typeList[0].value;
|
|
11694
11787
|
}
|
|
11788
|
+
if (!exportParams.widthMode) {
|
|
11789
|
+
exportParams.widthMode = '';
|
|
11790
|
+
}
|
|
11695
11791
|
initStore.export = true;
|
|
11696
11792
|
return nextTick();
|
|
11697
11793
|
};
|
|
@@ -11778,7 +11874,7 @@ hooks$4.add('tableExportModule', {
|
|
|
11778
11874
|
return isChecked;
|
|
11779
11875
|
}, { children: 'children', mapChildren: 'childNodes', original: true });
|
|
11780
11876
|
}
|
|
11781
|
-
const handleOptions = Object.assign({}, opts, { filename: '', sheetName: '' });
|
|
11877
|
+
const handleOptions = Object.assign({}, opts, { filename: '', sheetName: '', _columnConfs: columns });
|
|
11782
11878
|
// 如果设置源数据,则默认导出设置了字段的列
|
|
11783
11879
|
if (!isCustomCol && !columnFilterMethod) {
|
|
11784
11880
|
columnFilterMethod = ({ column }) => {
|
|
@@ -29841,35 +29937,35 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
29841
29937
|
$xeTable.preventEvent(null, 'unmounted', { $table: $xeTable });
|
|
29842
29938
|
});
|
|
29843
29939
|
nextTick(() => {
|
|
29940
|
+
const { showOverflow, showHeaderOverflow, showFooterOverflow } = props;
|
|
29941
|
+
const tooltipOpts = computeTooltipOpts.value;
|
|
29942
|
+
const headerTooltipOpts = computeHeaderTooltipOpts.value;
|
|
29943
|
+
const footerTooltipOpts = computeFooterTooltipOpts.value;
|
|
29844
29944
|
if (props.loading) {
|
|
29845
29945
|
if (!VxeUILoadingComponent && !slots.loading) {
|
|
29846
|
-
errLog$2('vxe.error.errProp', ['loading=true', 'loading=false | <template #loading>...</template>']);
|
|
29847
29946
|
errLog$2('vxe.error.reqComp', ['vxe-loading']);
|
|
29947
|
+
errLog$2('vxe.error.errProp', ['loading=true', 'loading=false | <template #loading>...</template>']);
|
|
29848
29948
|
}
|
|
29849
29949
|
}
|
|
29850
|
-
if (
|
|
29851
|
-
(
|
|
29852
|
-
(
|
|
29853
|
-
|
|
29854
|
-
|
|
29855
|
-
|
|
29856
|
-
|
|
29857
|
-
|
|
29858
|
-
|
|
29859
|
-
|
|
29860
|
-
|
|
29861
|
-
|
|
29862
|
-
|
|
29863
|
-
|
|
29864
|
-
|
|
29865
|
-
|
|
29866
|
-
|
|
29867
|
-
|
|
29868
|
-
|
|
29869
|
-
if (props.showFooterOverflow === 'tooltip') {
|
|
29870
|
-
errLog$2('vxe.error.errProp', ['show-footer-overflow=tooltip', 'show-footer-overflow=title']);
|
|
29871
|
-
}
|
|
29872
|
-
errLog$2('vxe.error.reqComp', ['vxe-tooltip']);
|
|
29950
|
+
if (!VxeUITooltipComponent) {
|
|
29951
|
+
errLog$2('vxe.error.reqComp', ['vxe-tooltip']);
|
|
29952
|
+
if (showOverflow === 'tooltip') {
|
|
29953
|
+
errLog$2('vxe.error.errProp', ['show-overflow=' + showOverflow, 'show-overflow=false,title,ellipsis']);
|
|
29954
|
+
}
|
|
29955
|
+
if (showOverflow === true && tooltipOpts.mode === 'tooltip') {
|
|
29956
|
+
errLog$2('vxe.error.notSupportProp', ['show-overflow=' + showOverflow, 'tooltip-config.mode=tooltip', 'tooltip-config.mode=title,ellipsis']);
|
|
29957
|
+
}
|
|
29958
|
+
if (showHeaderOverflow === 'tooltip') {
|
|
29959
|
+
errLog$2('vxe.error.errProp', ['show-header-overflow=' + showHeaderOverflow, 'show-header-overflow=false,title,ellipsis']);
|
|
29960
|
+
}
|
|
29961
|
+
if (showHeaderOverflow === true && headerTooltipOpts.mode === 'tooltip') {
|
|
29962
|
+
errLog$2('vxe.error.notSupportProp', ['show-header-overflow=' + showHeaderOverflow, 'header-tooltip-config.mode=tooltip', 'header-tooltip-config.mode=title,ellipsis']);
|
|
29963
|
+
}
|
|
29964
|
+
if (showFooterOverflow === 'tooltip') {
|
|
29965
|
+
errLog$2('vxe.error.errProp', ['show-footer-overflow=' + showFooterOverflow, 'show-footer-overflow=false,title,ellipsis']);
|
|
29966
|
+
}
|
|
29967
|
+
if (showFooterOverflow === true && footerTooltipOpts.mode === 'tooltip') {
|
|
29968
|
+
errLog$2('vxe.error.notSupportProp', ['show-footer-overflow=' + showFooterOverflow, 'footer-tooltip-config.mode=tooltip', 'footer-tooltip-config.mode=title,ellipsis']);
|
|
29873
29969
|
}
|
|
29874
29970
|
}
|
|
29875
29971
|
});
|
|
@@ -32303,7 +32399,7 @@ var zhCN = {
|
|
|
32303
32399
|
expError: '导出失败',
|
|
32304
32400
|
expFilename: '导出_{0}',
|
|
32305
32401
|
expOriginFilename: '导出_源_{0}',
|
|
32306
|
-
customTitle: '
|
|
32402
|
+
customTitle: '个性化设置',
|
|
32307
32403
|
customAll: '全部',
|
|
32308
32404
|
customConfirm: '确认',
|
|
32309
32405
|
customClose: '关闭',
|
|
@@ -32387,7 +32483,7 @@ var zhCN = {
|
|
|
32387
32483
|
search: '搜索'
|
|
32388
32484
|
},
|
|
32389
32485
|
custom: {
|
|
32390
|
-
cstmTitle: '
|
|
32486
|
+
cstmTitle: '个性化设置',
|
|
32391
32487
|
cstmRestore: '恢复默认',
|
|
32392
32488
|
cstmCancel: '取消',
|
|
32393
32489
|
cstmConfirm: '确定',
|
|
@@ -32465,6 +32561,13 @@ var zhCN = {
|
|
|
32465
32561
|
expMode: '选择数据',
|
|
32466
32562
|
expCurrentColumn: '全部字段',
|
|
32467
32563
|
expColumn: '选择字段',
|
|
32564
|
+
widthMode: '列宽方式',
|
|
32565
|
+
wModeTitle: '设置打印时列宽的渲染方式',
|
|
32566
|
+
wdModes: {
|
|
32567
|
+
default: '默认',
|
|
32568
|
+
auto: '自适应(根据内容自适应列宽)',
|
|
32569
|
+
scale: '等比例(根据页面比例渲染列宽)'
|
|
32570
|
+
},
|
|
32468
32571
|
expOpts: '参数设置',
|
|
32469
32572
|
expOptHeader: '表头',
|
|
32470
32573
|
expHeaderTitle: '是否需要表头',
|
|
@@ -32513,7 +32616,7 @@ var zhCN = {
|
|
|
32513
32616
|
refresh: '刷新',
|
|
32514
32617
|
zoomIn: '全屏',
|
|
32515
32618
|
zoomOut: '还原',
|
|
32516
|
-
custom: '
|
|
32619
|
+
custom: '个性化设置',
|
|
32517
32620
|
customAll: '全部',
|
|
32518
32621
|
customConfirm: '确认',
|
|
32519
32622
|
customRestore: '重置',
|