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
|
@@ -34,6 +34,13 @@ export default defineVxeComponent({
|
|
|
34
34
|
const xButtonConfirm = ref();
|
|
35
35
|
const xInputFilename = ref();
|
|
36
36
|
const xInputSheetname = ref();
|
|
37
|
+
const computeColWidthModeOptions = computed(() => {
|
|
38
|
+
return [
|
|
39
|
+
{ value: '', label: getI18n('vxe.export.wdModes.default') },
|
|
40
|
+
{ value: 'auto', label: getI18n('vxe.export.wdModes.auto') },
|
|
41
|
+
{ value: 'scale', label: getI18n('vxe.export.wdModes.scale') }
|
|
42
|
+
];
|
|
43
|
+
});
|
|
37
44
|
const computeCheckedAll = computed(() => {
|
|
38
45
|
const { storeData } = props;
|
|
39
46
|
return storeData.columns.every((column) => column.checked);
|
|
@@ -158,6 +165,7 @@ export default defineVxeComponent({
|
|
|
158
165
|
const showSheet = computeShowSheet.value;
|
|
159
166
|
const supportMerge = computeSupportMerge.value;
|
|
160
167
|
const supportStyle = computeSupportStyle.value;
|
|
168
|
+
const colWidthModeOptions = computeColWidthModeOptions.value;
|
|
161
169
|
// const supportGroup = computeSupportGroup.value
|
|
162
170
|
const slots = defaultOptions.slots || {};
|
|
163
171
|
const topSlot = slots.top;
|
|
@@ -358,6 +366,22 @@ export default defineVxeComponent({
|
|
|
358
366
|
])
|
|
359
367
|
])
|
|
360
368
|
]),
|
|
369
|
+
isPrint
|
|
370
|
+
? h('tr', [
|
|
371
|
+
h('td', getI18n('vxe.export.widthMode')),
|
|
372
|
+
h('td', [
|
|
373
|
+
VxeUISelectComponent
|
|
374
|
+
? h(VxeUISelectComponent, {
|
|
375
|
+
modelValue: defaultOptions.widthMode,
|
|
376
|
+
options: colWidthModeOptions,
|
|
377
|
+
'onUpdate:modelValue'(value) {
|
|
378
|
+
defaultOptions.widthMode = value;
|
|
379
|
+
}
|
|
380
|
+
})
|
|
381
|
+
: renderEmptyElement($xeTable)
|
|
382
|
+
])
|
|
383
|
+
])
|
|
384
|
+
: renderEmptyElement($xeTable),
|
|
361
385
|
h('tr', [
|
|
362
386
|
h('td', getI18n('vxe.export.expOpts')),
|
|
363
387
|
parameterSlot
|
|
@@ -369,9 +393,9 @@ export default defineVxeComponent({
|
|
|
369
393
|
: h('td', [
|
|
370
394
|
h('div', {
|
|
371
395
|
class: 'vxe-table-export--panel-option-row'
|
|
372
|
-
},
|
|
373
|
-
|
|
374
|
-
|
|
396
|
+
}, VxeUICheckboxComponent
|
|
397
|
+
? [
|
|
398
|
+
h(VxeUICheckboxComponent, {
|
|
375
399
|
modelValue: hasEmptyData || isHeader,
|
|
376
400
|
disabled: hasEmptyData,
|
|
377
401
|
title: getI18n('vxe.export.expHeaderTitle'),
|
|
@@ -379,10 +403,8 @@ export default defineVxeComponent({
|
|
|
379
403
|
'onUpdate:modelValue'(value) {
|
|
380
404
|
defaultOptions.isHeader = value;
|
|
381
405
|
}
|
|
382
|
-
})
|
|
383
|
-
|
|
384
|
-
VxeUICheckboxComponent
|
|
385
|
-
? h(VxeUICheckboxComponent, {
|
|
406
|
+
}),
|
|
407
|
+
h(VxeUICheckboxComponent, {
|
|
386
408
|
modelValue: defaultOptions.isFooter,
|
|
387
409
|
disabled: !storeData.hasFooter,
|
|
388
410
|
title: getI18n('vxe.export.expFooterTitle'),
|
|
@@ -390,10 +412,8 @@ export default defineVxeComponent({
|
|
|
390
412
|
'onUpdate:modelValue'(value) {
|
|
391
413
|
defaultOptions.isFooter = value;
|
|
392
414
|
}
|
|
393
|
-
})
|
|
394
|
-
|
|
395
|
-
VxeUICheckboxComponent
|
|
396
|
-
? h(VxeUICheckboxComponent, {
|
|
415
|
+
}),
|
|
416
|
+
h(VxeUICheckboxComponent, {
|
|
397
417
|
modelValue: isHeader ? defaultOptions.isTitle : false,
|
|
398
418
|
disabled: !isHeader,
|
|
399
419
|
title: getI18n('vxe.export.expTitleTitle'),
|
|
@@ -401,10 +421,8 @@ export default defineVxeComponent({
|
|
|
401
421
|
'onUpdate:modelValue'(value) {
|
|
402
422
|
defaultOptions.isTitle = value;
|
|
403
423
|
}
|
|
404
|
-
})
|
|
405
|
-
|
|
406
|
-
VxeUICheckboxComponent
|
|
407
|
-
? h(VxeUICheckboxComponent, {
|
|
424
|
+
}),
|
|
425
|
+
h(VxeUICheckboxComponent, {
|
|
408
426
|
modelValue: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
|
|
409
427
|
title: getI18n('vxe.export.expColgroupTitle'),
|
|
410
428
|
disabled: !isHeader || !hasColgroup || !supportMerge,
|
|
@@ -413,13 +431,13 @@ export default defineVxeComponent({
|
|
|
413
431
|
defaultOptions.isColgroup = value;
|
|
414
432
|
}
|
|
415
433
|
})
|
|
416
|
-
|
|
417
|
-
|
|
434
|
+
]
|
|
435
|
+
: []),
|
|
418
436
|
h('div', {
|
|
419
437
|
class: 'vxe-table-export--panel-option-row'
|
|
420
|
-
},
|
|
421
|
-
|
|
422
|
-
|
|
438
|
+
}, VxeUICheckboxComponent
|
|
439
|
+
? [
|
|
440
|
+
h(VxeUICheckboxComponent, {
|
|
423
441
|
modelValue: hasEmptyData ? false : defaultOptions.original,
|
|
424
442
|
disabled: hasEmptyData,
|
|
425
443
|
title: getI18n('vxe.export.expOriginalTitle'),
|
|
@@ -427,10 +445,8 @@ export default defineVxeComponent({
|
|
|
427
445
|
'onUpdate:modelValue'(value) {
|
|
428
446
|
defaultOptions.original = value;
|
|
429
447
|
}
|
|
430
|
-
})
|
|
431
|
-
|
|
432
|
-
VxeUICheckboxComponent
|
|
433
|
-
? h(VxeUICheckboxComponent, {
|
|
448
|
+
}),
|
|
449
|
+
h(VxeUICheckboxComponent, {
|
|
434
450
|
modelValue: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
|
|
435
451
|
title: getI18n('vxe.export.expMergeTitle'),
|
|
436
452
|
disabled: hasEmptyData || !hasMerge || !supportMerge || !checkedAll,
|
|
@@ -438,25 +454,25 @@ export default defineVxeComponent({
|
|
|
438
454
|
'onUpdate:modelValue'(value) {
|
|
439
455
|
defaultOptions.isMerge = value;
|
|
440
456
|
}
|
|
441
|
-
})
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
|
|
457
|
+
}),
|
|
458
|
+
isPrint
|
|
459
|
+
? renderEmptyElement($xeTable)
|
|
460
|
+
: h(VxeUICheckboxComponent, {
|
|
461
|
+
modelValue: supportStyle ? defaultOptions.useStyle : false,
|
|
462
|
+
disabled: !supportStyle,
|
|
463
|
+
title: getI18n('vxe.export.expUseStyleTitle'),
|
|
464
|
+
content: getI18n('vxe.export.expOptUseStyle'),
|
|
465
|
+
'onUpdate:modelValue'(value) {
|
|
466
|
+
defaultOptions.useStyle = value;
|
|
467
|
+
}
|
|
468
|
+
})
|
|
469
|
+
]
|
|
470
|
+
: []),
|
|
455
471
|
h('div', {
|
|
456
472
|
class: 'vxe-table-export--panel-option-row'
|
|
457
|
-
},
|
|
458
|
-
|
|
459
|
-
|
|
473
|
+
}, VxeUICheckboxComponent
|
|
474
|
+
? [
|
|
475
|
+
h(VxeUICheckboxComponent, {
|
|
460
476
|
modelValue: hasTree ? defaultOptions.isTreeAllExpanded : false,
|
|
461
477
|
disabled: hasEmptyData || !hasTree,
|
|
462
478
|
title: getI18n('vxe.export.expTreeAllExpandTitle'),
|
|
@@ -464,10 +480,8 @@ export default defineVxeComponent({
|
|
|
464
480
|
'onUpdate:modelValue'(value) {
|
|
465
481
|
defaultOptions.isTreeAllExpanded = value;
|
|
466
482
|
}
|
|
467
|
-
})
|
|
468
|
-
|
|
469
|
-
VxeUICheckboxComponent
|
|
470
|
-
? h(VxeUICheckboxComponent, {
|
|
483
|
+
}),
|
|
484
|
+
h(VxeUICheckboxComponent, {
|
|
471
485
|
modelValue: hasRowGroup ? defaultOptions.isRowGroupAllExpanded : false,
|
|
472
486
|
disabled: hasEmptyData || !hasRowGroup,
|
|
473
487
|
title: getI18n('vxe.export.expRowGroupAllExpandTitle'),
|
|
@@ -476,8 +490,8 @@ export default defineVxeComponent({
|
|
|
476
490
|
defaultOptions.isRowGroupAllExpanded = value;
|
|
477
491
|
}
|
|
478
492
|
})
|
|
479
|
-
|
|
480
|
-
|
|
493
|
+
]
|
|
494
|
+
: [])
|
|
481
495
|
])
|
|
482
496
|
])
|
|
483
497
|
]
|
|
@@ -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
|
const { warnLog, errLog } = createComponentLog('table');
|
|
@@ -666,22 +666,106 @@ hooks.add('tableExportModule', {
|
|
|
666
666
|
}
|
|
667
667
|
return isEllipsis;
|
|
668
668
|
};
|
|
669
|
+
const getCustomColKey = (conf) => {
|
|
670
|
+
return `${conf.field || ''}:${conf.type || ''}`;
|
|
671
|
+
};
|
|
669
672
|
const toHtml = (opts, columns, datas) => {
|
|
670
673
|
const { id, border, treeConfig, headerAlign: allHeaderAlign, align: allAlign, footerAlign: allFooterAlign, showOverflow: allColumnOverflow, showHeaderOverflow: allColumnHeaderOverflow } = props;
|
|
671
674
|
const { isAllSelected, isIndeterminate } = reactData;
|
|
672
675
|
const { mergeBodyCellMaps, mergeFooterCellMaps } = internalData;
|
|
673
676
|
const treeOpts = computeTreeOpts.value;
|
|
674
|
-
const { print: isPrint, isHeader, isFooter, isColgroup, isMerge, colgroups, original } = opts;
|
|
677
|
+
const { print: isPrint, widthMode, isHeader, isFooter, isColgroup, isMerge, colgroups, _columnConfs, original } = opts;
|
|
678
|
+
const isAutoWidth = widthMode === 'auto';
|
|
679
|
+
const isScaleWidth = widthMode === 'scale';
|
|
680
|
+
const isDefaultWidth = !isAutoWidth && !isScaleWidth;
|
|
681
|
+
const customWidthMaps = {};
|
|
682
|
+
if (_columnConfs) {
|
|
683
|
+
_columnConfs.forEach(conf => {
|
|
684
|
+
if (!isColumnInfo(conf)) {
|
|
685
|
+
if ((conf.field || conf.type) && conf.width) {
|
|
686
|
+
customWidthMaps[getCustomColKey(conf)] = conf.width;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
// 计算宽度
|
|
692
|
+
const colWidthMaps = {};
|
|
693
|
+
const printWidthMaps = {};
|
|
694
|
+
if (isPrint) {
|
|
695
|
+
let tableWidth = 0;
|
|
696
|
+
columns.forEach(column => {
|
|
697
|
+
tableWidth += column.renderWidth;
|
|
698
|
+
});
|
|
699
|
+
if (colgroups) {
|
|
700
|
+
colgroups.forEach((cols) => {
|
|
701
|
+
cols.forEach((column) => {
|
|
702
|
+
if (!column.childNodes || !column.childNodes.length) {
|
|
703
|
+
return;
|
|
704
|
+
}
|
|
705
|
+
let childWidth = 0;
|
|
706
|
+
let countChild = 0;
|
|
707
|
+
XEUtils.eachTree([column], item => {
|
|
708
|
+
if (!item.childNodes || !column.childNodes.length) {
|
|
709
|
+
countChild++;
|
|
710
|
+
}
|
|
711
|
+
const ptWidth = printWidthMaps[item.id];
|
|
712
|
+
childWidth += ptWidth || 0;
|
|
713
|
+
}, { children: 'childNodes' });
|
|
714
|
+
const colWidth = childWidth - countChild;
|
|
715
|
+
colWidthMaps[column.id] = colWidth;
|
|
716
|
+
printWidthMaps[column.id] = XEUtils.floor(colWidth / tableWidth * 180, 2);
|
|
717
|
+
});
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
columns.forEach(column => {
|
|
721
|
+
const colWidth = column.renderWidth;
|
|
722
|
+
if (column.width) {
|
|
723
|
+
colWidthMaps[column.id] = colWidth;
|
|
724
|
+
}
|
|
725
|
+
printWidthMaps[column.id] = XEUtils.floor(colWidth / tableWidth * 180, 2);
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
const getHeaderWidthStyle = (column) => {
|
|
729
|
+
const cmColKey = getCustomColKey(column);
|
|
730
|
+
const cmWidthMaps = customWidthMaps[cmColKey];
|
|
731
|
+
if (cmWidthMaps) {
|
|
732
|
+
return 'width:' + toCssUnit(cmWidthMaps);
|
|
733
|
+
}
|
|
734
|
+
if (isAutoWidth) {
|
|
735
|
+
return '';
|
|
736
|
+
}
|
|
737
|
+
if (isScaleWidth) {
|
|
738
|
+
return printWidthMaps[column.id] ? ('width:' + printWidthMaps[column.id] + 'mm') : '';
|
|
739
|
+
}
|
|
740
|
+
return colWidthMaps[column.id] ? ('width:' + toCssUnit(colWidthMaps[column.id])) : '';
|
|
741
|
+
};
|
|
742
|
+
const getCellWidthStyle = (column) => {
|
|
743
|
+
const cmColKey = getCustomColKey(column);
|
|
744
|
+
const cmWidthMaps = customWidthMaps[cmColKey];
|
|
745
|
+
if (cmWidthMaps) {
|
|
746
|
+
return 'width:' + toCssUnit(cmWidthMaps);
|
|
747
|
+
}
|
|
748
|
+
if (isAutoWidth || isDefaultWidth) {
|
|
749
|
+
return '';
|
|
750
|
+
}
|
|
751
|
+
if (isScaleWidth) {
|
|
752
|
+
return printWidthMaps[column.id] ? ('width:' + printWidthMaps[column.id] + 'mm') : '';
|
|
753
|
+
}
|
|
754
|
+
return colWidthMaps[column.id] ? ('width:' + toCssUnit(colWidthMaps[column.id])) : '';
|
|
755
|
+
};
|
|
675
756
|
const allCls = 'check-all';
|
|
676
757
|
const clss = [
|
|
677
758
|
'vxe-table',
|
|
678
759
|
`border--${toTableBorder(border)}`,
|
|
679
760
|
isPrint ? 'is--print' : '',
|
|
761
|
+
isAutoWidth ? 'is--auto-width' : '',
|
|
762
|
+
isScaleWidth ? 'is--scale-width' : '',
|
|
763
|
+
isDefaultWidth ? 'is--default-width' : '',
|
|
680
764
|
isHeader ? 'is--header' : ''
|
|
681
765
|
].filter(cls => cls);
|
|
682
766
|
const tables = [
|
|
683
767
|
`<table class="${clss.join(' ')}" border="0" cellspacing="0" cellpadding="0">`,
|
|
684
|
-
`<colgroup>${columns.map((column) => `<col style="
|
|
768
|
+
`<colgroup>${columns.map((column) => `<col style="${getHeaderWidthStyle(column)}">`).join('')}</colgroup>`
|
|
685
769
|
];
|
|
686
770
|
if (isHeader) {
|
|
687
771
|
tables.push('<thead>');
|
|
@@ -691,22 +775,13 @@ hooks.add('tableExportModule', {
|
|
|
691
775
|
const headAlign = column.headerAlign || column.align || allHeaderAlign || allAlign;
|
|
692
776
|
const classNames = hasEllipsis(column, 'showHeaderOverflow', allColumnHeaderOverflow) ? ['col--ellipsis'] : [];
|
|
693
777
|
const cellTitle = getHeaderTitle(opts, column);
|
|
694
|
-
let childWidth = 0;
|
|
695
|
-
let countChild = 0;
|
|
696
|
-
XEUtils.eachTree([column], item => {
|
|
697
|
-
if (!item.childNodes || !column.childNodes.length) {
|
|
698
|
-
countChild++;
|
|
699
|
-
}
|
|
700
|
-
childWidth += item.renderWidth;
|
|
701
|
-
}, { children: 'childNodes' });
|
|
702
|
-
const cellWidth = childWidth - countChild;
|
|
703
778
|
if (headAlign) {
|
|
704
779
|
classNames.push(`col--${headAlign}`);
|
|
705
780
|
}
|
|
706
781
|
if (column.type === 'checkbox') {
|
|
707
|
-
return `<th class="${classNames.join(' ')}" colspan="${column._colSpan}" rowspan="${column._rowSpan}"><div
|
|
782
|
+
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>`;
|
|
708
783
|
}
|
|
709
|
-
return `<th class="${classNames.join(' ')}" colspan="${column._colSpan}" rowspan="${column._rowSpan}" title="${cellTitle}"><div
|
|
784
|
+
return `<th class="${classNames.join(' ')}" colspan="${column._colSpan}" rowspan="${column._rowSpan}" title="${cellTitle}"><div style="${getCellWidthStyle(column)}"><span>${formatText(cellTitle, true)}</span></div></th>`;
|
|
710
785
|
}).join('')}</tr>`);
|
|
711
786
|
});
|
|
712
787
|
}
|
|
@@ -719,9 +794,9 @@ hooks.add('tableExportModule', {
|
|
|
719
794
|
classNames.push(`col--${headAlign}`);
|
|
720
795
|
}
|
|
721
796
|
if (column.type === 'checkbox') {
|
|
722
|
-
return `<th class="${classNames.join(' ')}"><div
|
|
797
|
+
return `<th class="${classNames.join(' ')}"><div style="${getCellWidthStyle(column)}"><input type="checkbox" class="${allCls}" ${isAllSelected ? 'checked' : ''}><span>${cellTitle}</span></div></th>`;
|
|
723
798
|
}
|
|
724
|
-
return `<th class="${classNames.join(' ')}" title="${cellTitle}"><div
|
|
799
|
+
return `<th class="${classNames.join(' ')}" title="${cellTitle}"><div style="${getCellWidthStyle(column)}"><span>${formatText(cellTitle, true)}</span></div></th>`;
|
|
725
800
|
}).join('')}</tr>`);
|
|
726
801
|
}
|
|
727
802
|
tables.push('</thead>');
|
|
@@ -745,20 +820,20 @@ hooks.add('tableExportModule', {
|
|
|
745
820
|
}
|
|
746
821
|
classNames.push('vxe-table--tree-node');
|
|
747
822
|
if (column.type === 'radio') {
|
|
748
|
-
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div
|
|
823
|
+
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>`;
|
|
749
824
|
}
|
|
750
825
|
else if (column.type === 'checkbox') {
|
|
751
|
-
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div
|
|
826
|
+
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>`;
|
|
752
827
|
}
|
|
753
|
-
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div
|
|
828
|
+
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>`;
|
|
754
829
|
}
|
|
755
830
|
if (column.type === 'radio') {
|
|
756
|
-
return `<td class="${classNames.join(' ')}"><div
|
|
831
|
+
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>`;
|
|
757
832
|
}
|
|
758
833
|
else if (column.type === 'checkbox') {
|
|
759
|
-
return `<td class="${classNames.join(' ')}"><div
|
|
834
|
+
return `<td class="${classNames.join(' ')}"><div style="${getCellWidthStyle(column)}"><input type="checkbox" ${item._checkboxDisabled ? 'disabled ' : ''}${getBooleanValue(cellValue) ? 'checked' : ''}><span>${item._checkboxLabel}</span></div></td>`;
|
|
760
835
|
}
|
|
761
|
-
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div
|
|
836
|
+
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div style="${getCellWidthStyle(column)}">${formatText(cellValue, true)}</div></td>`;
|
|
762
837
|
}).join('') + '</tr>');
|
|
763
838
|
});
|
|
764
839
|
}
|
|
@@ -791,12 +866,12 @@ hooks.add('tableExportModule', {
|
|
|
791
866
|
classNames.push(`col--${cellAlign}`);
|
|
792
867
|
}
|
|
793
868
|
if (column.type === 'radio') {
|
|
794
|
-
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}"><div
|
|
869
|
+
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>`;
|
|
795
870
|
}
|
|
796
871
|
else if (column.type === 'checkbox') {
|
|
797
|
-
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}"><div
|
|
872
|
+
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>`;
|
|
798
873
|
}
|
|
799
|
-
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div
|
|
874
|
+
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div style="${getCellWidthStyle(column)}">${formatText(cellValue, true)}</div></td>`;
|
|
800
875
|
}).join('') + '</tr>');
|
|
801
876
|
});
|
|
802
877
|
}
|
|
@@ -834,7 +909,7 @@ hooks.add('tableExportModule', {
|
|
|
834
909
|
if (footAlign) {
|
|
835
910
|
classNames.push(`col--${footAlign}`);
|
|
836
911
|
}
|
|
837
|
-
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div
|
|
912
|
+
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div style="${getCellWidthStyle(column)}">${formatText(cellValue, true)}</div></td>`;
|
|
838
913
|
}).join('')}</tr>`);
|
|
839
914
|
});
|
|
840
915
|
tables.push('</tfoot>');
|
|
@@ -1249,6 +1324,9 @@ hooks.add('tableExportModule', {
|
|
|
1249
1324
|
if (!typeList.some(item => item.value === type)) {
|
|
1250
1325
|
exportParams.type = typeList[0].value;
|
|
1251
1326
|
}
|
|
1327
|
+
if (!exportParams.widthMode) {
|
|
1328
|
+
exportParams.widthMode = '';
|
|
1329
|
+
}
|
|
1252
1330
|
initStore.export = true;
|
|
1253
1331
|
return nextTick();
|
|
1254
1332
|
};
|
|
@@ -1335,7 +1413,7 @@ hooks.add('tableExportModule', {
|
|
|
1335
1413
|
return isChecked;
|
|
1336
1414
|
}, { children: 'children', mapChildren: 'childNodes', original: true });
|
|
1337
1415
|
}
|
|
1338
|
-
const handleOptions = Object.assign({}, opts, { filename: '', sheetName: '' });
|
|
1416
|
+
const handleOptions = Object.assign({}, opts, { filename: '', sheetName: '', _columnConfs: columns });
|
|
1339
1417
|
// 如果设置源数据,则默认导出设置了字段的列
|
|
1340
1418
|
if (!isCustomCol && !columnFilterMethod) {
|
|
1341
1419
|
columnFilterMethod = ({ column }) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// 默认导出或打印的 HTML 样式
|
|
2
|
-
const defaultHtmlStyle = 'body{
|
|
2
|
+
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}';
|
|
3
3
|
export function getExportBlobByContent(content, options) {
|
|
4
4
|
return new Blob([content], { type: `text/${options.type};charset=utf-8;` });
|
|
5
5
|
}
|
package/es/table/src/body.js
CHANGED
|
@@ -139,7 +139,7 @@ export default defineVxeComponent({
|
|
|
139
139
|
const cellOverflow = XEUtils.eqNull(showOverflow) ? allShowOverflow : showOverflow;
|
|
140
140
|
const showEllipsis = cellOverflow === 'ellipsis';
|
|
141
141
|
const showTitle = cellOverflow === 'title';
|
|
142
|
-
const showTooltip = cellOverflow === true
|
|
142
|
+
const showTooltip = cellOverflow === true ? tooltipOpts.mode === 'tooltip' : cellOverflow === 'tooltip';
|
|
143
143
|
const hasEllipsis = isAllOverflow || showTitle || showTooltip || showEllipsis;
|
|
144
144
|
const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable));
|
|
145
145
|
const isCsHeight = !!customCellHeight;
|
package/es/table/src/footer.js
CHANGED
|
@@ -66,7 +66,7 @@ export default defineVxeComponent({
|
|
|
66
66
|
const footAlign = footerAlign || (compConf ? compConf.tableFooterCellAlign : '') || allFooterAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
67
67
|
const showEllipsis = footOverflow === 'ellipsis';
|
|
68
68
|
const showTitle = footOverflow === 'title';
|
|
69
|
-
const showTooltip = footOverflow === true
|
|
69
|
+
const showTooltip = footOverflow === true ? footerTooltipOpts.mode === 'tooltip' : footOverflow === 'tooltip';
|
|
70
70
|
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
71
71
|
const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable));
|
|
72
72
|
const attrs = { colid };
|
package/es/table/src/header.js
CHANGED
|
@@ -23,7 +23,7 @@ export default defineVxeComponent({
|
|
|
23
23
|
setup(props) {
|
|
24
24
|
const $xeTable = inject('$xeTable', {});
|
|
25
25
|
const { xID, props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
|
|
26
|
-
const { computeColumnOpts, computeColumnDragOpts, computeCellOpts, computeMouseOpts, computeHeaderCellOpts, computeDefaultRowHeight, computeVirtualXOpts, computeFloatingFilterOpts, computeIsHeaderRenderOptimize } = $xeTable.getComputeMaps();
|
|
26
|
+
const { computeColumnOpts, computeColumnDragOpts, computeCellOpts, computeMouseOpts, computeHeaderCellOpts, computeDefaultRowHeight, computeVirtualXOpts, computeFloatingFilterOpts, computeIsHeaderRenderOptimize, computeHeaderTooltipOpts } = $xeTable.getComputeMaps();
|
|
27
27
|
const headerColumn = ref([]);
|
|
28
28
|
const refElem = ref();
|
|
29
29
|
const refHeaderScroll = ref();
|
|
@@ -58,6 +58,7 @@ export default defineVxeComponent({
|
|
|
58
58
|
const virtualXOpts = computeVirtualXOpts.value;
|
|
59
59
|
const columnOpts = computeColumnOpts.value;
|
|
60
60
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
61
|
+
const headerTooltipOpts = computeHeaderTooltipOpts.value;
|
|
61
62
|
const cellOpts = computeCellOpts.value;
|
|
62
63
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
63
64
|
const headerCellOpts = computeHeaderCellOpts.value;
|
|
@@ -77,7 +78,7 @@ export default defineVxeComponent({
|
|
|
77
78
|
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
78
79
|
const showEllipsis = headOverflow === 'ellipsis';
|
|
79
80
|
const showTitle = headOverflow === 'title';
|
|
80
|
-
const showTooltip = headOverflow === true
|
|
81
|
+
const showTooltip = headOverflow === true ? headerTooltipOpts.mode === 'tooltip' : headOverflow === 'tooltip';
|
|
81
82
|
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
82
83
|
let hasFilter = false;
|
|
83
84
|
let firstFilterOption = null;
|
|
@@ -237,6 +238,7 @@ export default defineVxeComponent({
|
|
|
237
238
|
const { showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign } = tableProps;
|
|
238
239
|
const { currentColumn, overflowX } = tableReactData;
|
|
239
240
|
const { fullColumnIdData } = tableInternalData;
|
|
241
|
+
const headerTooltipOpts = computeHeaderTooltipOpts.value;
|
|
240
242
|
const cellOpts = computeCellOpts.value;
|
|
241
243
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
242
244
|
const headerCellOpts = computeHeaderCellOpts.value;
|
|
@@ -258,7 +260,7 @@ export default defineVxeComponent({
|
|
|
258
260
|
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
259
261
|
const showEllipsis = headOverflow === 'ellipsis';
|
|
260
262
|
const showTitle = headOverflow === 'title';
|
|
261
|
-
const showTooltip = headOverflow === true
|
|
263
|
+
const showTooltip = headOverflow === true ? headerTooltipOpts.mode === 'tooltip' : headOverflow === 'tooltip';
|
|
262
264
|
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
263
265
|
let hasFilter = false;
|
|
264
266
|
let firstFilterOption = null;
|
package/es/table/src/table.js
CHANGED
|
@@ -14672,35 +14672,35 @@ export default defineVxeComponent({
|
|
|
14672
14672
|
$xeTable.preventEvent(null, 'unmounted', { $table: $xeTable });
|
|
14673
14673
|
});
|
|
14674
14674
|
nextTick(() => {
|
|
14675
|
+
const { showOverflow, showHeaderOverflow, showFooterOverflow } = props;
|
|
14676
|
+
const tooltipOpts = computeTooltipOpts.value;
|
|
14677
|
+
const headerTooltipOpts = computeHeaderTooltipOpts.value;
|
|
14678
|
+
const footerTooltipOpts = computeFooterTooltipOpts.value;
|
|
14675
14679
|
if (props.loading) {
|
|
14676
14680
|
if (!VxeUILoadingComponent && !slots.loading) {
|
|
14677
|
-
errLog('vxe.error.errProp', ['loading=true', 'loading=false | <template #loading>...</template>']);
|
|
14678
14681
|
errLog('vxe.error.reqComp', ['vxe-loading']);
|
|
14682
|
+
errLog('vxe.error.errProp', ['loading=true', 'loading=false | <template #loading>...</template>']);
|
|
14679
14683
|
}
|
|
14680
14684
|
}
|
|
14681
|
-
if (
|
|
14682
|
-
(
|
|
14683
|
-
(
|
|
14684
|
-
|
|
14685
|
-
|
|
14686
|
-
|
|
14687
|
-
|
|
14688
|
-
|
|
14689
|
-
|
|
14690
|
-
|
|
14691
|
-
|
|
14692
|
-
|
|
14693
|
-
|
|
14694
|
-
|
|
14695
|
-
|
|
14696
|
-
|
|
14697
|
-
|
|
14698
|
-
|
|
14699
|
-
|
|
14700
|
-
if (props.showFooterOverflow === 'tooltip') {
|
|
14701
|
-
errLog('vxe.error.errProp', ['show-footer-overflow=tooltip', 'show-footer-overflow=title']);
|
|
14702
|
-
}
|
|
14703
|
-
errLog('vxe.error.reqComp', ['vxe-tooltip']);
|
|
14685
|
+
if (!VxeUITooltipComponent) {
|
|
14686
|
+
errLog('vxe.error.reqComp', ['vxe-tooltip']);
|
|
14687
|
+
if (showOverflow === 'tooltip') {
|
|
14688
|
+
errLog('vxe.error.errProp', ['show-overflow=' + showOverflow, 'show-overflow=false,title,ellipsis']);
|
|
14689
|
+
}
|
|
14690
|
+
if (showOverflow === true && tooltipOpts.mode === 'tooltip') {
|
|
14691
|
+
errLog('vxe.error.notSupportProp', ['show-overflow=' + showOverflow, 'tooltip-config.mode=tooltip', 'tooltip-config.mode=title,ellipsis']);
|
|
14692
|
+
}
|
|
14693
|
+
if (showHeaderOverflow === 'tooltip') {
|
|
14694
|
+
errLog('vxe.error.errProp', ['show-header-overflow=' + showHeaderOverflow, 'show-header-overflow=false,title,ellipsis']);
|
|
14695
|
+
}
|
|
14696
|
+
if (showHeaderOverflow === true && headerTooltipOpts.mode === 'tooltip') {
|
|
14697
|
+
errLog('vxe.error.notSupportProp', ['show-header-overflow=' + showHeaderOverflow, 'header-tooltip-config.mode=tooltip', 'header-tooltip-config.mode=title,ellipsis']);
|
|
14698
|
+
}
|
|
14699
|
+
if (showFooterOverflow === 'tooltip') {
|
|
14700
|
+
errLog('vxe.error.errProp', ['show-footer-overflow=' + showFooterOverflow, 'show-footer-overflow=false,title,ellipsis']);
|
|
14701
|
+
}
|
|
14702
|
+
if (showFooterOverflow === true && footerTooltipOpts.mode === 'tooltip') {
|
|
14703
|
+
errLog('vxe.error.notSupportProp', ['show-footer-overflow=' + showFooterOverflow, 'footer-tooltip-config.mode=tooltip', 'footer-tooltip-config.mode=title,ellipsis']);
|
|
14704
14704
|
}
|
|
14705
14705
|
}
|
|
14706
14706
|
});
|
package/es/table/src/util.js
CHANGED
package/es/ui/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VxeUI } from '@vxe-ui/core';
|
|
2
2
|
import { getFuncText } from './src/utils';
|
|
3
|
-
export const version = "4.20.
|
|
3
|
+
export const version = "4.20.3";
|
|
4
4
|
VxeUI.version = version;
|
|
5
5
|
VxeUI.tableVersion = version;
|
|
6
6
|
VxeUI.setConfig({
|
|
@@ -66,6 +66,7 @@ VxeUI.setConfig({
|
|
|
66
66
|
strict: true
|
|
67
67
|
},
|
|
68
68
|
tooltipConfig: {
|
|
69
|
+
mode: 'tooltip',
|
|
69
70
|
enterable: true,
|
|
70
71
|
defaultPlacement: 'top'
|
|
71
72
|
},
|
package/es/ui/src/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VxeUI } from '@vxe-ui/core';
|
|
2
2
|
const { log } = VxeUI;
|
|
3
|
-
const tableVersion = `table v${"4.20.
|
|
3
|
+
const tableVersion = `table v${"4.20.3"}`;
|
|
4
4
|
export function createComponentLog(name) {
|
|
5
5
|
const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
|
|
6
6
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|