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
|
@@ -43,6 +43,14 @@ export default defineVxeComponent({
|
|
|
43
43
|
const xInputFilename = ref() as Ref<HTMLInputElement>
|
|
44
44
|
const xInputSheetname = ref() as Ref<HTMLInputElement>
|
|
45
45
|
|
|
46
|
+
const computeColWidthModeOptions = computed(() => {
|
|
47
|
+
return [
|
|
48
|
+
{ value: '', label: getI18n('vxe.export.wdModes.default') },
|
|
49
|
+
{ value: 'auto', label: getI18n('vxe.export.wdModes.auto') },
|
|
50
|
+
{ value: 'scale', label: getI18n('vxe.export.wdModes.scale') }
|
|
51
|
+
]
|
|
52
|
+
})
|
|
53
|
+
|
|
46
54
|
const computeCheckedAll = computed(() => {
|
|
47
55
|
const { storeData } = props
|
|
48
56
|
return storeData.columns.every((column) => column.checked)
|
|
@@ -182,6 +190,7 @@ export default defineVxeComponent({
|
|
|
182
190
|
const showSheet = computeShowSheet.value
|
|
183
191
|
const supportMerge = computeSupportMerge.value
|
|
184
192
|
const supportStyle = computeSupportStyle.value
|
|
193
|
+
const colWidthModeOptions = computeColWidthModeOptions.value
|
|
185
194
|
// const supportGroup = computeSupportGroup.value
|
|
186
195
|
const slots = defaultOptions.slots || {}
|
|
187
196
|
const topSlot = slots.top
|
|
@@ -386,6 +395,22 @@ export default defineVxeComponent({
|
|
|
386
395
|
])
|
|
387
396
|
])
|
|
388
397
|
]),
|
|
398
|
+
isPrint
|
|
399
|
+
? h('tr', [
|
|
400
|
+
h('td', getI18n('vxe.export.widthMode')),
|
|
401
|
+
h('td', [
|
|
402
|
+
VxeUISelectComponent
|
|
403
|
+
? h(VxeUISelectComponent, {
|
|
404
|
+
modelValue: defaultOptions.widthMode,
|
|
405
|
+
options: colWidthModeOptions,
|
|
406
|
+
'onUpdate:modelValue' (value: any) {
|
|
407
|
+
defaultOptions.widthMode = value
|
|
408
|
+
}
|
|
409
|
+
})
|
|
410
|
+
: renderEmptyElement($xeTable)
|
|
411
|
+
])
|
|
412
|
+
])
|
|
413
|
+
: renderEmptyElement($xeTable),
|
|
389
414
|
h('tr', [
|
|
390
415
|
h('td', getI18n('vxe.export.expOpts')),
|
|
391
416
|
parameterSlot
|
|
@@ -397,115 +422,105 @@ export default defineVxeComponent({
|
|
|
397
422
|
: h('td', [
|
|
398
423
|
h('div', {
|
|
399
424
|
class: 'vxe-table-export--panel-option-row'
|
|
400
|
-
},
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
defaultOptions.
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
'onUpdate:modelValue' (value: any) {
|
|
441
|
-
defaultOptions.isColgroup = value
|
|
442
|
-
}
|
|
443
|
-
})
|
|
444
|
-
: renderEmptyElement($xeTable)
|
|
445
|
-
]),
|
|
425
|
+
}, VxeUICheckboxComponent
|
|
426
|
+
? [
|
|
427
|
+
h(VxeUICheckboxComponent, {
|
|
428
|
+
modelValue: hasEmptyData || isHeader,
|
|
429
|
+
disabled: hasEmptyData,
|
|
430
|
+
title: getI18n('vxe.export.expHeaderTitle'),
|
|
431
|
+
content: getI18n('vxe.export.expOptHeader'),
|
|
432
|
+
'onUpdate:modelValue' (value: any) {
|
|
433
|
+
defaultOptions.isHeader = value
|
|
434
|
+
}
|
|
435
|
+
}),
|
|
436
|
+
h(VxeUICheckboxComponent, {
|
|
437
|
+
modelValue: defaultOptions.isFooter,
|
|
438
|
+
disabled: !storeData.hasFooter,
|
|
439
|
+
title: getI18n('vxe.export.expFooterTitle'),
|
|
440
|
+
content: getI18n('vxe.export.expOptFooter'),
|
|
441
|
+
'onUpdate:modelValue' (value: any) {
|
|
442
|
+
defaultOptions.isFooter = value
|
|
443
|
+
}
|
|
444
|
+
}),
|
|
445
|
+
h(VxeUICheckboxComponent, {
|
|
446
|
+
modelValue: isHeader ? defaultOptions.isTitle : false,
|
|
447
|
+
disabled: !isHeader,
|
|
448
|
+
title: getI18n('vxe.export.expTitleTitle'),
|
|
449
|
+
content: getI18n('vxe.export.expOptTitle'),
|
|
450
|
+
'onUpdate:modelValue' (value: any) {
|
|
451
|
+
defaultOptions.isTitle = value
|
|
452
|
+
}
|
|
453
|
+
}),
|
|
454
|
+
h(VxeUICheckboxComponent, {
|
|
455
|
+
modelValue: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
|
|
456
|
+
title: getI18n('vxe.export.expColgroupTitle'),
|
|
457
|
+
disabled: !isHeader || !hasColgroup || !supportMerge,
|
|
458
|
+
content: getI18n('vxe.export.expOptColgroup'),
|
|
459
|
+
'onUpdate:modelValue' (value: any) {
|
|
460
|
+
defaultOptions.isColgroup = value
|
|
461
|
+
}
|
|
462
|
+
})
|
|
463
|
+
]
|
|
464
|
+
: []),
|
|
446
465
|
h('div', {
|
|
447
466
|
class: 'vxe-table-export--panel-option-row'
|
|
448
|
-
},
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
})
|
|
482
|
-
]),
|
|
467
|
+
}, VxeUICheckboxComponent
|
|
468
|
+
? [
|
|
469
|
+
h(VxeUICheckboxComponent, {
|
|
470
|
+
modelValue: hasEmptyData ? false : defaultOptions.original,
|
|
471
|
+
disabled: hasEmptyData,
|
|
472
|
+
title: getI18n('vxe.export.expOriginalTitle'),
|
|
473
|
+
content: getI18n('vxe.export.expOptOriginal'),
|
|
474
|
+
'onUpdate:modelValue' (value: any) {
|
|
475
|
+
defaultOptions.original = value
|
|
476
|
+
}
|
|
477
|
+
}),
|
|
478
|
+
h(VxeUICheckboxComponent, {
|
|
479
|
+
modelValue: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
|
|
480
|
+
title: getI18n('vxe.export.expMergeTitle'),
|
|
481
|
+
disabled: hasEmptyData || !hasMerge || !supportMerge || !checkedAll,
|
|
482
|
+
content: getI18n('vxe.export.expOptMerge'),
|
|
483
|
+
'onUpdate:modelValue' (value: any) {
|
|
484
|
+
defaultOptions.isMerge = value
|
|
485
|
+
}
|
|
486
|
+
}),
|
|
487
|
+
isPrint
|
|
488
|
+
? renderEmptyElement($xeTable)
|
|
489
|
+
: h(VxeUICheckboxComponent, {
|
|
490
|
+
modelValue: supportStyle ? defaultOptions.useStyle : false,
|
|
491
|
+
disabled: !supportStyle,
|
|
492
|
+
title: getI18n('vxe.export.expUseStyleTitle'),
|
|
493
|
+
content: getI18n('vxe.export.expOptUseStyle'),
|
|
494
|
+
'onUpdate:modelValue' (value: any) {
|
|
495
|
+
defaultOptions.useStyle = value
|
|
496
|
+
}
|
|
497
|
+
})
|
|
498
|
+
]
|
|
499
|
+
: []),
|
|
483
500
|
h('div', {
|
|
484
501
|
class: 'vxe-table-export--panel-option-row'
|
|
485
|
-
},
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
: renderEmptyElement($xeTable)
|
|
508
|
-
])
|
|
502
|
+
}, VxeUICheckboxComponent
|
|
503
|
+
? [
|
|
504
|
+
h(VxeUICheckboxComponent, {
|
|
505
|
+
modelValue: hasTree ? defaultOptions.isTreeAllExpanded : false,
|
|
506
|
+
disabled: hasEmptyData || !hasTree,
|
|
507
|
+
title: getI18n('vxe.export.expTreeAllExpandTitle'),
|
|
508
|
+
content: getI18n('vxe.export.expOptTreeAllExpand'),
|
|
509
|
+
'onUpdate:modelValue' (value: any) {
|
|
510
|
+
defaultOptions.isTreeAllExpanded = value
|
|
511
|
+
}
|
|
512
|
+
}),
|
|
513
|
+
h(VxeUICheckboxComponent, {
|
|
514
|
+
modelValue: hasRowGroup ? defaultOptions.isRowGroupAllExpanded : false,
|
|
515
|
+
disabled: hasEmptyData || !hasRowGroup,
|
|
516
|
+
title: getI18n('vxe.export.expRowGroupAllExpandTitle'),
|
|
517
|
+
content: getI18n('vxe.export.expOptRowGroupAllExpand'),
|
|
518
|
+
'onUpdate:modelValue' (value: any) {
|
|
519
|
+
defaultOptions.isRowGroupAllExpanded = value
|
|
520
|
+
}
|
|
521
|
+
})
|
|
522
|
+
]
|
|
523
|
+
: [])
|
|
509
524
|
])
|
|
510
525
|
])
|
|
511
526
|
]
|
|
@@ -3,7 +3,7 @@ import XEUtils from 'xe-utils'
|
|
|
3
3
|
import { VxeUI } from '../../../ui'
|
|
4
4
|
import { isColumnInfo, getCellValue, createHandleGetRowId } from '../../src/util'
|
|
5
5
|
import { parseFile, formatText, eqEmptyValue } from '../../../ui/src/utils'
|
|
6
|
-
import { hasClass } from '../../../ui/src/dom'
|
|
6
|
+
import { hasClass, toCssUnit } from '../../../ui/src/dom'
|
|
7
7
|
import { createHtmlPage, getExportBlobByContent } from './util'
|
|
8
8
|
import { createComponentLog } from '../../../ui/src/log'
|
|
9
9
|
|
|
@@ -714,48 +714,129 @@ hooks.add('tableExportModule', {
|
|
|
714
714
|
return isEllipsis
|
|
715
715
|
}
|
|
716
716
|
|
|
717
|
+
const getCustomColKey = (conf: VxeTableDefines.ColumnInfo<any> | VxeTablePropTypes.ExportOrPrintColumnOption) => {
|
|
718
|
+
return `${conf.field || ''}:${conf.type || ''}`
|
|
719
|
+
}
|
|
720
|
+
|
|
717
721
|
const toHtml = (opts: VxeTablePropTypes.ExportHandleOptions, columns: VxeTableDefines.ColumnInfo[], datas: any[]) => {
|
|
718
722
|
const { id, border, treeConfig, headerAlign: allHeaderAlign, align: allAlign, footerAlign: allFooterAlign, showOverflow: allColumnOverflow, showHeaderOverflow: allColumnHeaderOverflow } = props
|
|
719
723
|
const { isAllSelected, isIndeterminate } = reactData
|
|
720
724
|
const { mergeBodyCellMaps, mergeFooterCellMaps } = internalData
|
|
721
725
|
const treeOpts = computeTreeOpts.value
|
|
722
|
-
const { print: isPrint, isHeader, isFooter, isColgroup, isMerge, colgroups, original } = opts
|
|
726
|
+
const { print: isPrint, widthMode, isHeader, isFooter, isColgroup, isMerge, colgroups, _columnConfs, original } = opts
|
|
727
|
+
const isAutoWidth = widthMode === 'auto'
|
|
728
|
+
const isScaleWidth = widthMode === 'scale'
|
|
729
|
+
const isDefaultWidth = !isAutoWidth && !isScaleWidth
|
|
730
|
+
|
|
731
|
+
const customWidthMaps: Record<string, number | string> = {}
|
|
732
|
+
if (_columnConfs) {
|
|
733
|
+
_columnConfs.forEach(conf => {
|
|
734
|
+
if (!isColumnInfo(conf)) {
|
|
735
|
+
if ((conf.field || conf.type) && conf.width) {
|
|
736
|
+
customWidthMaps[getCustomColKey(conf)] = conf.width
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
})
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
// 计算宽度
|
|
743
|
+
const colWidthMaps: Record<string, number> = {}
|
|
744
|
+
const printWidthMaps: Record<string, number> = {}
|
|
745
|
+
if (isPrint) {
|
|
746
|
+
let tableWidth = 0
|
|
747
|
+
columns.forEach(column => {
|
|
748
|
+
tableWidth += column.renderWidth
|
|
749
|
+
})
|
|
750
|
+
if (colgroups) {
|
|
751
|
+
colgroups.forEach((cols) => {
|
|
752
|
+
cols.forEach((column: any) => {
|
|
753
|
+
if (!column.childNodes || !column.childNodes.length) {
|
|
754
|
+
return
|
|
755
|
+
}
|
|
756
|
+
let childWidth = 0
|
|
757
|
+
let countChild = 0
|
|
758
|
+
XEUtils.eachTree([column], item => {
|
|
759
|
+
if (!item.childNodes || !column.childNodes.length) {
|
|
760
|
+
countChild++
|
|
761
|
+
}
|
|
762
|
+
const ptWidth = printWidthMaps[item.id]
|
|
763
|
+
childWidth += ptWidth || 0
|
|
764
|
+
}, { children: 'childNodes' })
|
|
765
|
+
const colWidth = childWidth - countChild
|
|
766
|
+
colWidthMaps[column.id] = colWidth
|
|
767
|
+
printWidthMaps[column.id] = XEUtils.floor(colWidth / tableWidth * 180, 2)
|
|
768
|
+
})
|
|
769
|
+
})
|
|
770
|
+
}
|
|
771
|
+
columns.forEach(column => {
|
|
772
|
+
const colWidth = column.renderWidth
|
|
773
|
+
if (column.width) {
|
|
774
|
+
colWidthMaps[column.id] = colWidth
|
|
775
|
+
}
|
|
776
|
+
printWidthMaps[column.id] = XEUtils.floor(colWidth / tableWidth * 180, 2)
|
|
777
|
+
})
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
const getHeaderWidthStyle = (column: VxeTableDefines.ColumnInfo) => {
|
|
781
|
+
const cmColKey = getCustomColKey(column)
|
|
782
|
+
const cmWidthMaps = customWidthMaps[cmColKey]
|
|
783
|
+
if (cmWidthMaps) {
|
|
784
|
+
return 'width:' + toCssUnit(cmWidthMaps)
|
|
785
|
+
}
|
|
786
|
+
if (isAutoWidth) {
|
|
787
|
+
return ''
|
|
788
|
+
}
|
|
789
|
+
if (isScaleWidth) {
|
|
790
|
+
return printWidthMaps[column.id] ? ('width:' + printWidthMaps[column.id] + 'mm') : ''
|
|
791
|
+
}
|
|
792
|
+
return colWidthMaps[column.id] ? ('width:' + toCssUnit(colWidthMaps[column.id])) : ''
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
const getCellWidthStyle = (column: VxeTableDefines.ColumnInfo) => {
|
|
796
|
+
const cmColKey = getCustomColKey(column)
|
|
797
|
+
const cmWidthMaps = customWidthMaps[cmColKey]
|
|
798
|
+
if (cmWidthMaps) {
|
|
799
|
+
return 'width:' + toCssUnit(cmWidthMaps)
|
|
800
|
+
}
|
|
801
|
+
if (isAutoWidth || isDefaultWidth) {
|
|
802
|
+
return ''
|
|
803
|
+
}
|
|
804
|
+
if (isScaleWidth) {
|
|
805
|
+
return printWidthMaps[column.id] ? ('width:' + printWidthMaps[column.id] + 'mm') : ''
|
|
806
|
+
}
|
|
807
|
+
return colWidthMaps[column.id] ? ('width:' + toCssUnit(colWidthMaps[column.id])) : ''
|
|
808
|
+
}
|
|
809
|
+
|
|
723
810
|
const allCls = 'check-all'
|
|
724
811
|
const clss = [
|
|
725
812
|
'vxe-table',
|
|
726
813
|
`border--${toTableBorder(border)}`,
|
|
727
814
|
isPrint ? 'is--print' : '',
|
|
815
|
+
isAutoWidth ? 'is--auto-width' : '',
|
|
816
|
+
isScaleWidth ? 'is--scale-width' : '',
|
|
817
|
+
isDefaultWidth ? 'is--default-width' : '',
|
|
728
818
|
isHeader ? 'is--header' : ''
|
|
729
819
|
].filter(cls => cls)
|
|
730
820
|
const tables = [
|
|
731
821
|
`<table class="${clss.join(' ')}" border="0" cellspacing="0" cellpadding="0">`,
|
|
732
|
-
`<colgroup>${columns.map((column
|
|
822
|
+
`<colgroup>${columns.map((column) => `<col style="${getHeaderWidthStyle(column)}">`).join('')}</colgroup>`
|
|
733
823
|
]
|
|
734
824
|
if (isHeader) {
|
|
735
825
|
tables.push('<thead>')
|
|
736
826
|
if (isColgroup && !original) {
|
|
737
|
-
colgroups.forEach((cols
|
|
827
|
+
colgroups.forEach((cols) => {
|
|
738
828
|
tables.push(
|
|
739
829
|
`<tr>${cols.map((column: any) => {
|
|
740
830
|
const headAlign = column.headerAlign || column.align || allHeaderAlign || allAlign
|
|
741
831
|
const classNames = hasEllipsis(column, 'showHeaderOverflow', allColumnHeaderOverflow) ? ['col--ellipsis'] : []
|
|
742
832
|
const cellTitle = getHeaderTitle(opts, column)
|
|
743
|
-
let childWidth = 0
|
|
744
|
-
let countChild = 0
|
|
745
|
-
XEUtils.eachTree([column], item => {
|
|
746
|
-
if (!item.childNodes || !column.childNodes.length) {
|
|
747
|
-
countChild++
|
|
748
|
-
}
|
|
749
|
-
childWidth += item.renderWidth
|
|
750
|
-
}, { children: 'childNodes' })
|
|
751
|
-
const cellWidth = childWidth - countChild
|
|
752
833
|
if (headAlign) {
|
|
753
834
|
classNames.push(`col--${headAlign}`)
|
|
754
835
|
}
|
|
755
836
|
if (column.type === 'checkbox') {
|
|
756
|
-
return `<th class="${classNames.join(' ')}" colspan="${column._colSpan}" rowspan="${column._rowSpan}"><div
|
|
837
|
+
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>`
|
|
757
838
|
}
|
|
758
|
-
return `<th class="${classNames.join(' ')}" colspan="${column._colSpan}" rowspan="${column._rowSpan}" title="${cellTitle}"><div
|
|
839
|
+
return `<th class="${classNames.join(' ')}" colspan="${column._colSpan}" rowspan="${column._rowSpan}" title="${cellTitle}"><div style="${getCellWidthStyle(column)}"><span>${formatText(cellTitle, true)}</span></div></th>`
|
|
759
840
|
}).join('')}</tr>`
|
|
760
841
|
)
|
|
761
842
|
})
|
|
@@ -769,9 +850,9 @@ hooks.add('tableExportModule', {
|
|
|
769
850
|
classNames.push(`col--${headAlign}`)
|
|
770
851
|
}
|
|
771
852
|
if (column.type === 'checkbox') {
|
|
772
|
-
return `<th class="${classNames.join(' ')}"><div
|
|
853
|
+
return `<th class="${classNames.join(' ')}"><div style="${getCellWidthStyle(column)}"><input type="checkbox" class="${allCls}" ${isAllSelected ? 'checked' : ''}><span>${cellTitle}</span></div></th>`
|
|
773
854
|
}
|
|
774
|
-
return `<th class="${classNames.join(' ')}" title="${cellTitle}"><div
|
|
855
|
+
return `<th class="${classNames.join(' ')}" title="${cellTitle}"><div style="${getCellWidthStyle(column)}"><span>${formatText(cellTitle, true)}</span></div></th>`
|
|
775
856
|
}).join('')}</tr>`
|
|
776
857
|
)
|
|
777
858
|
}
|
|
@@ -797,18 +878,18 @@ hooks.add('tableExportModule', {
|
|
|
797
878
|
}
|
|
798
879
|
classNames.push('vxe-table--tree-node')
|
|
799
880
|
if (column.type === 'radio') {
|
|
800
|
-
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div
|
|
881
|
+
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>`
|
|
801
882
|
} else if (column.type === 'checkbox') {
|
|
802
|
-
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div
|
|
883
|
+
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>`
|
|
803
884
|
}
|
|
804
|
-
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div
|
|
885
|
+
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>`
|
|
805
886
|
}
|
|
806
887
|
if (column.type === 'radio') {
|
|
807
|
-
return `<td class="${classNames.join(' ')}"><div
|
|
888
|
+
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>`
|
|
808
889
|
} else if (column.type === 'checkbox') {
|
|
809
|
-
return `<td class="${classNames.join(' ')}"><div
|
|
890
|
+
return `<td class="${classNames.join(' ')}"><div style="${getCellWidthStyle(column)}"><input type="checkbox" ${item._checkboxDisabled ? 'disabled ' : ''}${getBooleanValue(cellValue) ? 'checked' : ''}><span>${item._checkboxLabel}</span></div></td>`
|
|
810
891
|
}
|
|
811
|
-
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div
|
|
892
|
+
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div style="${getCellWidthStyle(column)}">${formatText(cellValue, true)}</div></td>`
|
|
812
893
|
}).join('') + '</tr>'
|
|
813
894
|
)
|
|
814
895
|
})
|
|
@@ -842,11 +923,11 @@ hooks.add('tableExportModule', {
|
|
|
842
923
|
classNames.push(`col--${cellAlign}`)
|
|
843
924
|
}
|
|
844
925
|
if (column.type === 'radio') {
|
|
845
|
-
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}"><div
|
|
926
|
+
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>`
|
|
846
927
|
} else if (column.type === 'checkbox') {
|
|
847
|
-
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}"><div
|
|
928
|
+
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>`
|
|
848
929
|
}
|
|
849
|
-
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div
|
|
930
|
+
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div style="${getCellWidthStyle(column)}">${formatText(cellValue, true)}</div></td>`
|
|
850
931
|
}).join('') + '</tr>'
|
|
851
932
|
)
|
|
852
933
|
})
|
|
@@ -886,7 +967,7 @@ hooks.add('tableExportModule', {
|
|
|
886
967
|
if (footAlign) {
|
|
887
968
|
classNames.push(`col--${footAlign}`)
|
|
888
969
|
}
|
|
889
|
-
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div
|
|
970
|
+
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div style="${getCellWidthStyle(column)}">${formatText(cellValue, true)}</div></td>`
|
|
890
971
|
}).join('')}</tr>`
|
|
891
972
|
)
|
|
892
973
|
})
|
|
@@ -1307,6 +1388,9 @@ hooks.add('tableExportModule', {
|
|
|
1307
1388
|
if (!typeList.some(item => item.value === type)) {
|
|
1308
1389
|
exportParams.type = typeList[0].value
|
|
1309
1390
|
}
|
|
1391
|
+
if (!exportParams.widthMode) {
|
|
1392
|
+
exportParams.widthMode = ''
|
|
1393
|
+
}
|
|
1310
1394
|
initStore.export = true
|
|
1311
1395
|
return nextTick()
|
|
1312
1396
|
}
|
|
@@ -1395,7 +1479,7 @@ hooks.add('tableExportModule', {
|
|
|
1395
1479
|
return isChecked
|
|
1396
1480
|
}, { children: 'children', mapChildren: 'childNodes', original: true })
|
|
1397
1481
|
}
|
|
1398
|
-
const handleOptions: VxeTablePropTypes.ExportHandleOptions = Object.assign({ } as { data: any[], colgroups: any[], columns: any[] }, opts, { filename: '', sheetName: '' })
|
|
1482
|
+
const handleOptions: VxeTablePropTypes.ExportHandleOptions = Object.assign({ } as { data: any[], colgroups: any[], columns: any[] }, opts, { filename: '', sheetName: '', _columnConfs: columns })
|
|
1399
1483
|
// 如果设置源数据,则默认导出设置了字段的列
|
|
1400
1484
|
if (!isCustomCol && !columnFilterMethod) {
|
|
1401
1485
|
columnFilterMethod = ({ column }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { VxeTablePropTypes } from '../../../../types'
|
|
2
2
|
|
|
3
3
|
// 默认导出或打印的 HTML 样式
|
|
4
|
-
const defaultHtmlStyle = 'body{
|
|
4
|
+
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}'
|
|
5
5
|
|
|
6
6
|
export function getExportBlobByContent (content: string, options: { type: string }) {
|
|
7
7
|
return new Blob([content], { type: `text/${options.type};charset=utf-8;` })
|
|
@@ -163,7 +163,7 @@ export default defineVxeComponent({
|
|
|
163
163
|
const cellOverflow = XEUtils.eqNull(showOverflow) ? allShowOverflow : showOverflow
|
|
164
164
|
const showEllipsis = cellOverflow === 'ellipsis'
|
|
165
165
|
const showTitle = cellOverflow === 'title'
|
|
166
|
-
const showTooltip = cellOverflow === true
|
|
166
|
+
const showTooltip = cellOverflow === true ? tooltipOpts.mode === 'tooltip' : cellOverflow === 'tooltip'
|
|
167
167
|
const hasEllipsis = isAllOverflow || showTitle || showTooltip || showEllipsis
|
|
168
168
|
const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable))
|
|
169
169
|
const isCsHeight = !!customCellHeight
|
|
@@ -76,7 +76,7 @@ export default defineVxeComponent({
|
|
|
76
76
|
const footAlign = footerAlign || (compConf ? compConf.tableFooterCellAlign : '') || allFooterAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign
|
|
77
77
|
const showEllipsis = footOverflow === 'ellipsis'
|
|
78
78
|
const showTitle = footOverflow === 'title'
|
|
79
|
-
const showTooltip = footOverflow === true
|
|
79
|
+
const showTooltip = footOverflow === true ? footerTooltipOpts.mode === 'tooltip' : footOverflow === 'tooltip'
|
|
80
80
|
const hasEllipsis = showTitle || showTooltip || showEllipsis
|
|
81
81
|
const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable))
|
|
82
82
|
const attrs: any = { colid }
|
|
@@ -29,7 +29,7 @@ export default defineVxeComponent({
|
|
|
29
29
|
const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods)
|
|
30
30
|
|
|
31
31
|
const { xID, props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable
|
|
32
|
-
const { computeColumnOpts, computeColumnDragOpts, computeCellOpts, computeMouseOpts, computeHeaderCellOpts, computeDefaultRowHeight, computeVirtualXOpts, computeFloatingFilterOpts, computeIsHeaderRenderOptimize } = $xeTable.getComputeMaps()
|
|
32
|
+
const { computeColumnOpts, computeColumnDragOpts, computeCellOpts, computeMouseOpts, computeHeaderCellOpts, computeDefaultRowHeight, computeVirtualXOpts, computeFloatingFilterOpts, computeIsHeaderRenderOptimize, computeHeaderTooltipOpts } = $xeTable.getComputeMaps()
|
|
33
33
|
|
|
34
34
|
const headerColumn = ref<VxeTableDefines.ColumnInfo[][]>([])
|
|
35
35
|
|
|
@@ -69,6 +69,7 @@ export default defineVxeComponent({
|
|
|
69
69
|
const virtualXOpts = computeVirtualXOpts.value
|
|
70
70
|
const columnOpts = computeColumnOpts.value
|
|
71
71
|
const columnDragOpts = computeColumnDragOpts.value
|
|
72
|
+
const headerTooltipOpts = computeHeaderTooltipOpts.value
|
|
72
73
|
const cellOpts = computeCellOpts.value
|
|
73
74
|
const defaultRowHeight = computeDefaultRowHeight.value
|
|
74
75
|
const headerCellOpts = computeHeaderCellOpts.value
|
|
@@ -89,7 +90,7 @@ export default defineVxeComponent({
|
|
|
89
90
|
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign
|
|
90
91
|
const showEllipsis = headOverflow === 'ellipsis'
|
|
91
92
|
const showTitle = headOverflow === 'title'
|
|
92
|
-
const showTooltip = headOverflow === true
|
|
93
|
+
const showTooltip = headOverflow === true ? headerTooltipOpts.mode === 'tooltip' : headOverflow === 'tooltip'
|
|
93
94
|
const hasEllipsis = showTitle || showTooltip || showEllipsis
|
|
94
95
|
let hasFilter = false
|
|
95
96
|
let firstFilterOption: VxeTableDefines.FilterOption | null = null
|
|
@@ -262,6 +263,7 @@ export default defineVxeComponent({
|
|
|
262
263
|
const { showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign } = tableProps
|
|
263
264
|
const { currentColumn, overflowX } = tableReactData
|
|
264
265
|
const { fullColumnIdData } = tableInternalData
|
|
266
|
+
const headerTooltipOpts = computeHeaderTooltipOpts.value
|
|
265
267
|
const cellOpts = computeCellOpts.value
|
|
266
268
|
const defaultRowHeight = computeDefaultRowHeight.value
|
|
267
269
|
const headerCellOpts = computeHeaderCellOpts.value
|
|
@@ -284,7 +286,7 @@ export default defineVxeComponent({
|
|
|
284
286
|
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign
|
|
285
287
|
const showEllipsis = headOverflow === 'ellipsis'
|
|
286
288
|
const showTitle = headOverflow === 'title'
|
|
287
|
-
const showTooltip = headOverflow === true
|
|
289
|
+
const showTooltip = headOverflow === true ? headerTooltipOpts.mode === 'tooltip' : headOverflow === 'tooltip'
|
|
288
290
|
const hasEllipsis = showTitle || showTooltip || showEllipsis
|
|
289
291
|
let hasFilter = false
|
|
290
292
|
let firstFilterOption: VxeTableDefines.FilterOption | null = null
|