vxe-table 3.22.2 → 3.22.4
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/es/locale/lang/ar-EG.js +7 -0
- package/es/locale/lang/de-DE.js +7 -0
- package/es/locale/lang/en-US.js +7 -0
- 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 +7 -0
- 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 +7 -0
- package/es/style.css +1 -1
- package/es/table/module/export/export-panel.js +384 -335
- package/es/table/module/export/mixin.js +106 -28
- 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/methods.js +30 -12
- 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.umd.js +210 -87
- 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 +7 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +7 -0
- 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 +7 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +7 -0
- 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 +7 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +7 -0
- package/lib/style.css +1 -1
- package/lib/table/module/export/export-panel.js +50 -22
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +106 -28
- package/lib/table/module/export/mixin.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 +5 -3
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +7 -7
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +28 -22
- 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 +7 -0
- 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 +7 -0
- 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 +7 -0
- package/packages/table/module/export/export-panel.ts +383 -333
- package/packages/table/module/export/mixin.ts +130 -46
- 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/methods.ts +38 -17
- package/packages/table/src/table.ts +24 -24
- package/packages/table/src/util.ts +3 -2
- package/packages/ui/index.ts +1 -0
- /package/es/{iconfont.1784122379007.ttf → iconfont.1784366371085.ttf} +0 -0
- /package/es/{iconfont.1784122379007.woff → iconfont.1784366371085.woff} +0 -0
- /package/es/{iconfont.1784122379007.woff2 → iconfont.1784366371085.woff2} +0 -0
- /package/lib/{iconfont.1784122379007.ttf → iconfont.1784366371085.ttf} +0 -0
- /package/lib/{iconfont.1784122379007.woff → iconfont.1784366371085.woff} +0 -0
- /package/lib/{iconfont.1784122379007.woff2 → iconfont.1784366371085.woff2} +0 -0
|
@@ -2,7 +2,7 @@ import XEUtils from 'xe-utils';
|
|
|
2
2
|
import { VxeUI } from '../../../ui';
|
|
3
3
|
import { isColumnInfo, getCellValue, createHandleGetRowId } from '../../src/util';
|
|
4
4
|
import { parseFile, formatText, eqEmptyValue } from '../../../ui/src/utils';
|
|
5
|
-
import { hasClass } from '../../../ui/src/dom';
|
|
5
|
+
import { hasClass, toCssUnit } from '../../../ui/src/dom';
|
|
6
6
|
import { createHtmlPage, getExportBlobByContent } from './util';
|
|
7
7
|
import { createComponentLog } from '../../../ui/src/log';
|
|
8
8
|
const { warnLog, errLog } = createComponentLog('table');
|
|
@@ -473,6 +473,9 @@ function hasEllipsis($xeTable, column, property, allColumnOverflow) {
|
|
|
473
473
|
}
|
|
474
474
|
return isEllipsis;
|
|
475
475
|
}
|
|
476
|
+
function getCustomColKey(conf) {
|
|
477
|
+
return `${conf.field || ''}:${conf.type || ''}`;
|
|
478
|
+
}
|
|
476
479
|
function toHtml($xeTable, opts, columns, datas) {
|
|
477
480
|
const props = $xeTable;
|
|
478
481
|
const reactData = $xeTable;
|
|
@@ -481,17 +484,98 @@ function toHtml($xeTable, opts, columns, datas) {
|
|
|
481
484
|
const { isAllSelected, isIndeterminate } = reactData;
|
|
482
485
|
const { mergeBodyCellMaps, mergeFooterCellMaps } = internalData;
|
|
483
486
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
484
|
-
const { print: isPrint, isHeader, isFooter, isColgroup, isMerge, colgroups, original } = opts;
|
|
487
|
+
const { print: isPrint, widthMode, isHeader, isFooter, isColgroup, isMerge, colgroups, _columnConfs, original } = opts;
|
|
488
|
+
const isAutoWidth = widthMode === 'auto';
|
|
489
|
+
const isScaleWidth = widthMode === 'scale';
|
|
490
|
+
const isDefaultWidth = !isAutoWidth && !isScaleWidth;
|
|
491
|
+
const customWidthMaps = {};
|
|
492
|
+
if (_columnConfs) {
|
|
493
|
+
_columnConfs.forEach(conf => {
|
|
494
|
+
if (!isColumnInfo(conf)) {
|
|
495
|
+
if ((conf.field || conf.type) && conf.width) {
|
|
496
|
+
customWidthMaps[getCustomColKey(conf)] = conf.width;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
// 计算宽度
|
|
502
|
+
const colWidthMaps = {};
|
|
503
|
+
const printWidthMaps = {};
|
|
504
|
+
if (isPrint) {
|
|
505
|
+
let tableWidth = 0;
|
|
506
|
+
columns.forEach(column => {
|
|
507
|
+
tableWidth += column.renderWidth;
|
|
508
|
+
});
|
|
509
|
+
if (colgroups) {
|
|
510
|
+
colgroups.forEach((cols) => {
|
|
511
|
+
cols.forEach((column) => {
|
|
512
|
+
if (!column.childNodes || !column.childNodes.length) {
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
let childWidth = 0;
|
|
516
|
+
let countChild = 0;
|
|
517
|
+
XEUtils.eachTree([column], item => {
|
|
518
|
+
if (!item.childNodes || !column.childNodes.length) {
|
|
519
|
+
countChild++;
|
|
520
|
+
}
|
|
521
|
+
const ptWidth = printWidthMaps[item.id];
|
|
522
|
+
childWidth += ptWidth || 0;
|
|
523
|
+
}, { children: 'childNodes' });
|
|
524
|
+
const colWidth = childWidth - countChild;
|
|
525
|
+
colWidthMaps[column.id] = colWidth;
|
|
526
|
+
printWidthMaps[column.id] = XEUtils.floor(colWidth / tableWidth * 180, 2);
|
|
527
|
+
});
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
columns.forEach(column => {
|
|
531
|
+
const colWidth = column.renderWidth;
|
|
532
|
+
if (column.width) {
|
|
533
|
+
colWidthMaps[column.id] = colWidth;
|
|
534
|
+
}
|
|
535
|
+
printWidthMaps[column.id] = XEUtils.floor(colWidth / tableWidth * 180, 2);
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
const getHeaderWidthStyle = (column) => {
|
|
539
|
+
const cmColKey = getCustomColKey(column);
|
|
540
|
+
const cmWidthMaps = customWidthMaps[cmColKey];
|
|
541
|
+
if (cmWidthMaps) {
|
|
542
|
+
return 'width:' + toCssUnit(cmWidthMaps);
|
|
543
|
+
}
|
|
544
|
+
if (isAutoWidth) {
|
|
545
|
+
return '';
|
|
546
|
+
}
|
|
547
|
+
if (isScaleWidth) {
|
|
548
|
+
return printWidthMaps[column.id] ? ('width:' + printWidthMaps[column.id] + 'mm') : '';
|
|
549
|
+
}
|
|
550
|
+
return colWidthMaps[column.id] ? ('width:' + toCssUnit(colWidthMaps[column.id])) : '';
|
|
551
|
+
};
|
|
552
|
+
const getCellWidthStyle = (column) => {
|
|
553
|
+
const cmColKey = getCustomColKey(column);
|
|
554
|
+
const cmWidthMaps = customWidthMaps[cmColKey];
|
|
555
|
+
if (cmWidthMaps) {
|
|
556
|
+
return 'width:' + toCssUnit(cmWidthMaps);
|
|
557
|
+
}
|
|
558
|
+
if (isAutoWidth || isDefaultWidth) {
|
|
559
|
+
return '';
|
|
560
|
+
}
|
|
561
|
+
if (isScaleWidth) {
|
|
562
|
+
return printWidthMaps[column.id] ? ('width:' + printWidthMaps[column.id] + 'mm') : '';
|
|
563
|
+
}
|
|
564
|
+
return colWidthMaps[column.id] ? ('width:' + toCssUnit(colWidthMaps[column.id])) : '';
|
|
565
|
+
};
|
|
485
566
|
const allCls = 'check-all';
|
|
486
567
|
const clss = [
|
|
487
568
|
'vxe-table',
|
|
488
569
|
`border--${toTableBorder(border)}`,
|
|
489
570
|
isPrint ? 'is--print' : '',
|
|
571
|
+
isAutoWidth ? 'is--auto-width' : '',
|
|
572
|
+
isScaleWidth ? 'is--scale-width' : '',
|
|
573
|
+
isDefaultWidth ? 'is--default-width' : '',
|
|
490
574
|
isHeader ? 'is--header' : ''
|
|
491
575
|
].filter(cls => cls);
|
|
492
576
|
const tables = [
|
|
493
577
|
`<table class="${clss.join(' ')}" border="0" cellspacing="0" cellpadding="0">`,
|
|
494
|
-
`<colgroup>${columns.map(column => `<col style="
|
|
578
|
+
`<colgroup>${columns.map((column) => `<col style="${getHeaderWidthStyle(column)}">`).join('')}</colgroup>`
|
|
495
579
|
];
|
|
496
580
|
if (isHeader) {
|
|
497
581
|
tables.push('<thead>');
|
|
@@ -501,22 +585,13 @@ function toHtml($xeTable, opts, columns, datas) {
|
|
|
501
585
|
const headAlign = column.headerAlign || column.align || allHeaderAlign || allAlign;
|
|
502
586
|
const classNames = hasEllipsis($xeTable, column, 'showHeaderOverflow', allColumnHeaderOverflow) ? ['col--ellipsis'] : [];
|
|
503
587
|
const cellTitle = getHeaderTitle($xeTable, opts, column);
|
|
504
|
-
let childWidth = 0;
|
|
505
|
-
let countChild = 0;
|
|
506
|
-
XEUtils.eachTree([column], item => {
|
|
507
|
-
if (!item.childNodes || !column.childNodes.length) {
|
|
508
|
-
countChild++;
|
|
509
|
-
}
|
|
510
|
-
childWidth += item.renderWidth;
|
|
511
|
-
}, { children: 'childNodes' });
|
|
512
|
-
const cellWidth = childWidth - countChild;
|
|
513
588
|
if (headAlign) {
|
|
514
589
|
classNames.push(`col--${headAlign}`);
|
|
515
590
|
}
|
|
516
591
|
if (column.type === 'checkbox') {
|
|
517
|
-
return `<th class="${classNames.join(' ')}" colspan="${column._colSpan}" rowspan="${column._rowSpan}"><div
|
|
592
|
+
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>`;
|
|
518
593
|
}
|
|
519
|
-
return `<th class="${classNames.join(' ')}" colspan="${column._colSpan}" rowspan="${column._rowSpan}" title="${cellTitle}"><div
|
|
594
|
+
return `<th class="${classNames.join(' ')}" colspan="${column._colSpan}" rowspan="${column._rowSpan}" title="${cellTitle}"><div style="${getCellWidthStyle(column)}"><span>${formatText(cellTitle, true)}</span></div></th>`;
|
|
520
595
|
}).join('')}</tr>`);
|
|
521
596
|
});
|
|
522
597
|
}
|
|
@@ -529,9 +604,9 @@ function toHtml($xeTable, opts, columns, datas) {
|
|
|
529
604
|
classNames.push(`col--${headAlign}`);
|
|
530
605
|
}
|
|
531
606
|
if (column.type === 'checkbox') {
|
|
532
|
-
return `<th class="${classNames.join(' ')}"><div
|
|
607
|
+
return `<th class="${classNames.join(' ')}"><div style="${getCellWidthStyle(column)}"><input type="checkbox" class="${allCls}" ${isAllSelected ? 'checked' : ''}><span>${cellTitle}</span></div></th>`;
|
|
533
608
|
}
|
|
534
|
-
return `<th class="${classNames.join(' ')}" title="${cellTitle}"><div
|
|
609
|
+
return `<th class="${classNames.join(' ')}" title="${cellTitle}"><div style="${getCellWidthStyle(column)}"><span>${formatText(cellTitle, true)}</span></div></th>`;
|
|
535
610
|
}).join('')}</tr>`);
|
|
536
611
|
}
|
|
537
612
|
tables.push('</thead>');
|
|
@@ -554,20 +629,20 @@ function toHtml($xeTable, opts, columns, datas) {
|
|
|
554
629
|
}
|
|
555
630
|
classNames.push('vxe-table--tree-node');
|
|
556
631
|
if (column.type === 'radio') {
|
|
557
|
-
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div
|
|
632
|
+
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>`;
|
|
558
633
|
}
|
|
559
634
|
else if (column.type === 'checkbox') {
|
|
560
|
-
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div
|
|
635
|
+
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>`;
|
|
561
636
|
}
|
|
562
|
-
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div
|
|
637
|
+
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>`;
|
|
563
638
|
}
|
|
564
639
|
if (column.type === 'radio') {
|
|
565
|
-
return `<td class="${classNames.join(' ')}"><div
|
|
640
|
+
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>`;
|
|
566
641
|
}
|
|
567
642
|
else if (column.type === 'checkbox') {
|
|
568
|
-
return `<td class="${classNames.join(' ')}"><div
|
|
643
|
+
return `<td class="${classNames.join(' ')}"><div style="${getCellWidthStyle(column)}"><input type="checkbox" ${item._checkboxDisabled ? 'disabled ' : ''}${getBooleanValue(cellValue) ? 'checked' : ''}><span>${item._checkboxLabel}</span></div></td>`;
|
|
569
644
|
}
|
|
570
|
-
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div
|
|
645
|
+
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div style="${getCellWidthStyle(column)}">${formatText(cellValue, true)}</div></td>`;
|
|
571
646
|
}).join('') + '</tr>');
|
|
572
647
|
});
|
|
573
648
|
}
|
|
@@ -601,12 +676,12 @@ function toHtml($xeTable, opts, columns, datas) {
|
|
|
601
676
|
classNames.push(`col--${cellAlign}`);
|
|
602
677
|
}
|
|
603
678
|
if (column.type === 'radio') {
|
|
604
|
-
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}"><div
|
|
679
|
+
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>`;
|
|
605
680
|
}
|
|
606
681
|
else if (column.type === 'checkbox') {
|
|
607
|
-
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}"><div
|
|
682
|
+
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>`;
|
|
608
683
|
}
|
|
609
|
-
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div
|
|
684
|
+
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div style="${getCellWidthStyle(column)}">${formatText(cellValue, true)}</div></td>`;
|
|
610
685
|
}).join('') + '</tr>');
|
|
611
686
|
});
|
|
612
687
|
}
|
|
@@ -644,7 +719,7 @@ function toHtml($xeTable, opts, columns, datas) {
|
|
|
644
719
|
if (footAlign) {
|
|
645
720
|
classNames.push(`col--${footAlign}`);
|
|
646
721
|
}
|
|
647
|
-
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div
|
|
722
|
+
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div style="${getCellWidthStyle(column)}">${formatText(cellValue, true)}</div></td>`;
|
|
648
723
|
}).join('')}</tr>`);
|
|
649
724
|
});
|
|
650
725
|
tables.push('</tfoot>');
|
|
@@ -653,7 +728,7 @@ function toHtml($xeTable, opts, columns, datas) {
|
|
|
653
728
|
// 是否半选状态
|
|
654
729
|
const script = !isAllSelected && isIndeterminate ? `<script>(function(){var a=document.querySelector(".${allCls}");if(a){a.indeterminate=true}})()</script>` : '';
|
|
655
730
|
tables.push('</table>', script);
|
|
656
|
-
return
|
|
731
|
+
return isAutoWidth ? tables.join('') : createHtmlPage(opts, tables.join(''));
|
|
657
732
|
}
|
|
658
733
|
function toXML($xeTable, opts, columns, datas) {
|
|
659
734
|
const reactData = $xeTable;
|
|
@@ -1216,6 +1291,9 @@ function handleExportAndPrint($xeTable, options, isPrint) {
|
|
|
1216
1291
|
if (!typeList.some(item => item.value === type)) {
|
|
1217
1292
|
exportParams.type = typeList[0].value;
|
|
1218
1293
|
}
|
|
1294
|
+
if (!exportParams.widthMode) {
|
|
1295
|
+
exportParams.widthMode = '';
|
|
1296
|
+
}
|
|
1219
1297
|
initStore.export = true;
|
|
1220
1298
|
return $xeTable.$nextTick();
|
|
1221
1299
|
}
|
|
@@ -1355,7 +1433,7 @@ export default {
|
|
|
1355
1433
|
return isChecked;
|
|
1356
1434
|
}, { children: 'children', mapChildren: 'childNodes', original: true });
|
|
1357
1435
|
}
|
|
1358
|
-
const handleOptions = Object.assign({}, opts, { filename: '', sheetName: '' });
|
|
1436
|
+
const handleOptions = Object.assign({}, opts, { filename: '', sheetName: '', _columnConfs: columns });
|
|
1359
1437
|
// 如果设置源数据,则默认导出设置了字段的列
|
|
1360
1438
|
if (!isCustomCol && !columnFilterMethod) {
|
|
1361
1439
|
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
|
@@ -122,7 +122,7 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
|
|
|
122
122
|
const cellOverflow = XEUtils.eqNull(showOverflow) ? allShowOverflow : showOverflow;
|
|
123
123
|
const showEllipsis = cellOverflow === 'ellipsis';
|
|
124
124
|
const showTitle = cellOverflow === 'title';
|
|
125
|
-
const showTooltip = cellOverflow === true
|
|
125
|
+
const showTooltip = cellOverflow === true ? tooltipOpts.mode === 'tooltip' : cellOverflow === 'tooltip';
|
|
126
126
|
const hasEllipsis = isAllOverflow || showTitle || showTooltip || showEllipsis;
|
|
127
127
|
const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable));
|
|
128
128
|
const isCsHeight = !!customCellHeight;
|
package/es/table/src/footer.js
CHANGED
|
@@ -41,7 +41,7 @@ function renderRows(h, _vm, isOptimizeMode, tableColumn, footerTableData, row, $
|
|
|
41
41
|
const footAlign = footerAlign || (compConf ? compConf.tableFooterCellAlign : '') || allFooterAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
42
42
|
const showEllipsis = footOverflow === 'ellipsis';
|
|
43
43
|
const showTitle = footOverflow === 'title';
|
|
44
|
-
const showTooltip = footOverflow === true
|
|
44
|
+
const showTooltip = footOverflow === true ? footerTooltipOpts.mode === 'tooltip' : footOverflow === 'tooltip';
|
|
45
45
|
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
46
46
|
const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable));
|
|
47
47
|
const attrs = { colid };
|
package/es/table/src/header.js
CHANGED
|
@@ -22,6 +22,7 @@ function renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, _rowIndex, co
|
|
|
22
22
|
const virtualXOpts = $xeTable.computeVirtualXOpts;
|
|
23
23
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
24
24
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
25
|
+
const headerTooltipOpts = $xeTable.computeHeaderTooltipOpts;
|
|
25
26
|
const cellOpts = $xeTable.computeCellOpts;
|
|
26
27
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
27
28
|
const headerCellOpts = $xeTable.computeHeaderCellOpts;
|
|
@@ -38,11 +39,11 @@ function renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, _rowIndex, co
|
|
|
38
39
|
const isColGroup = column.children && column.children.length;
|
|
39
40
|
const fixedHiddenColumn = overflowX && !isColGroup && (fixedType ? column.fixed !== fixedType : !!column.fixed);
|
|
40
41
|
const isPadding = XEUtils.isBoolean(headerCellOpts.padding) ? headerCellOpts.padding : cellOpts.padding;
|
|
41
|
-
const headOverflow = XEUtils.
|
|
42
|
+
const headOverflow = XEUtils.eqNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
42
43
|
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
43
44
|
const showEllipsis = headOverflow === 'ellipsis';
|
|
44
45
|
const showTitle = headOverflow === 'title';
|
|
45
|
-
const showTooltip = headOverflow === true
|
|
46
|
+
const showTooltip = headOverflow === true ? headerTooltipOpts.mode === 'tooltip' : headOverflow === 'tooltip';
|
|
46
47
|
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
47
48
|
let hasFilter = false;
|
|
48
49
|
let firstFilterOption = null;
|
|
@@ -214,6 +215,7 @@ function renderFilterRows(h, _vm, isOptimizeMode, cols) {
|
|
|
214
215
|
const { showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign } = tableProps;
|
|
215
216
|
const { currentColumn, overflowX } = tableReactData;
|
|
216
217
|
const { fullColumnIdData } = tableInternalData;
|
|
218
|
+
const headerTooltipOpts = $xeTable.computeHeaderTooltipOpts;
|
|
217
219
|
const cellOpts = $xeTable.computeCellOpts;
|
|
218
220
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
219
221
|
const headerCellOpts = $xeTable.computeHeaderCellOpts;
|
|
@@ -235,7 +237,7 @@ function renderFilterRows(h, _vm, isOptimizeMode, cols) {
|
|
|
235
237
|
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
236
238
|
const showEllipsis = headOverflow === 'ellipsis';
|
|
237
239
|
const showTitle = headOverflow === 'title';
|
|
238
|
-
const showTooltip = headOverflow === true
|
|
240
|
+
const showTooltip = headOverflow === true ? headerTooltipOpts.mode === 'tooltip' : headOverflow === 'tooltip';
|
|
239
241
|
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
240
242
|
let hasFilter = false;
|
|
241
243
|
let firstFilterOption = null;
|
package/es/table/src/methods.js
CHANGED
|
@@ -3,7 +3,7 @@ import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, wheelScrollLe
|
|
|
3
3
|
import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils';
|
|
4
4
|
import { VxeUI } from '../../ui';
|
|
5
5
|
import Cell from './cell';
|
|
6
|
-
import { getRowUniqueId, createRowId, clearTableAllStatus, getColumnList, toFilters, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getColReMinWidth, getColReMaxWidth, createHandleUpdateRowId, createHandleGetRowId, getRefElem, getCellRestHeight, getLastChildColumn, getRowMaxHeight, handleCustomStoreConfig } from './util';
|
|
6
|
+
import { getRowUniqueId, createRowId, clearTableAllStatus, getColumnList, toFilters, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getColReMinWidth, getColReMaxWidth, createHandleUpdateRowId, createHandleGetRowId, getRefElem, getCellRestHeight, getLastChildColumn, getRowMaxHeight, handleCustomStoreConfig, encodeRowid } from './util';
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
8
8
|
import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from '../../ui/src/anime';
|
|
9
9
|
import { createComponentLog } from '../../ui/src/log';
|
|
@@ -1320,7 +1320,8 @@ function handleDefaultSelectionChecked($xeTable) {
|
|
|
1320
1320
|
}
|
|
1321
1321
|
else if (checkRowKeys) {
|
|
1322
1322
|
const defSelection = [];
|
|
1323
|
-
checkRowKeys.forEach((
|
|
1323
|
+
checkRowKeys.forEach((rowKey) => {
|
|
1324
|
+
const rowid = encodeRowid(rowKey);
|
|
1324
1325
|
if (fullDataRowIdData[rowid]) {
|
|
1325
1326
|
defSelection.push(fullDataRowIdData[rowid].row);
|
|
1326
1327
|
}
|
|
@@ -1339,7 +1340,8 @@ function handleDefaultRadioChecked($xeTable) {
|
|
|
1339
1340
|
if (radioConfig) {
|
|
1340
1341
|
const { fullDataRowIdData } = internalData;
|
|
1341
1342
|
const radioOpts = $xeTable.computeRadioOpts;
|
|
1342
|
-
const { checkRowKey:
|
|
1343
|
+
const { checkRowKey: rowKey, reserve } = radioOpts;
|
|
1344
|
+
const rowid = rowKey ? encodeRowid(rowKey) : null;
|
|
1343
1345
|
if (rowid) {
|
|
1344
1346
|
if (fullDataRowIdData[rowid]) {
|
|
1345
1347
|
handleCheckedRadioRow($xeTable, fullDataRowIdData[rowid].row, true);
|
|
@@ -1367,7 +1369,8 @@ function handleDefaultRowExpand($xeTable) {
|
|
|
1367
1369
|
}
|
|
1368
1370
|
else if (expandRowKeys) {
|
|
1369
1371
|
const defExpandeds = [];
|
|
1370
|
-
expandRowKeys.forEach((
|
|
1372
|
+
expandRowKeys.forEach((rowKey) => {
|
|
1373
|
+
const rowid = encodeRowid(rowKey);
|
|
1371
1374
|
if (fullDataRowIdData[rowid]) {
|
|
1372
1375
|
defExpandeds.push(fullDataRowIdData[rowid].row);
|
|
1373
1376
|
}
|
|
@@ -1637,7 +1640,8 @@ const handleDefaultTreeExpand = ($xeTable) => {
|
|
|
1637
1640
|
}
|
|
1638
1641
|
else if (expandRowKeys) {
|
|
1639
1642
|
const defExpandeds = [];
|
|
1640
|
-
expandRowKeys.forEach((
|
|
1643
|
+
expandRowKeys.forEach((rowKey) => {
|
|
1644
|
+
const rowid = encodeRowid(rowKey);
|
|
1641
1645
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
1642
1646
|
if (rowRest) {
|
|
1643
1647
|
defExpandeds.push(rowRest.row);
|
|
@@ -8408,7 +8412,7 @@ const tableMethods = {
|
|
|
8408
8412
|
}
|
|
8409
8413
|
return handleCheckedCheckboxRow($xeTable, rows, checked, true);
|
|
8410
8414
|
},
|
|
8411
|
-
|
|
8415
|
+
setCheckboxRowByKey(keys, checked) {
|
|
8412
8416
|
const $xeTable = this;
|
|
8413
8417
|
const internalData = $xeTable;
|
|
8414
8418
|
const { fullAllDataRowIdData } = internalData;
|
|
@@ -8416,7 +8420,8 @@ const tableMethods = {
|
|
|
8416
8420
|
keys = [keys];
|
|
8417
8421
|
}
|
|
8418
8422
|
const rows = [];
|
|
8419
|
-
keys.forEach((
|
|
8423
|
+
keys.forEach((rowKey) => {
|
|
8424
|
+
const rowid = encodeRowid(rowKey);
|
|
8420
8425
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
8421
8426
|
if (rowRest) {
|
|
8422
8427
|
rows.push(rowRest.row);
|
|
@@ -8424,6 +8429,10 @@ const tableMethods = {
|
|
|
8424
8429
|
});
|
|
8425
8430
|
return handleCheckedCheckboxRow($xeTable, rows, checked, true);
|
|
8426
8431
|
},
|
|
8432
|
+
setCheckboxRowKey(keys, checked) {
|
|
8433
|
+
const $xeTable = this;
|
|
8434
|
+
return $xeTable.setCheckboxRowByKey(keys, checked);
|
|
8435
|
+
},
|
|
8427
8436
|
isCheckedByCheckboxRow(row) {
|
|
8428
8437
|
const $xeTable = this;
|
|
8429
8438
|
const reactData = $xeTable;
|
|
@@ -8437,7 +8446,7 @@ const tableMethods = {
|
|
|
8437
8446
|
}
|
|
8438
8447
|
return !!updateCheckboxFlag && !!selectCheckboxMaps[getRowid($xeTable, row)];
|
|
8439
8448
|
},
|
|
8440
|
-
isCheckedByCheckboxRowKey(
|
|
8449
|
+
isCheckedByCheckboxRowKey(rowKey) {
|
|
8441
8450
|
const $xeTable = this;
|
|
8442
8451
|
const reactData = $xeTable;
|
|
8443
8452
|
const internalData = $xeTable;
|
|
@@ -8445,6 +8454,7 @@ const tableMethods = {
|
|
|
8445
8454
|
const { fullAllDataRowIdData, selectCheckboxMaps } = internalData;
|
|
8446
8455
|
const checkboxOpts = $xeTable.computeCheckboxOpts;
|
|
8447
8456
|
const { checkField } = checkboxOpts;
|
|
8457
|
+
const rowid = encodeRowid(rowKey);
|
|
8448
8458
|
if (checkField) {
|
|
8449
8459
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
8450
8460
|
if (rowRest) {
|
|
@@ -8460,10 +8470,11 @@ const tableMethods = {
|
|
|
8460
8470
|
const { treeIndeterminateRowMaps } = internalData;
|
|
8461
8471
|
return !!treeIndeterminateRowMaps[getRowid($xeTable, row)] && !$xeTable.isCheckedByCheckboxRow(row);
|
|
8462
8472
|
},
|
|
8463
|
-
isIndeterminateByCheckboxRowKey(
|
|
8473
|
+
isIndeterminateByCheckboxRowKey(rowKey) {
|
|
8464
8474
|
const $xeTable = this;
|
|
8465
8475
|
const internalData = $xeTable;
|
|
8466
8476
|
const { treeIndeterminateRowMaps } = internalData;
|
|
8477
|
+
const rowid = encodeRowid(rowKey);
|
|
8467
8478
|
return !!treeIndeterminateRowMaps[rowid] && !$xeTable.isCheckedByCheckboxRowKey(rowid);
|
|
8468
8479
|
},
|
|
8469
8480
|
/**
|
|
@@ -9380,16 +9391,21 @@ const tableMethods = {
|
|
|
9380
9391
|
* 用于单选行,设置某一行为选中状态
|
|
9381
9392
|
* @param key 行主键
|
|
9382
9393
|
*/
|
|
9383
|
-
|
|
9394
|
+
setRadioByRowKey(rowKey) {
|
|
9384
9395
|
const $xeTable = this;
|
|
9385
9396
|
const internalData = $xeTable;
|
|
9386
9397
|
const { fullAllDataRowIdData } = internalData;
|
|
9398
|
+
const rowid = encodeRowid(rowKey);
|
|
9387
9399
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
9388
9400
|
if (rowRest) {
|
|
9389
9401
|
return handleCheckedRadioRow($xeTable, rowRest.row, true);
|
|
9390
9402
|
}
|
|
9391
9403
|
return $xeTable.$nextTick();
|
|
9392
9404
|
},
|
|
9405
|
+
setRadioRowKey(rowKey) {
|
|
9406
|
+
const $xeTable = this;
|
|
9407
|
+
return $xeTable.setRadioByRowKey(rowKey);
|
|
9408
|
+
},
|
|
9393
9409
|
/**
|
|
9394
9410
|
* 用于当前行,手动清空当前高亮的状态
|
|
9395
9411
|
*/
|
|
@@ -9412,8 +9428,10 @@ const tableMethods = {
|
|
|
9412
9428
|
* 用于单选行,手动清空用户的选择
|
|
9413
9429
|
*/
|
|
9414
9430
|
clearRadioRow() {
|
|
9415
|
-
|
|
9416
|
-
|
|
9431
|
+
const $xeTable = this;
|
|
9432
|
+
const reactData = $xeTable;
|
|
9433
|
+
reactData.selectRadioRow = null;
|
|
9434
|
+
return $xeTable.$nextTick();
|
|
9417
9435
|
},
|
|
9418
9436
|
/**
|
|
9419
9437
|
* 用于当前行,获取当前行的数据
|
package/es/table/src/table.js
CHANGED
|
@@ -1913,35 +1913,35 @@ export default {
|
|
|
1913
1913
|
// 使用已安装的组件,如果未安装则不渲染
|
|
1914
1914
|
const VxeUILoadingComponent = VxeUI.getComponent('VxeLoading');
|
|
1915
1915
|
const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip');
|
|
1916
|
+
const { showOverflow, showHeaderOverflow, showFooterOverflow } = props;
|
|
1917
|
+
const tooltipOpts = $xeTable.computeTooltipOpts;
|
|
1918
|
+
const headerTooltipOpts = $xeTable.computeHeaderTooltipOpts;
|
|
1919
|
+
const footerTooltipOpts = $xeTable.computeFooterTooltipOpts;
|
|
1916
1920
|
if (props.loading) {
|
|
1917
1921
|
if (!VxeUILoadingComponent && !this.$scopedSlots.loading) {
|
|
1918
|
-
errLog('vxe.error.errProp', ['loading=true', 'loading=false | <template #loading>...</template>']);
|
|
1919
1922
|
errLog('vxe.error.reqComp', ['vxe-loading']);
|
|
1923
|
+
errLog('vxe.error.errProp', ['loading=true', 'loading=false | <template #loading>...</template>']);
|
|
1920
1924
|
}
|
|
1921
1925
|
}
|
|
1922
|
-
if (
|
|
1923
|
-
(
|
|
1924
|
-
(
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
if (props.showFooterOverflow === 'tooltip') {
|
|
1942
|
-
errLog('vxe.error.errProp', ['show-footer-overflow=tooltip', 'show-footer-overflow=title']);
|
|
1943
|
-
}
|
|
1944
|
-
errLog('vxe.error.reqComp', ['vxe-tooltip']);
|
|
1926
|
+
if (!VxeUITooltipComponent) {
|
|
1927
|
+
errLog('vxe.error.reqComp', ['vxe-tooltip']);
|
|
1928
|
+
if (showOverflow === 'tooltip') {
|
|
1929
|
+
errLog('vxe.error.errProp', ['show-overflow=' + showOverflow, 'show-overflow=false,title,ellipsis']);
|
|
1930
|
+
}
|
|
1931
|
+
if (showOverflow === true && tooltipOpts.mode === 'tooltip') {
|
|
1932
|
+
errLog('vxe.error.notSupportProp', ['show-overflow=' + showOverflow, 'tooltip-config.mode=tooltip', 'tooltip-config.mode=title,ellipsis']);
|
|
1933
|
+
}
|
|
1934
|
+
if (showHeaderOverflow === 'tooltip') {
|
|
1935
|
+
errLog('vxe.error.errProp', ['show-header-overflow=' + showHeaderOverflow, 'show-header-overflow=false,title,ellipsis']);
|
|
1936
|
+
}
|
|
1937
|
+
if (showHeaderOverflow === true && headerTooltipOpts.mode === 'tooltip') {
|
|
1938
|
+
errLog('vxe.error.notSupportProp', ['show-header-overflow=' + showHeaderOverflow, 'header-tooltip-config.mode=tooltip', 'header-tooltip-config.mode=title,ellipsis']);
|
|
1939
|
+
}
|
|
1940
|
+
if (showFooterOverflow === 'tooltip') {
|
|
1941
|
+
errLog('vxe.error.errProp', ['show-footer-overflow=' + showFooterOverflow, 'show-footer-overflow=false,title,ellipsis']);
|
|
1942
|
+
}
|
|
1943
|
+
if (showFooterOverflow === true && footerTooltipOpts.mode === 'tooltip') {
|
|
1944
|
+
errLog('vxe.error.notSupportProp', ['show-footer-overflow=' + showFooterOverflow, 'footer-tooltip-config.mode=tooltip', 'footer-tooltip-config.mode=title,ellipsis']);
|
|
1945
1945
|
}
|
|
1946
1946
|
}
|
|
1947
1947
|
if (this.autoResize) {
|
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 = "3.22.
|
|
3
|
+
export const version = "3.22.4";
|
|
4
4
|
VxeUI.version = version;
|
|
5
5
|
VxeUI.tableVersion = version;
|
|
6
6
|
VxeUI.setConfig({
|
|
@@ -67,6 +67,7 @@ VxeUI.setConfig({
|
|
|
67
67
|
strict: true
|
|
68
68
|
},
|
|
69
69
|
tooltipConfig: {
|
|
70
|
+
mode: 'tooltip',
|
|
70
71
|
enterable: true,
|
|
71
72
|
defaultPlacement: 'top'
|
|
72
73
|
},
|
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${"3.22.
|
|
3
|
+
const tableVersion = `table v${"3.22.4"}`;
|
|
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}` : '';
|