vxe-table 3.21.15 → 3.21.17
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/grid/src/grid.js +17 -19
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +2 -1
- package/es/table/module/edit/mixin.js +2 -1
- package/es/table/module/export/export-panel.js +2 -1
- package/es/table/module/export/import-panel.js +2 -1
- package/es/table/module/export/mixin.js +24 -4
- package/es/table/module/filter/panel.js +2 -1
- package/es/table/module/menu/mixin.js +2 -1
- package/es/table/module/validator/mixin.js +2 -1
- package/es/table/render/index.js +2 -1
- package/es/table/src/columnInfo.js +2 -1
- package/es/table/src/header.js +6 -3
- package/es/table/src/methods.js +34 -5
- package/es/table/src/table.js +27 -4
- package/es/table/src/util.js +2 -1
- package/es/toolbar/src/toolbar.js +19 -21
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +12 -3
- package/lib/grid/src/grid.js +24 -21
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +342 -228
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +8 -5
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +19 -15
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/export-panel.js +8 -5
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +6 -3
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +44 -17
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/filter/panel.js +4 -1
- package/lib/table/module/filter/panel.min.js +1 -1
- package/lib/table/module/menu/mixin.js +5 -2
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/module/validator/mixin.js +8 -4
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/render/index.js +4 -1
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/columnInfo.js +15 -11
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/header.js +7 -3
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +46 -41
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +103 -76
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +6 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +24 -21
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +13 -3
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +20 -16
- package/packages/table/module/custom/panel.ts +3 -1
- package/packages/table/module/edit/mixin.ts +3 -1
- package/packages/table/module/export/export-panel.ts +3 -1
- package/packages/table/module/export/import-panel.ts +3 -1
- package/packages/table/module/export/mixin.ts +25 -4
- package/packages/table/module/filter/panel.ts +3 -1
- package/packages/table/module/menu/mixin.ts +3 -1
- package/packages/table/module/validator/mixin.ts +3 -1
- package/packages/table/render/index.ts +3 -1
- package/packages/table/src/columnInfo.ts +3 -1
- package/packages/table/src/header.ts +6 -3
- package/packages/table/src/methods.ts +32 -5
- package/packages/table/src/table.ts +34 -4
- package/packages/table/src/util.ts +3 -1
- package/packages/toolbar/src/toolbar.ts +23 -18
- package/packages/ui/src/log.ts +13 -3
- /package/es/{iconfont.1781675364289.ttf → iconfont.1781876872867.ttf} +0 -0
- /package/es/{iconfont.1781675364289.woff → iconfont.1781876872867.woff} +0 -0
- /package/es/{iconfont.1781675364289.woff2 → iconfont.1781876872867.woff2} +0 -0
- /package/lib/{iconfont.1781675364289.ttf → iconfont.1781876872867.ttf} +0 -0
- /package/lib/{iconfont.1781675364289.woff → iconfont.1781876872867.woff} +0 -0
- /package/lib/{iconfont.1781675364289.woff2 → iconfont.1781876872867.woff2} +0 -0
|
@@ -2,8 +2,9 @@ import { defineVxeComponent } from '../../../ui/src/comp';
|
|
|
2
2
|
import { VxeUI } from '../../../ui';
|
|
3
3
|
import { formatText } from '../../../ui/src/utils';
|
|
4
4
|
import { getTpImg, addClass, removeClass, hasControlKey } from '../../../ui/src/dom';
|
|
5
|
-
import {
|
|
5
|
+
import { createComponentLog } from '../../../ui/src/log';
|
|
6
6
|
import XEUtils from 'xe-utils';
|
|
7
|
+
const { errLog } = createComponentLog('table');
|
|
7
8
|
const { getI18n, getIcon, renderEmptyElement } = VxeUI;
|
|
8
9
|
function showDropTip($xeTableCustomPanel, evnt, optEl, showLine, dragPos) {
|
|
9
10
|
const customPanelInternalData = $xeTableCustomPanel.internalData;
|
|
@@ -3,7 +3,8 @@ import { VxeUI } from '../../../ui';
|
|
|
3
3
|
import { isEnableConf } from '../../../ui/src/utils';
|
|
4
4
|
import { getCellValue, setCellValue, getRowid } from '../../src/util';
|
|
5
5
|
import { removeClass, addClass } from '../../../ui/src/dom';
|
|
6
|
-
import {
|
|
6
|
+
import { createComponentLog } from '../../../ui/src/log';
|
|
7
|
+
const { warnLog, errLog } = createComponentLog('table');
|
|
7
8
|
const { getConfig, renderer, getI18n } = VxeUI;
|
|
8
9
|
const browseObj = XEUtils.browse();
|
|
9
10
|
function getEditColumnModel(row, column) {
|
|
@@ -2,7 +2,8 @@ import { defineVxeComponent } from '../../../ui/src/comp';
|
|
|
2
2
|
import { VxeUI } from '../../../ui';
|
|
3
3
|
import XEUtils from 'xe-utils';
|
|
4
4
|
import { formatText } from '../../../ui/src/utils';
|
|
5
|
-
import {
|
|
5
|
+
import { createComponentLog } from '../../../ui/src/log';
|
|
6
|
+
const { errLog } = createComponentLog('table');
|
|
6
7
|
const { getI18n, getIcon, globalMixins, renderEmptyElement } = VxeUI;
|
|
7
8
|
export default {
|
|
8
9
|
name: 'VxeTableExportPanel',
|
|
@@ -2,7 +2,8 @@ import { defineVxeComponent } from '../../../ui/src/comp';
|
|
|
2
2
|
import { VxeUI } from '../../../ui';
|
|
3
3
|
import XEUtils from 'xe-utils';
|
|
4
4
|
import { parseFile } from '../../../ui/src/utils';
|
|
5
|
-
import {
|
|
5
|
+
import { createComponentLog } from '../../../ui/src/log';
|
|
6
|
+
const { errLog } = createComponentLog('table');
|
|
6
7
|
const { getI18n, getIcon, globalMixins, renderEmptyElement } = VxeUI;
|
|
7
8
|
export default {
|
|
8
9
|
name: 'VxeTableImportPanel',
|
|
@@ -4,7 +4,8 @@ import { isColumnInfo, getCellValue, createHandleGetRowId } from '../../src/util
|
|
|
4
4
|
import { parseFile, formatText, eqEmptyValue } from '../../../ui/src/utils';
|
|
5
5
|
import { hasClass } from '../../../ui/src/dom';
|
|
6
6
|
import { createHtmlPage, getExportBlobByContent } from './util';
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../../ui/src/log';
|
|
8
|
+
const { warnLog, errLog } = createComponentLog('table');
|
|
8
9
|
const { getI18n, renderer } = VxeUI;
|
|
9
10
|
let htmlCellElem;
|
|
10
11
|
const csvBOM = '\ufeff';
|
|
@@ -478,7 +479,7 @@ function toHtml($xeTable, opts, columns, datas) {
|
|
|
478
479
|
const internalData = $xeTable;
|
|
479
480
|
const { id, border, treeConfig, headerAlign: allHeaderAlign, align: allAlign, footerAlign: allFooterAlign, showOverflow: allColumnOverflow, showHeaderOverflow: allColumnHeaderOverflow } = props;
|
|
480
481
|
const { isAllSelected, isIndeterminate } = reactData;
|
|
481
|
-
const { mergeBodyCellMaps } = internalData;
|
|
482
|
+
const { mergeBodyCellMaps, mergeFooterCellMaps } = internalData;
|
|
482
483
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
483
484
|
const { print: isPrint, isHeader, isFooter, isColgroup, isMerge, colgroups, original } = opts;
|
|
484
485
|
const allCls = 'check-all';
|
|
@@ -616,15 +617,34 @@ function toHtml($xeTable, opts, columns, datas) {
|
|
|
616
617
|
const footers = getFooterData($xeTable, opts, footerTableData);
|
|
617
618
|
if (footers.length) {
|
|
618
619
|
tables.push('<tfoot>');
|
|
619
|
-
footers.forEach((row) => {
|
|
620
|
+
footers.forEach((row, rIndex) => {
|
|
620
621
|
tables.push(`<tr>${columns.map(column => {
|
|
621
622
|
const footAlign = column.footerAlign || column.align || allFooterAlign || allAlign;
|
|
622
623
|
const classNames = hasEllipsis($xeTable, column, 'showOverflow', allColumnOverflow) ? ['col--ellipsis'] : [];
|
|
623
624
|
const cellValue = getFooterCellValue($xeTable, opts, row, column);
|
|
625
|
+
let rowSpan = 1;
|
|
626
|
+
let colSpan = 1;
|
|
627
|
+
if (isMerge) {
|
|
628
|
+
const _rowIndex = rIndex;
|
|
629
|
+
const _columnIndex = $xeTable.getVTColumnIndex(column);
|
|
630
|
+
const spanRest = mergeFooterCellMaps[`${_rowIndex}:${_columnIndex}`];
|
|
631
|
+
if (spanRest) {
|
|
632
|
+
const { rowspan, colspan } = spanRest;
|
|
633
|
+
if (!rowspan || !colspan) {
|
|
634
|
+
return '';
|
|
635
|
+
}
|
|
636
|
+
if (rowspan > 1) {
|
|
637
|
+
rowSpan = rowspan;
|
|
638
|
+
}
|
|
639
|
+
if (colspan > 1) {
|
|
640
|
+
colSpan = colspan;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
624
644
|
if (footAlign) {
|
|
625
645
|
classNames.push(`col--${footAlign}`);
|
|
626
646
|
}
|
|
627
|
-
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}>${formatText(cellValue, true)}</div></td>`;
|
|
647
|
+
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}>${formatText(cellValue, true)}</div></td>`;
|
|
628
648
|
}).join('')}</tr>`);
|
|
629
649
|
});
|
|
630
650
|
tables.push('</tfoot>');
|
|
@@ -3,7 +3,8 @@ import { VxeUI } from '../../../ui';
|
|
|
3
3
|
import { formatText, isEnableConf } from '../../../ui/src/utils';
|
|
4
4
|
import { getPropClass, toCssUnit } from '../../../ui/src/dom';
|
|
5
5
|
import { getSlotVNs } from '../../../ui/src/vn';
|
|
6
|
-
import {
|
|
6
|
+
import { createComponentLog } from '../../../ui/src/log';
|
|
7
|
+
const { warnLog } = createComponentLog('table');
|
|
7
8
|
const { getI18n, getIcon, renderer, globalMixins, renderEmptyElement } = VxeUI;
|
|
8
9
|
// 全部筛选事件
|
|
9
10
|
function filterCheckAllEvent($xeFilterPanel, evnt, value) {
|
|
@@ -2,7 +2,8 @@ import XEUtils from 'xe-utils';
|
|
|
2
2
|
import { VxeUI } from '../../../ui';
|
|
3
3
|
import { getDomNode, getAbsolutePos, getEventTargetNode } from '../../../ui/src/dom';
|
|
4
4
|
import { isEnableConf, hasChildrenList } from '../../../ui/src/utils';
|
|
5
|
-
import {
|
|
5
|
+
import { createComponentLog } from '../../../ui/src/log';
|
|
6
|
+
const { warnLog } = createComponentLog('table');
|
|
6
7
|
const { menus, globalEvents, GLOBAL_EVENT_KEYS } = VxeUI;
|
|
7
8
|
export default {
|
|
8
9
|
methods: {
|
|
@@ -3,7 +3,8 @@ import { VxeUI } from '../../../ui';
|
|
|
3
3
|
import { eqEmptyValue, getFuncText } from '../../../ui/src/utils';
|
|
4
4
|
import { scrollToView } from '../../../ui/src/dom';
|
|
5
5
|
import { handleFieldOrColumn, getRowid } from '../../src/util';
|
|
6
|
-
import {
|
|
6
|
+
import { createComponentLog } from '../../../ui/src/log';
|
|
7
|
+
const { warnLog, errLog } = createComponentLog('table');
|
|
7
8
|
const { getConfig, validators } = VxeUI;
|
|
8
9
|
/**
|
|
9
10
|
* 校验规则
|
package/es/table/render/index.js
CHANGED
|
@@ -3,7 +3,8 @@ import { VxeUI } from '../../ui';
|
|
|
3
3
|
import { getCellValue, setCellValue } from '../src/util';
|
|
4
4
|
import { getFuncText, formatText, isEmptyValue } from '../../ui/src/utils';
|
|
5
5
|
import { getOnName, getModelEvent, getChangeEvent, hasInputType } from '../../ui/src/vn';
|
|
6
|
-
import {
|
|
6
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
7
|
+
const { errLog } = createComponentLog('table');
|
|
7
8
|
const { getConfig, renderer, getI18n, getComponent } = VxeUI;
|
|
8
9
|
const componentDefaultModelProp = 'value';
|
|
9
10
|
const defaultCompProps = {};
|
|
@@ -3,7 +3,8 @@ import { VxeUI } from '../../ui';
|
|
|
3
3
|
import { toFilters } from './util';
|
|
4
4
|
import { isEnableConf, getFuncText } from '../../ui/src/utils';
|
|
5
5
|
import { isPx } from '../../ui/src/dom';
|
|
6
|
-
import {
|
|
6
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
7
|
+
const { warnLog, errLog } = createComponentLog('table');
|
|
7
8
|
const { getI18n, formats, renderer } = VxeUI;
|
|
8
9
|
export class ColumnInfo {
|
|
9
10
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
package/es/table/src/header.js
CHANGED
|
@@ -215,6 +215,8 @@ function renderFilterRows(h, _vm, isOptimizeMode, cols) {
|
|
|
215
215
|
const cellOpts = $xeTable.computeCellOpts;
|
|
216
216
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
217
217
|
const headerCellOpts = $xeTable.computeHeaderCellOpts;
|
|
218
|
+
const floatingFilterOpts = $xeTable.computeFloatingFilterOpts;
|
|
219
|
+
const { cellClassName } = floatingFilterOpts;
|
|
218
220
|
const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight;
|
|
219
221
|
return cols.map((column, $columnIndex) => {
|
|
220
222
|
const { type, showHeaderOverflow, headerAlign, align, filters, editRender, cellRender, floatingFilters, filterRender, slots } = column;
|
|
@@ -269,7 +271,7 @@ function renderFilterRows(h, _vm, isOptimizeMode, cols) {
|
|
|
269
271
|
tcStyle.minHeight = `${currCellHeight}px`;
|
|
270
272
|
}
|
|
271
273
|
return h('th', {
|
|
272
|
-
class: ['vxe-table--column vxe-header--column', colid, fixedHiddenColumn ? 'fixed--hidden' : 'fixed--visible', {
|
|
274
|
+
class: ['vxe-table--column vxe-header--column is--floating-filters', colid, fixedHiddenColumn ? 'fixed--hidden' : 'fixed--visible', {
|
|
273
275
|
[`col--${headAlign}`]: headAlign,
|
|
274
276
|
[`col--${type}`]: type,
|
|
275
277
|
'col--last': isLastColumn,
|
|
@@ -285,7 +287,7 @@ function renderFilterRows(h, _vm, isOptimizeMode, cols) {
|
|
|
285
287
|
attrs: thAttrs
|
|
286
288
|
}, [
|
|
287
289
|
h('div', {
|
|
288
|
-
class: ['vxe-cell', {
|
|
290
|
+
class: ['vxe-cell', '' + (cellClassName || ''), {
|
|
289
291
|
'c--title': showTitle,
|
|
290
292
|
'c--tooltip': showTooltip,
|
|
291
293
|
'c--ellipsis': showEllipsis
|
|
@@ -330,7 +332,8 @@ function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups, renderColumn
|
|
|
330
332
|
rowVNs.push(h('tr', {
|
|
331
333
|
key: 'ff',
|
|
332
334
|
class: [
|
|
333
|
-
'vxe-header--row'
|
|
335
|
+
'vxe-header--row is--floating-filters',
|
|
336
|
+
'' + (floatingFilterOpts.rowClassName || '')
|
|
334
337
|
]
|
|
335
338
|
}, renderFilterRows(h, _vm, isOptimizeMode, renderColumnList)));
|
|
336
339
|
}
|
package/es/table/src/methods.js
CHANGED
|
@@ -6,8 +6,9 @@ import Cell from './cell';
|
|
|
6
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 } from './util';
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
8
8
|
import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from '../../ui/src/anime';
|
|
9
|
-
import {
|
|
9
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
10
10
|
import { getCrossTableDragRowInfo } from './store';
|
|
11
|
+
const { warnLog, errLog } = createComponentLog('table');
|
|
11
12
|
const { getConfig, getI18n, renderer, formats, interceptor, createEvent, globalEvents, GLOBAL_EVENT_KEYS } = VxeUI;
|
|
12
13
|
const browseObj = XEUtils.browse();
|
|
13
14
|
const supportMaxRow = 5e6;
|
|
@@ -2862,11 +2863,39 @@ function handleTooltip($xeTable, evnt, tipOpts, type, tdEl, overflowElem, tipEle
|
|
|
2862
2863
|
const { tooltipStore } = reactData;
|
|
2863
2864
|
const { column, row } = params;
|
|
2864
2865
|
const { showAll, contentMethod } = tipOpts;
|
|
2865
|
-
const
|
|
2866
|
-
const useCustom = contentMethod && !XEUtils.eqNull(customContent);
|
|
2867
|
-
const content = useCustom ? customContent : XEUtils.toString(column.type === 'html' ? tipOverEl.innerText : tipOverEl.textContent).trim();
|
|
2866
|
+
const cellText = XEUtils.toString(column.type === 'html' ? tipOverEl.innerText : tipOverEl.textContent).trim();
|
|
2868
2867
|
const isOver = tipOverEl.scrollWidth > tipOverEl.clientWidth;
|
|
2869
|
-
|
|
2868
|
+
let isShow = false;
|
|
2869
|
+
let customContent = null;
|
|
2870
|
+
let content = '';
|
|
2871
|
+
if (contentMethod) {
|
|
2872
|
+
customContent = contentMethod(params);
|
|
2873
|
+
}
|
|
2874
|
+
// 是否全部展示
|
|
2875
|
+
if (showAll) {
|
|
2876
|
+
// 如果为 null 默认显示
|
|
2877
|
+
if (XEUtils.eqNull(customContent)) {
|
|
2878
|
+
isShow = true;
|
|
2879
|
+
content = cellText;
|
|
2880
|
+
}
|
|
2881
|
+
else if (customContent !== '' && customContent !== false) {
|
|
2882
|
+
// 如果为 '' | false 则不显示
|
|
2883
|
+
isShow = true;
|
|
2884
|
+
content = '' + customContent;
|
|
2885
|
+
}
|
|
2886
|
+
}
|
|
2887
|
+
else {
|
|
2888
|
+
// 如果为 null 使用默认逻辑
|
|
2889
|
+
if (XEUtils.eqNull(customContent)) {
|
|
2890
|
+
isShow = isOver;
|
|
2891
|
+
}
|
|
2892
|
+
else if (customContent !== '' && customContent !== false) {
|
|
2893
|
+
// 如果为 '' | false 则不显示
|
|
2894
|
+
isShow = true;
|
|
2895
|
+
}
|
|
2896
|
+
content = cellText;
|
|
2897
|
+
}
|
|
2898
|
+
if (isShow && content) {
|
|
2870
2899
|
const tipContent = formatText(content);
|
|
2871
2900
|
Object.assign(tooltipStore, {
|
|
2872
2901
|
row,
|
package/es/table/src/table.js
CHANGED
|
@@ -9,7 +9,7 @@ import TableHeaderComponent from './header';
|
|
|
9
9
|
import TableFooterComponent from './footer';
|
|
10
10
|
import { tableProps } from './props';
|
|
11
11
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
12
|
-
import {
|
|
12
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
13
13
|
import { crossTableDragRowGlobal, getCrossTableDragRowInfo } from './store';
|
|
14
14
|
import TableCustomPanelComponent from '../module/custom/panel';
|
|
15
15
|
import TableFilterPanelComponent from '../module/filter/panel';
|
|
@@ -23,6 +23,7 @@ import exportMixin from '../module/export/mixin';
|
|
|
23
23
|
import keyboardMixin from '../module/keyboard/mixin';
|
|
24
24
|
import validatorMixin from '../module/validator/mixin';
|
|
25
25
|
import customMixin from '../module/custom/mixin';
|
|
26
|
+
const { warnLog, errLog } = createComponentLog('table');
|
|
26
27
|
const { getConfig, getIcon, getI18n, renderer, globalResize, globalEvents, globalMixins, renderEmptyElement } = VxeUI;
|
|
27
28
|
function handleUpdateMergeBodyCells($xeTable, merges) {
|
|
28
29
|
const internalData = $xeTable;
|
|
@@ -529,6 +530,9 @@ export default {
|
|
|
529
530
|
};
|
|
530
531
|
},
|
|
531
532
|
inject: {
|
|
533
|
+
$xeModal: {
|
|
534
|
+
default: null
|
|
535
|
+
},
|
|
532
536
|
$xeTabs: {
|
|
533
537
|
default: null
|
|
534
538
|
},
|
|
@@ -548,7 +552,7 @@ export default {
|
|
|
548
552
|
const reactData = createReactData();
|
|
549
553
|
return Object.assign(Object.assign({ xID }, reactData), {
|
|
550
554
|
// 私有属性
|
|
551
|
-
reScrollFlag: 0, reLayoutFlag: 0, footFlag: 0, kfFlag: 0, mergeFooteCellFlag: 0, crossTableDragRowInfo: crossTableDragRowGlobal });
|
|
555
|
+
reScrollFlag: 0, reLayoutFlag: 0, footFlag: 0, kfFlag: 0, layoutReFlag: 0, mergeFooteCellFlag: 0, crossTableDragRowInfo: crossTableDragRowGlobal });
|
|
552
556
|
},
|
|
553
557
|
computed: Object.assign(Object.assign({}, {}), { tableId() {
|
|
554
558
|
return this.computeTableId;
|
|
@@ -1363,11 +1367,21 @@ export default {
|
|
|
1363
1367
|
const props = $xeTable;
|
|
1364
1368
|
return Object.assign({}, getConfig().table.undoRedoHistoryConfig, props.undoRedoHistoryConfig);
|
|
1365
1369
|
},
|
|
1366
|
-
|
|
1370
|
+
combineTabsResizeFlag() {
|
|
1367
1371
|
const $xeTable = this;
|
|
1368
1372
|
const $xeTabs = $xeTable.$xeTabs;
|
|
1369
1373
|
return $xeTabs ? $xeTabs.reactData.resizeFlag : null;
|
|
1370
1374
|
},
|
|
1375
|
+
combineModalResizeFlag() {
|
|
1376
|
+
const $xeTable = this;
|
|
1377
|
+
const $xeModal = $xeTable.$xeModal;
|
|
1378
|
+
return $xeModal ? $xeModal.reactData.resizeFlag : null;
|
|
1379
|
+
},
|
|
1380
|
+
combineSplitterResizeFlag() {
|
|
1381
|
+
const $xeTable = this;
|
|
1382
|
+
const $xeSplitter = $xeTable.$xeSplitter;
|
|
1383
|
+
return $xeSplitter ? $xeSplitter.reactData.resizeFlag : null;
|
|
1384
|
+
},
|
|
1371
1385
|
computeVxeLanguage() {
|
|
1372
1386
|
return VxeUI.getLanguage();
|
|
1373
1387
|
},
|
|
@@ -1498,7 +1512,16 @@ export default {
|
|
|
1498
1512
|
});
|
|
1499
1513
|
}
|
|
1500
1514
|
},
|
|
1501
|
-
|
|
1515
|
+
combineTabsResizeFlag() {
|
|
1516
|
+
this.layoutReFlag++;
|
|
1517
|
+
},
|
|
1518
|
+
combineModalResizeFlag() {
|
|
1519
|
+
this.layoutReFlag++;
|
|
1520
|
+
},
|
|
1521
|
+
combineSplitterResizeFlag() {
|
|
1522
|
+
this.layoutReFlag++;
|
|
1523
|
+
},
|
|
1524
|
+
layoutReFlag() {
|
|
1502
1525
|
this.handleGlobalResizeEvent();
|
|
1503
1526
|
},
|
|
1504
1527
|
mergeCells(value) {
|
package/es/table/src/util.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import { ColumnInfo } from './columnInfo';
|
|
3
3
|
import { isScale, isPx, queryElement } from '../../ui/src/dom';
|
|
4
|
-
import {
|
|
4
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
5
5
|
import { eqEmptyValue } from '../../ui/src/utils';
|
|
6
|
+
const { warnLog, errLog } = createComponentLog('table');
|
|
6
7
|
export function createInternalData() {
|
|
7
8
|
return {
|
|
8
9
|
tZindex: 0,
|
|
@@ -2,7 +2,8 @@ import { defineVxeComponent } from '../../ui/src/comp';
|
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { VxeUI } from '../../ui';
|
|
4
4
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
5
|
-
import {
|
|
5
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
6
|
+
const { warnLog, errLog } = createComponentLog('toolbar');
|
|
6
7
|
const { getConfig, getIcon, getI18n, renderer, commands, createEvent, globalMixins, renderEmptyElement } = VxeUI;
|
|
7
8
|
function createReactData() {
|
|
8
9
|
return {
|
|
@@ -64,12 +65,8 @@ export default {
|
|
|
64
65
|
data() {
|
|
65
66
|
const xID = XEUtils.uniqueId();
|
|
66
67
|
const reactData = createReactData();
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
xID,
|
|
70
|
-
reactData,
|
|
71
|
-
internalData
|
|
72
|
-
};
|
|
68
|
+
return Object.assign(Object.assign({}, {}), { xID,
|
|
69
|
+
reactData });
|
|
73
70
|
},
|
|
74
71
|
computed: Object.assign(Object.assign({}, {}), { computeRefreshOpts() {
|
|
75
72
|
const $xeToolbar = this;
|
|
@@ -224,7 +221,7 @@ export default {
|
|
|
224
221
|
$xeGGWrapper.triggerZoomEvent($event);
|
|
225
222
|
}
|
|
226
223
|
else {
|
|
227
|
-
warnLog('vxe.error.notProp', ['
|
|
224
|
+
warnLog('vxe.error.notProp', ['zoom']);
|
|
228
225
|
}
|
|
229
226
|
},
|
|
230
227
|
importEvent() {
|
|
@@ -352,7 +349,7 @@ export default {
|
|
|
352
349
|
tCommandMethod(params);
|
|
353
350
|
}
|
|
354
351
|
else {
|
|
355
|
-
errLog('vxe.error.notCommands', [
|
|
352
|
+
errLog('vxe.error.notCommands', [code]);
|
|
356
353
|
}
|
|
357
354
|
}
|
|
358
355
|
$xeToolbar.dispatchEvent('button-click', params, $event);
|
|
@@ -384,7 +381,7 @@ export default {
|
|
|
384
381
|
tCommandMethod(params);
|
|
385
382
|
}
|
|
386
383
|
else {
|
|
387
|
-
errLog('vxe.error.notCommands', [
|
|
384
|
+
errLog('vxe.error.notCommands', [code]);
|
|
388
385
|
}
|
|
389
386
|
}
|
|
390
387
|
$xeToolbar.dispatchEvent('tool-click', params, $event);
|
|
@@ -725,46 +722,47 @@ export default {
|
|
|
725
722
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
726
723
|
const $xeGantt = $xeToolbar.$xeGantt;
|
|
727
724
|
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
725
|
+
$xeToolbar.internalData = createInternalData();
|
|
728
726
|
$xeToolbar.$nextTick(() => {
|
|
729
727
|
const refreshOpts = $xeToolbar.computeRefreshOpts;
|
|
730
728
|
const $xeTable = $xeToolbar.fintTable();
|
|
731
729
|
const queryMethod = refreshOpts.queryMethod || refreshOpts.query;
|
|
732
730
|
if (props.refresh && !$xeGGWrapper && !queryMethod) {
|
|
733
|
-
warnLog('vxe.error.notFunc', ['
|
|
731
|
+
warnLog('vxe.error.notFunc', ['queryMethod']);
|
|
734
732
|
}
|
|
735
733
|
if (XEUtils.isPlainObject(props.custom)) {
|
|
736
|
-
warnLog('vxe.error.delProp', ['
|
|
734
|
+
warnLog('vxe.error.delProp', ['custom={...}', 'custom=boolean & custom-options={...}']);
|
|
737
735
|
}
|
|
738
736
|
if (XEUtils.isPlainObject(props.print)) {
|
|
739
|
-
warnLog('vxe.error.delProp', ['
|
|
737
|
+
warnLog('vxe.error.delProp', ['print={...}', 'print=boolean & print-options={...}']);
|
|
740
738
|
}
|
|
741
739
|
if (XEUtils.isPlainObject(props.export)) {
|
|
742
|
-
warnLog('vxe.error.delProp', ['
|
|
740
|
+
warnLog('vxe.error.delProp', ['export={...}', 'export=boolean & export-options={...}']);
|
|
743
741
|
}
|
|
744
742
|
if (XEUtils.isPlainObject(props.import)) {
|
|
745
|
-
warnLog('vxe.error.delProp', ['
|
|
743
|
+
warnLog('vxe.error.delProp', ['import={...}', 'import=boolean & import-options={...}']);
|
|
746
744
|
}
|
|
747
745
|
if (XEUtils.isPlainObject(props.refresh)) {
|
|
748
|
-
warnLog('vxe.error.delProp', ['
|
|
746
|
+
warnLog('vxe.error.delProp', ['refresh={...}', 'refresh=boolean & refresh-options={...}']);
|
|
749
747
|
}
|
|
750
748
|
if (XEUtils.isPlainObject(props.refresh)) {
|
|
751
|
-
warnLog('vxe.error.delProp', ['
|
|
749
|
+
warnLog('vxe.error.delProp', ['zoom={...}', 'zoom=boolean & zoom-options={...}']);
|
|
752
750
|
}
|
|
753
751
|
if ($xeTable) {
|
|
754
752
|
$xeTable.connect($xeToolbar);
|
|
755
753
|
}
|
|
756
754
|
const customOpts = $xeToolbar.computeCustomOpts;
|
|
757
755
|
if (customOpts.isFooter) {
|
|
758
|
-
warnLog('vxe.error.delProp', ['
|
|
756
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.isFooter', 'table.custom-config.showFooter']);
|
|
759
757
|
}
|
|
760
758
|
if (customOpts.showFooter) {
|
|
761
|
-
warnLog('vxe.error.delProp', ['
|
|
759
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.showFooter', 'table.custom-config.showFooter']);
|
|
762
760
|
}
|
|
763
761
|
if (customOpts.immediate) {
|
|
764
|
-
warnLog('vxe.error.delProp', ['
|
|
762
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.immediate', 'table.custom-config.immediate']);
|
|
765
763
|
}
|
|
766
764
|
if (customOpts.trigger) {
|
|
767
|
-
warnLog('vxe.error.delProp', ['
|
|
765
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.trigger', 'table.custom-config.trigger']);
|
|
768
766
|
}
|
|
769
767
|
});
|
|
770
768
|
// 使用已安装的组件,如果未安装则不渲染
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { VxeUI } from '@vxe-ui/core';
|
|
2
2
|
const { log } = VxeUI;
|
|
3
|
-
const
|
|
4
|
-
export
|
|
5
|
-
|
|
3
|
+
const tableVersion = `table v${"3.21.17"}`;
|
|
4
|
+
export function createComponentLog(name) {
|
|
5
|
+
const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
|
|
6
|
+
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
7
|
+
const designVersion = VxeUI.designVersion ? `design v${VxeUI.designVersion}` : '';
|
|
8
|
+
return {
|
|
9
|
+
warnLog: log.create('warn', uiVersion + tableVersion + ganttVersion + designVersion + '] [' + name),
|
|
10
|
+
errLog: log.create('error', uiVersion + tableVersion + ganttVersion + designVersion + '] [' + name)
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export const warnLog = log.create('warn', tableVersion);
|
|
14
|
+
export const errLog = log.create('error', tableVersion);
|
package/lib/grid/src/grid.js
CHANGED
|
@@ -15,6 +15,10 @@ var _props = require("../../table/src/props");
|
|
|
15
15
|
var _table = _interopRequireDefault(require("../../table/src/table"));
|
|
16
16
|
var _toolbar = _interopRequireDefault(require("../../toolbar/src/toolbar"));
|
|
17
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
+
const {
|
|
19
|
+
warnLog,
|
|
20
|
+
errLog
|
|
21
|
+
} = (0, _log.createComponentLog)('grid');
|
|
18
22
|
const {
|
|
19
23
|
getConfig,
|
|
20
24
|
getI18n,
|
|
@@ -110,12 +114,10 @@ var _default = exports.default = /* define-vxe-component start */(0, _comp.defin
|
|
|
110
114
|
data() {
|
|
111
115
|
const xID = _xeUtils.default.uniqueId();
|
|
112
116
|
const reactData = createReactData();
|
|
113
|
-
|
|
114
|
-
return {
|
|
117
|
+
return Object.assign(Object.assign({}, {}), {
|
|
115
118
|
xID,
|
|
116
|
-
reactData
|
|
117
|
-
|
|
118
|
-
};
|
|
119
|
+
reactData
|
|
120
|
+
});
|
|
119
121
|
},
|
|
120
122
|
computed: Object.assign(Object.assign({}, {}), {
|
|
121
123
|
isRespMsg() {
|
|
@@ -904,7 +906,7 @@ var _default = exports.default = /* define-vxe-component start */(0, _comp.defin
|
|
|
904
906
|
};
|
|
905
907
|
});
|
|
906
908
|
} else {
|
|
907
|
-
|
|
909
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.query']);
|
|
908
910
|
}
|
|
909
911
|
break;
|
|
910
912
|
}
|
|
@@ -952,7 +954,7 @@ var _default = exports.default = /* define-vxe-component start */(0, _comp.defin
|
|
|
952
954
|
};
|
|
953
955
|
});
|
|
954
956
|
} else {
|
|
955
|
-
|
|
957
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.queryFooter']);
|
|
956
958
|
}
|
|
957
959
|
break;
|
|
958
960
|
}
|
|
@@ -1044,7 +1046,7 @@ var _default = exports.default = /* define-vxe-component start */(0, _comp.defin
|
|
|
1044
1046
|
}
|
|
1045
1047
|
}
|
|
1046
1048
|
} else {
|
|
1047
|
-
|
|
1049
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete']);
|
|
1048
1050
|
}
|
|
1049
1051
|
break;
|
|
1050
1052
|
}
|
|
@@ -1152,7 +1154,7 @@ var _default = exports.default = /* define-vxe-component start */(0, _comp.defin
|
|
|
1152
1154
|
}
|
|
1153
1155
|
});
|
|
1154
1156
|
} else {
|
|
1155
|
-
|
|
1157
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.save']);
|
|
1156
1158
|
}
|
|
1157
1159
|
break;
|
|
1158
1160
|
}
|
|
@@ -1170,7 +1172,7 @@ var _default = exports.default = /* define-vxe-component start */(0, _comp.defin
|
|
|
1170
1172
|
$gantt: null
|
|
1171
1173
|
}, ...args);
|
|
1172
1174
|
} else {
|
|
1173
|
-
|
|
1175
|
+
errLog('vxe.error.notCommands', [code]);
|
|
1174
1176
|
}
|
|
1175
1177
|
}
|
|
1176
1178
|
}
|
|
@@ -1604,7 +1606,7 @@ var _default = exports.default = /* define-vxe-component start */(0, _comp.defin
|
|
|
1604
1606
|
_xeUtils.default.each(column.slots, func => {
|
|
1605
1607
|
if (!_xeUtils.default.isFunction(func)) {
|
|
1606
1608
|
if (!slots[func]) {
|
|
1607
|
-
|
|
1609
|
+
errLog('vxe.error.notSlot', [func]);
|
|
1608
1610
|
}
|
|
1609
1611
|
}
|
|
1610
1612
|
});
|
|
@@ -1627,7 +1629,7 @@ var _default = exports.default = /* define-vxe-component start */(0, _comp.defin
|
|
|
1627
1629
|
if (slots[slotFunc]) {
|
|
1628
1630
|
slotConf[slotKey] = slots[slotFunc];
|
|
1629
1631
|
} else {
|
|
1630
|
-
|
|
1632
|
+
errLog('vxe.error.notSlot', [slotFunc]);
|
|
1631
1633
|
}
|
|
1632
1634
|
} else {
|
|
1633
1635
|
slotConf[slotKey] = slotFunc;
|
|
@@ -1643,10 +1645,10 @@ var _default = exports.default = /* define-vxe-component start */(0, _comp.defin
|
|
|
1643
1645
|
const toolbarOptSlots = toolbarOpts.slots;
|
|
1644
1646
|
const toolbarSlots = {};
|
|
1645
1647
|
if (slots.buttons && (!toolbarOptSlots || toolbarOptSlots.buttons !== 'buttons')) {
|
|
1646
|
-
|
|
1648
|
+
warnLog('vxe.error.reqProp', ['[grid] toolbar-config.slots.buttons']);
|
|
1647
1649
|
}
|
|
1648
1650
|
if (slots.tools && (!toolbarOptSlots || toolbarOptSlots.tools !== 'tools')) {
|
|
1649
|
-
|
|
1651
|
+
warnLog('vxe.error.reqProp', ['[grid] toolbar-config.slots.tools']);
|
|
1650
1652
|
}
|
|
1651
1653
|
if (toolbarOptSlots) {
|
|
1652
1654
|
const buttonsSlot = $xeGrid.getFuncSlot(toolbarOptSlots, 'buttons');
|
|
@@ -1685,7 +1687,7 @@ var _default = exports.default = /* define-vxe-component start */(0, _comp.defin
|
|
|
1685
1687
|
if (slots[funcSlot]) {
|
|
1686
1688
|
return slots[funcSlot];
|
|
1687
1689
|
} else {
|
|
1688
|
-
|
|
1690
|
+
errLog('vxe.error.notSlot', [funcSlot]);
|
|
1689
1691
|
}
|
|
1690
1692
|
} else {
|
|
1691
1693
|
return funcSlot;
|
|
@@ -1927,7 +1929,7 @@ var _default = exports.default = /* define-vxe-component start */(0, _comp.defin
|
|
|
1927
1929
|
childVNs.push($xeGrid.renderPager(h));
|
|
1928
1930
|
break;
|
|
1929
1931
|
default:
|
|
1930
|
-
|
|
1932
|
+
errLog('vxe.error.notProp', [`layouts -> ${key}`]);
|
|
1931
1933
|
break;
|
|
1932
1934
|
}
|
|
1933
1935
|
});
|
|
@@ -1986,29 +1988,30 @@ var _default = exports.default = /* define-vxe-component start */(0, _comp.defin
|
|
|
1986
1988
|
const VxeUIPagerComponent = _ui.VxeUI.getComponent('VxePager');
|
|
1987
1989
|
const $xeGrid = this;
|
|
1988
1990
|
const props = $xeGrid;
|
|
1991
|
+
$xeGrid.internalData = createInternalData();
|
|
1989
1992
|
const proxyOpts = $xeGrid.computeProxyOpts;
|
|
1990
1993
|
// const { data, formOpts, proxyOpts, proxyConfig } = this
|
|
1991
1994
|
// if (proxyConfig && (data || (proxyOpts.form && formOpts.data))) {
|
|
1992
1995
|
// errLog('vxe.error.errConflicts', ['[grid] data', 'proxy-config'])
|
|
1993
1996
|
// }
|
|
1994
1997
|
if (props.toolbar) {
|
|
1995
|
-
|
|
1998
|
+
errLog('vxe.error.delProp', ['toolbar', 'toolbar-config']);
|
|
1996
1999
|
}
|
|
1997
2000
|
if (props.toolbarConfig && !_xeUtils.default.isObject(props.toolbarConfig)) {
|
|
1998
|
-
|
|
2001
|
+
errLog('vxe.error.errProp', [`toolbar-config=${props.toolbarConfig}`, 'toolbar-config={}']);
|
|
1999
2002
|
}
|
|
2000
2003
|
if (proxyOpts.props) {
|
|
2001
|
-
|
|
2004
|
+
warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response']);
|
|
2002
2005
|
}
|
|
2003
2006
|
$xeGrid.$nextTick(() => {
|
|
2004
2007
|
if (props.formConfig) {
|
|
2005
2008
|
if (!VxeUIFormComponent) {
|
|
2006
|
-
|
|
2009
|
+
errLog('vxe.error.reqComp', ['vxe-form']);
|
|
2007
2010
|
}
|
|
2008
2011
|
}
|
|
2009
2012
|
if (props.pagerConfig) {
|
|
2010
2013
|
if (!VxeUIPagerComponent) {
|
|
2011
|
-
|
|
2014
|
+
errLog('vxe.error.reqComp', ['vxe-pager']);
|
|
2012
2015
|
}
|
|
2013
2016
|
}
|
|
2014
2017
|
});
|