vxe-table 4.19.15 → 4.19.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/dist/all.esm.js +308 -218
- package/dist/style.css +1 -1
- package/es/grid/src/grid.js +12 -11
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +2 -1
- package/es/table/module/edit/hook.js +2 -1
- package/es/table/module/export/export-panel.js +2 -1
- package/es/table/module/export/hook.js +24 -4
- package/es/table/module/export/import-panel.js +2 -1
- package/es/table/module/filter/panel.js +2 -1
- package/es/table/module/validator/hook.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/table.js +58 -10
- package/es/toolbar/src/toolbar.js +16 -15
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +12 -3
- package/lib/grid/src/grid.js +16 -12
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +215 -135
- 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/hook.js +19 -15
- package/lib/table/module/edit/hook.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/hook.js +41 -14
- package/lib/table/module/export/hook.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/filter/panel.js +4 -1
- package/lib/table/module/filter/panel.min.js +1 -1
- package/lib/table/module/validator/hook.js +7 -3
- package/lib/table/module/validator/hook.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 +13 -9
- 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/table.js +49 -44
- package/lib/table/src/table.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +20 -16
- 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 +13 -11
- package/packages/table/module/custom/panel.ts +3 -1
- package/packages/table/module/edit/hook.ts +3 -1
- package/packages/table/module/export/export-panel.ts +3 -1
- package/packages/table/module/export/hook.ts +26 -5
- package/packages/table/module/export/import-panel.ts +3 -1
- package/packages/table/module/filter/panel.ts +3 -1
- package/packages/table/module/validator/hook.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/table.ts +60 -11
- package/packages/toolbar/src/toolbar.ts +17 -15
- package/packages/ui/src/log.ts +13 -3
- /package/es/{iconfont.1781675408206.ttf → iconfont.1781876895482.ttf} +0 -0
- /package/es/{iconfont.1781675408206.woff → iconfont.1781876895482.woff} +0 -0
- /package/es/{iconfont.1781675408206.woff2 → iconfont.1781876895482.woff2} +0 -0
- /package/lib/{iconfont.1781675408206.ttf → iconfont.1781876895482.ttf} +0 -0
- /package/lib/{iconfont.1781675408206.woff → iconfont.1781876895482.woff} +0 -0
- /package/lib/{iconfont.1781675408206.woff2 → iconfont.1781876895482.woff2} +0 -0
|
@@ -3,8 +3,9 @@ import { defineVxeComponent } from '../../../ui/src/comp';
|
|
|
3
3
|
import { VxeUI } from '../../../ui';
|
|
4
4
|
import { formatText } from '../../../ui/src/utils';
|
|
5
5
|
import { getTpImg, addClass, removeClass, hasControlKey } from '../../../ui/src/dom';
|
|
6
|
-
import {
|
|
6
|
+
import { createComponentLog } from '../../../ui/src/log';
|
|
7
7
|
import XEUtils from 'xe-utils';
|
|
8
|
+
const { errLog } = createComponentLog('table');
|
|
8
9
|
const { getI18n, getIcon, renderEmptyElement } = VxeUI;
|
|
9
10
|
export function createInternalData() {
|
|
10
11
|
return {
|
|
@@ -4,7 +4,8 @@ import { VxeUI } from '../../../ui';
|
|
|
4
4
|
import { isEnableConf } from '../../../ui/src/utils';
|
|
5
5
|
import { getCellValue, setCellValue, getRowid } from '../../src/util';
|
|
6
6
|
import { removeClass, addClass } from '../../../ui/src/dom';
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../../ui/src/log';
|
|
8
|
+
const { warnLog, errLog } = createComponentLog('table');
|
|
8
9
|
const { getConfig, renderer, hooks, getI18n } = VxeUI;
|
|
9
10
|
const tableEditMethodKeys = ['insert', 'insertAt', 'insertNextAt', 'insertChild', 'insertChildAt', 'insertChildNextAt', 'remove', 'removeCheckboxRow', 'removeRadioRow', 'removeCurrentRow', 'getRecordset', 'getInsertRecords', 'getRemoveRecords', 'getUpdateRecords', 'getEditRecord', 'getActiveRecord', 'getEditCell', 'getSelectedCell', 'clearEdit', 'clearActived', 'clearSelected', 'isEditByRow', 'isActiveByRow', 'setEditRow', 'setActiveRow', 'setEditCell', 'setActiveCell', 'setSelectCell'];
|
|
10
11
|
hooks.add('tableEditModule', {
|
|
@@ -3,7 +3,8 @@ import { defineVxeComponent } from '../../../ui/src/comp';
|
|
|
3
3
|
import { VxeUI } from '../../../ui';
|
|
4
4
|
import XEUtils from 'xe-utils';
|
|
5
5
|
import { formatText } from '../../../ui/src/utils';
|
|
6
|
-
import {
|
|
6
|
+
import { createComponentLog } from '../../../ui/src/log';
|
|
7
|
+
const { errLog } = createComponentLog('table');
|
|
7
8
|
const { getI18n, getIcon, renderEmptyElement } = VxeUI;
|
|
8
9
|
export default defineVxeComponent({
|
|
9
10
|
name: 'VxeTableExportPanel',
|
|
@@ -5,7 +5,8 @@ import { isColumnInfo, getCellValue, createHandleGetRowId } from '../../src/util
|
|
|
5
5
|
import { parseFile, formatText, eqEmptyValue } from '../../../ui/src/utils';
|
|
6
6
|
import { hasClass } from '../../../ui/src/dom';
|
|
7
7
|
import { createHtmlPage, getExportBlobByContent } from './util';
|
|
8
|
-
import {
|
|
8
|
+
import { createComponentLog } from '../../../ui/src/log';
|
|
9
|
+
const { warnLog, errLog } = createComponentLog('table');
|
|
9
10
|
const { getI18n, hooks, renderer } = VxeUI;
|
|
10
11
|
let htmlCellElem;
|
|
11
12
|
const csvBOM = '\ufeff';
|
|
@@ -668,7 +669,7 @@ hooks.add('tableExportModule', {
|
|
|
668
669
|
const toHtml = (opts, columns, datas) => {
|
|
669
670
|
const { id, border, treeConfig, headerAlign: allHeaderAlign, align: allAlign, footerAlign: allFooterAlign, showOverflow: allColumnOverflow, showHeaderOverflow: allColumnHeaderOverflow } = props;
|
|
670
671
|
const { isAllSelected, isIndeterminate } = reactData;
|
|
671
|
-
const { mergeBodyCellMaps } = internalData;
|
|
672
|
+
const { mergeBodyCellMaps, mergeFooterCellMaps } = internalData;
|
|
672
673
|
const treeOpts = computeTreeOpts.value;
|
|
673
674
|
const { print: isPrint, isHeader, isFooter, isColgroup, isMerge, colgroups, original } = opts;
|
|
674
675
|
const allCls = 'check-all';
|
|
@@ -806,15 +807,34 @@ hooks.add('tableExportModule', {
|
|
|
806
807
|
const footers = getFooterData($xeTable, opts, footerTableData);
|
|
807
808
|
if (footers.length) {
|
|
808
809
|
tables.push('<tfoot>');
|
|
809
|
-
footers.forEach((row) => {
|
|
810
|
+
footers.forEach((row, rIndex) => {
|
|
810
811
|
tables.push(`<tr>${columns.map((column) => {
|
|
811
812
|
const footAlign = column.footerAlign || column.align || allFooterAlign || allAlign;
|
|
812
813
|
const classNames = hasEllipsis(column, 'showOverflow', allColumnOverflow) ? ['col--ellipsis'] : [];
|
|
813
814
|
const cellValue = getFooterCellValue(opts, row, column);
|
|
815
|
+
let rowSpan = 1;
|
|
816
|
+
let colSpan = 1;
|
|
817
|
+
if (isMerge) {
|
|
818
|
+
const _rowIndex = rIndex;
|
|
819
|
+
const _columnIndex = $xeTable.getVTColumnIndex(column);
|
|
820
|
+
const spanRest = mergeFooterCellMaps[`${_rowIndex}:${_columnIndex}`];
|
|
821
|
+
if (spanRest) {
|
|
822
|
+
const { rowspan, colspan } = spanRest;
|
|
823
|
+
if (!rowspan || !colspan) {
|
|
824
|
+
return '';
|
|
825
|
+
}
|
|
826
|
+
if (rowspan > 1) {
|
|
827
|
+
rowSpan = rowspan;
|
|
828
|
+
}
|
|
829
|
+
if (colspan > 1) {
|
|
830
|
+
colSpan = colspan;
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
}
|
|
814
834
|
if (footAlign) {
|
|
815
835
|
classNames.push(`col--${footAlign}`);
|
|
816
836
|
}
|
|
817
|
-
return `<td class="${classNames.join(' ')}" title="${cellValue}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}>${formatText(cellValue, true)}</div></td>`;
|
|
837
|
+
return `<td class="${classNames.join(' ')}" rowspan="${rowSpan}" colspan="${colSpan}" title="${cellValue}"><div ${isPrint ? '' : `style="width: ${column.renderWidth}px"`}>${formatText(cellValue, true)}</div></td>`;
|
|
818
838
|
}).join('')}</tr>`);
|
|
819
839
|
});
|
|
820
840
|
tables.push('</tfoot>');
|
|
@@ -3,7 +3,8 @@ import { defineVxeComponent } from '../../../ui/src/comp';
|
|
|
3
3
|
import { VxeUI } from '../../../ui';
|
|
4
4
|
import XEUtils from 'xe-utils';
|
|
5
5
|
import { parseFile } from '../../../ui/src/utils';
|
|
6
|
-
import {
|
|
6
|
+
import { createComponentLog } from '../../../ui/src/log';
|
|
7
|
+
const { errLog } = createComponentLog('table');
|
|
7
8
|
const { getI18n, getIcon, renderEmptyElement } = VxeUI;
|
|
8
9
|
export default defineVxeComponent({
|
|
9
10
|
name: 'VxeTableImportPanel',
|
|
@@ -4,8 +4,9 @@ import { VxeUI } from '../../../ui';
|
|
|
4
4
|
import { formatText, isEnableConf } from '../../../ui/src/utils';
|
|
5
5
|
import { getPropClass, toCssUnit } from '../../../ui/src/dom';
|
|
6
6
|
import { getSlotVNs } from '../../../ui/src/vn';
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../../ui/src/log';
|
|
8
8
|
import XEUtils from 'xe-utils';
|
|
9
|
+
const { warnLog } = createComponentLog('table');
|
|
9
10
|
const { getI18n, getIcon, renderer, renderEmptyElement } = VxeUI;
|
|
10
11
|
export default defineVxeComponent({
|
|
11
12
|
name: 'VxeTableFilterPanel',
|
|
@@ -4,7 +4,8 @@ import { VxeUI } from '../../../ui';
|
|
|
4
4
|
import { eqEmptyValue, getFuncText } from '../../../ui/src/utils';
|
|
5
5
|
import { scrollToView } from '../../../ui/src/dom';
|
|
6
6
|
import { handleFieldOrColumn, getRowid } from '../../src/util';
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../../ui/src/log';
|
|
8
|
+
const { warnLog, errLog } = createComponentLog('table');
|
|
8
9
|
const { getConfig, validators, hooks } = VxeUI;
|
|
9
10
|
/**
|
|
10
11
|
* 校验规则
|
package/es/table/render/index.js
CHANGED
|
@@ -4,7 +4,8 @@ import { VxeUI } from '../../ui';
|
|
|
4
4
|
import { getCellValue, setCellValue } from '../../table/src/util';
|
|
5
5
|
import { getFuncText, formatText, isEmptyValue } from '../../ui/src/utils';
|
|
6
6
|
import { getOnName, getModelEvent, getChangeEvent, hasInputType } from '../../ui/src/vn';
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
8
|
+
const { errLog } = createComponentLog('table');
|
|
8
9
|
const { getConfig, renderer, getI18n, getComponent } = VxeUI;
|
|
9
10
|
const componentDefaultModelProp = 'modelValue';
|
|
10
11
|
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
|
@@ -238,6 +238,8 @@ export default defineVxeComponent({
|
|
|
238
238
|
const cellOpts = computeCellOpts.value;
|
|
239
239
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
240
240
|
const headerCellOpts = computeHeaderCellOpts.value;
|
|
241
|
+
const floatingFilterOpts = computeFloatingFilterOpts.value;
|
|
242
|
+
const { cellClassName } = floatingFilterOpts;
|
|
241
243
|
const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight;
|
|
242
244
|
return cols.map((column, $columnIndex) => {
|
|
243
245
|
const { type, showHeaderOverflow, headerAlign, align, filters, editRender, cellRender, floatingFilters, filterRender, slots } = column;
|
|
@@ -291,7 +293,7 @@ export default defineVxeComponent({
|
|
|
291
293
|
else {
|
|
292
294
|
tcStyle.minHeight = `${currCellHeight}px`;
|
|
293
295
|
}
|
|
294
|
-
return h('th', Object.assign({ class: ['vxe-table--column vxe-header--column', colid, fixedHiddenColumn ? 'fixed--hidden' : 'fixed--visible', {
|
|
296
|
+
return h('th', Object.assign({ class: ['vxe-table--column vxe-header--column is--floating-filters', colid, fixedHiddenColumn ? 'fixed--hidden' : 'fixed--visible', {
|
|
295
297
|
[`col--${headAlign}`]: headAlign,
|
|
296
298
|
[`col--${type}`]: type,
|
|
297
299
|
'col--last': isLastColumn,
|
|
@@ -304,7 +306,7 @@ export default defineVxeComponent({
|
|
|
304
306
|
}
|
|
305
307
|
], key: colid }, thAttrs), [
|
|
306
308
|
h('div', {
|
|
307
|
-
class: ['vxe-cell', {
|
|
309
|
+
class: ['vxe-cell', '' + (cellClassName || ''), {
|
|
308
310
|
'c--title': showTitle,
|
|
309
311
|
'c--tooltip': showTooltip,
|
|
310
312
|
'c--ellipsis': showEllipsis
|
|
@@ -344,7 +346,8 @@ export default defineVxeComponent({
|
|
|
344
346
|
rowVNs.push(h('tr', {
|
|
345
347
|
key: 'ff',
|
|
346
348
|
class: [
|
|
347
|
-
'vxe-header--row'
|
|
349
|
+
'vxe-header--row is--floating-filters',
|
|
350
|
+
'' + (floatingFilterOpts.rowClassName || '')
|
|
348
351
|
]
|
|
349
352
|
}, renderFilterRows(isOptimizeMode, renderColumnList)));
|
|
350
353
|
}
|
package/es/table/src/table.js
CHANGED
|
@@ -7,7 +7,7 @@ import { VxeUI } from '../../ui';
|
|
|
7
7
|
import { createReactData, createInternalData, getRowUniqueId, createRowId, clearTableAllStatus, getColumnList, toFilters, hasDeepKey, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, getColReMaxWidth, createHandleUpdateRowId, createHandleGetRowId, getCalcHeight, getCellRestHeight, getLastChildColumn, getRowMaxHeight } from './util';
|
|
8
8
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
9
9
|
import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from '../../ui/src/anime';
|
|
10
|
-
import {
|
|
10
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
11
11
|
import { getCrossTableDragRowInfo } from './store';
|
|
12
12
|
import Cell from './cell';
|
|
13
13
|
import TableBodyComponent from './body';
|
|
@@ -28,6 +28,7 @@ import '../module/keyboard/hook';
|
|
|
28
28
|
import '../module/validator/hook';
|
|
29
29
|
import '../module/custom/hook';
|
|
30
30
|
import '../render';
|
|
31
|
+
const { warnLog, errLog } = createComponentLog('table');
|
|
31
32
|
const { getConfig, getIcon, getI18n, renderer, formats, createEvent, globalResize, interceptor, hooks, globalEvents, GLOBAL_EVENT_KEYS, useFns, renderEmptyElement } = VxeUI;
|
|
32
33
|
const supportMaxRow = 5e6;
|
|
33
34
|
const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
@@ -46,8 +47,10 @@ export default defineVxeComponent({
|
|
|
46
47
|
// 使用已安装的组件,如果未安装则不渲染
|
|
47
48
|
const VxeUILoadingComponent = VxeUI.getComponent('VxeLoading');
|
|
48
49
|
const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip');
|
|
50
|
+
const $xeModal = inject('$xeModal', null);
|
|
49
51
|
const $xeTabs = inject('$xeTabs', null);
|
|
50
52
|
const $xeParentTable = inject('$xeTable', null);
|
|
53
|
+
const $xeSplitter = inject('$xeSplitter', null);
|
|
51
54
|
const $xeGrid = inject('$xeGrid', null);
|
|
52
55
|
const $xeGantt = inject('$xeGantt', null);
|
|
53
56
|
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
@@ -677,6 +680,15 @@ export default defineVxeComponent({
|
|
|
677
680
|
}
|
|
678
681
|
return [];
|
|
679
682
|
});
|
|
683
|
+
const combineTabsResizeFlag = computed(() => {
|
|
684
|
+
return $xeTabs ? $xeTabs.reactData.resizeFlag : null;
|
|
685
|
+
});
|
|
686
|
+
const combineModalResizeFlag = computed(() => {
|
|
687
|
+
return $xeModal ? $xeModal.reactData.resizeFlag : null;
|
|
688
|
+
});
|
|
689
|
+
const combineSplitterResizeFlag = computed(() => {
|
|
690
|
+
return $xeSplitter ? $xeSplitter.reactData.resizeFlag : null;
|
|
691
|
+
});
|
|
680
692
|
const refMaps = {
|
|
681
693
|
refElem,
|
|
682
694
|
refTooltip,
|
|
@@ -9086,11 +9098,39 @@ export default defineVxeComponent({
|
|
|
9086
9098
|
const { tooltipStore } = reactData;
|
|
9087
9099
|
const { column, row } = params;
|
|
9088
9100
|
const { showAll, contentMethod } = tipOpts;
|
|
9089
|
-
const
|
|
9090
|
-
const useCustom = contentMethod && !XEUtils.eqNull(customContent);
|
|
9091
|
-
const content = useCustom ? customContent : XEUtils.toString(column.type === 'html' ? tipOverEl.innerText : tipOverEl.textContent).trim();
|
|
9101
|
+
const cellText = XEUtils.toString(column.type === 'html' ? tipOverEl.innerText : tipOverEl.textContent).trim();
|
|
9092
9102
|
const isOver = tipOverEl.scrollWidth > tipOverEl.clientWidth;
|
|
9093
|
-
|
|
9103
|
+
let isShow = false;
|
|
9104
|
+
let customContent = null;
|
|
9105
|
+
let content = '';
|
|
9106
|
+
if (contentMethod) {
|
|
9107
|
+
customContent = contentMethod(params);
|
|
9108
|
+
}
|
|
9109
|
+
// 是否全部展示
|
|
9110
|
+
if (showAll) {
|
|
9111
|
+
// 如果为 null 默认显示
|
|
9112
|
+
if (XEUtils.eqNull(customContent)) {
|
|
9113
|
+
isShow = true;
|
|
9114
|
+
content = cellText;
|
|
9115
|
+
}
|
|
9116
|
+
else if (customContent !== '' && customContent !== false) {
|
|
9117
|
+
// 如果为 '' | false 则不显示
|
|
9118
|
+
isShow = true;
|
|
9119
|
+
content = '' + customContent;
|
|
9120
|
+
}
|
|
9121
|
+
}
|
|
9122
|
+
else {
|
|
9123
|
+
// 如果为 null 使用默认逻辑
|
|
9124
|
+
if (XEUtils.eqNull(customContent)) {
|
|
9125
|
+
isShow = isOver;
|
|
9126
|
+
}
|
|
9127
|
+
else if (customContent !== '' && customContent !== false) {
|
|
9128
|
+
// 如果为 '' | false 则不显示
|
|
9129
|
+
isShow = true;
|
|
9130
|
+
}
|
|
9131
|
+
content = cellText;
|
|
9132
|
+
}
|
|
9133
|
+
if (isShow && content) {
|
|
9094
9134
|
const tipContent = formatText(content);
|
|
9095
9135
|
Object.assign(tooltipStore, {
|
|
9096
9136
|
row,
|
|
@@ -14158,11 +14198,19 @@ export default defineVxeComponent({
|
|
|
14158
14198
|
loadTableData(internalData.tableSynchData, false, true);
|
|
14159
14199
|
}
|
|
14160
14200
|
});
|
|
14161
|
-
|
|
14162
|
-
|
|
14163
|
-
|
|
14164
|
-
|
|
14165
|
-
|
|
14201
|
+
const layoutReFlag = ref(0);
|
|
14202
|
+
watch(combineTabsResizeFlag, () => {
|
|
14203
|
+
layoutReFlag.value++;
|
|
14204
|
+
});
|
|
14205
|
+
watch(combineModalResizeFlag, () => {
|
|
14206
|
+
layoutReFlag.value++;
|
|
14207
|
+
});
|
|
14208
|
+
watch(combineSplitterResizeFlag, () => {
|
|
14209
|
+
layoutReFlag.value++;
|
|
14210
|
+
});
|
|
14211
|
+
watch(layoutReFlag, () => {
|
|
14212
|
+
handleGlobalResizeEvent();
|
|
14213
|
+
});
|
|
14166
14214
|
handleKeyField();
|
|
14167
14215
|
hooks.forEach((options) => {
|
|
14168
14216
|
const { setupTable } = options;
|
|
@@ -3,7 +3,8 @@ import { defineVxeComponent } from '../../ui/src/comp';
|
|
|
3
3
|
import XEUtils from 'xe-utils';
|
|
4
4
|
import { VxeUI } from '../../ui';
|
|
5
5
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
6
|
-
import {
|
|
6
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
7
|
+
const { warnLog, errLog } = createComponentLog('toolbar');
|
|
7
8
|
const { getConfig, getIcon, getI18n, renderer, commands, createEvent, useFns } = VxeUI;
|
|
8
9
|
function createReactData() {
|
|
9
10
|
return {
|
|
@@ -178,7 +179,7 @@ export default defineVxeComponent({
|
|
|
178
179
|
$xeGGWrapper.triggerZoomEvent($event);
|
|
179
180
|
}
|
|
180
181
|
else {
|
|
181
|
-
warnLog('vxe.error.notProp', ['
|
|
182
|
+
warnLog('vxe.error.notProp', ['zoom']);
|
|
182
183
|
}
|
|
183
184
|
};
|
|
184
185
|
const importEvent = () => {
|
|
@@ -288,7 +289,7 @@ export default defineVxeComponent({
|
|
|
288
289
|
tCommandMethod(params);
|
|
289
290
|
}
|
|
290
291
|
else {
|
|
291
|
-
errLog('vxe.error.notCommands', [
|
|
292
|
+
errLog('vxe.error.notCommands', [code]);
|
|
292
293
|
}
|
|
293
294
|
}
|
|
294
295
|
$xeToolbar.dispatchEvent('button-click', params, $event);
|
|
@@ -315,7 +316,7 @@ export default defineVxeComponent({
|
|
|
315
316
|
tCommandMethod(params);
|
|
316
317
|
}
|
|
317
318
|
else {
|
|
318
|
-
errLog('vxe.error.notCommands', [
|
|
319
|
+
errLog('vxe.error.notCommands', [code]);
|
|
319
320
|
}
|
|
320
321
|
}
|
|
321
322
|
$xeToolbar.dispatchEvent('tool-click', params, $event);
|
|
@@ -570,38 +571,38 @@ export default defineVxeComponent({
|
|
|
570
571
|
const refreshOpts = computeRefreshOpts.value;
|
|
571
572
|
const queryMethod = refreshOpts.queryMethod || refreshOpts.query;
|
|
572
573
|
if (props.refresh && !$xeGGWrapper && !queryMethod) {
|
|
573
|
-
warnLog('vxe.error.notFunc', ['
|
|
574
|
+
warnLog('vxe.error.notFunc', ['queryMethod']);
|
|
574
575
|
}
|
|
575
576
|
if (XEUtils.isPlainObject(props.custom)) {
|
|
576
|
-
warnLog('vxe.error.delProp', ['
|
|
577
|
+
warnLog('vxe.error.delProp', ['custom={...}', 'custom=boolean & custom-options={...}']);
|
|
577
578
|
}
|
|
578
579
|
if (XEUtils.isPlainObject(props.print)) {
|
|
579
|
-
warnLog('vxe.error.delProp', ['
|
|
580
|
+
warnLog('vxe.error.delProp', ['print={...}', 'print=boolean & print-options={...}']);
|
|
580
581
|
}
|
|
581
582
|
if (XEUtils.isPlainObject(props.export)) {
|
|
582
|
-
warnLog('vxe.error.delProp', ['
|
|
583
|
+
warnLog('vxe.error.delProp', ['export={...}', 'export=boolean & export-options={...}']);
|
|
583
584
|
}
|
|
584
585
|
if (XEUtils.isPlainObject(props.import)) {
|
|
585
|
-
warnLog('vxe.error.delProp', ['
|
|
586
|
+
warnLog('vxe.error.delProp', ['import={...}', 'import=boolean & import-options={...}']);
|
|
586
587
|
}
|
|
587
588
|
if (XEUtils.isPlainObject(props.refresh)) {
|
|
588
|
-
warnLog('vxe.error.delProp', ['
|
|
589
|
+
warnLog('vxe.error.delProp', ['refresh={...}', 'refresh=boolean & refresh-options={...}']);
|
|
589
590
|
}
|
|
590
591
|
if (XEUtils.isPlainObject(props.refresh)) {
|
|
591
|
-
warnLog('vxe.error.delProp', ['
|
|
592
|
+
warnLog('vxe.error.delProp', ['zoom={...}', 'zoom=boolean & zoom-options={...}']);
|
|
592
593
|
}
|
|
593
594
|
const customOpts = computeCustomOpts.value;
|
|
594
595
|
if (customOpts.isFooter) {
|
|
595
|
-
warnLog('vxe.error.delProp', ['
|
|
596
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.isFooter', 'table.custom-config.showFooter']);
|
|
596
597
|
}
|
|
597
598
|
if (customOpts.showFooter) {
|
|
598
|
-
warnLog('vxe.error.delProp', ['
|
|
599
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.showFooter', 'table.custom-config.showFooter']);
|
|
599
600
|
}
|
|
600
601
|
if (customOpts.immediate) {
|
|
601
|
-
warnLog('vxe.error.delProp', ['
|
|
602
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.immediate', 'table.custom-config.immediate']);
|
|
602
603
|
}
|
|
603
604
|
if (customOpts.trigger) {
|
|
604
|
-
warnLog('vxe.error.delProp', ['
|
|
605
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.trigger', 'table.custom-config.trigger']);
|
|
605
606
|
}
|
|
606
607
|
if (props.refresh || props.import || props.export || props.print || props.zoom) {
|
|
607
608
|
if (!VxeUIButtonComponent) {
|
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${"4.19.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
|
@@ -19,6 +19,10 @@ var _props2 = require("../../table/src/props");
|
|
|
19
19
|
var _table = _interopRequireDefault(require("../../table/src/table"));
|
|
20
20
|
var _toolbar = _interopRequireDefault(require("../../toolbar/src/toolbar"));
|
|
21
21
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
+
const {
|
|
23
|
+
warnLog,
|
|
24
|
+
errLog
|
|
25
|
+
} = (0, _log.createComponentLog)('grid');
|
|
22
26
|
const {
|
|
23
27
|
getConfig,
|
|
24
28
|
getI18n,
|
|
@@ -582,7 +586,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
582
586
|
if (slots[funcSlot]) {
|
|
583
587
|
return slots[funcSlot];
|
|
584
588
|
} else {
|
|
585
|
-
|
|
589
|
+
errLog('vxe.error.notSlot', [funcSlot]);
|
|
586
590
|
}
|
|
587
591
|
} else {
|
|
588
592
|
return funcSlot;
|
|
@@ -598,7 +602,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
598
602
|
if (slots[slotFunc]) {
|
|
599
603
|
slotConf[slotKey] = slots[slotFunc];
|
|
600
604
|
} else {
|
|
601
|
-
|
|
605
|
+
errLog('vxe.error.notSlot', [slotFunc]);
|
|
602
606
|
}
|
|
603
607
|
} else {
|
|
604
608
|
slotConf[slotKey] = slotFunc;
|
|
@@ -899,7 +903,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
899
903
|
childVNs.push(renderPager());
|
|
900
904
|
break;
|
|
901
905
|
default:
|
|
902
|
-
|
|
906
|
+
errLog('vxe.error.notProp', [`layouts -> ${key}`]);
|
|
903
907
|
break;
|
|
904
908
|
}
|
|
905
909
|
});
|
|
@@ -1286,7 +1290,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1286
1290
|
};
|
|
1287
1291
|
});
|
|
1288
1292
|
} else {
|
|
1289
|
-
|
|
1293
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.query']);
|
|
1290
1294
|
}
|
|
1291
1295
|
break;
|
|
1292
1296
|
}
|
|
@@ -1334,7 +1338,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1334
1338
|
};
|
|
1335
1339
|
});
|
|
1336
1340
|
} else {
|
|
1337
|
-
|
|
1341
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.queryFooter']);
|
|
1338
1342
|
}
|
|
1339
1343
|
break;
|
|
1340
1344
|
}
|
|
@@ -1425,7 +1429,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1425
1429
|
}
|
|
1426
1430
|
}
|
|
1427
1431
|
} else {
|
|
1428
|
-
|
|
1432
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete']);
|
|
1429
1433
|
}
|
|
1430
1434
|
break;
|
|
1431
1435
|
}
|
|
@@ -1532,7 +1536,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1532
1536
|
}
|
|
1533
1537
|
});
|
|
1534
1538
|
} else {
|
|
1535
|
-
|
|
1539
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.save']);
|
|
1536
1540
|
}
|
|
1537
1541
|
break;
|
|
1538
1542
|
}
|
|
@@ -1550,7 +1554,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1550
1554
|
$gantt: null
|
|
1551
1555
|
}, ...args);
|
|
1552
1556
|
} else {
|
|
1553
|
-
|
|
1557
|
+
errLog('vxe.error.notCommands', [code]);
|
|
1554
1558
|
}
|
|
1555
1559
|
}
|
|
1556
1560
|
}
|
|
@@ -1824,7 +1828,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1824
1828
|
_xeUtils.default.each(column.slots, func => {
|
|
1825
1829
|
if (!_xeUtils.default.isFunction(func)) {
|
|
1826
1830
|
if (!slots[func]) {
|
|
1827
|
-
|
|
1831
|
+
errLog('vxe.error.notSlot', [func]);
|
|
1828
1832
|
}
|
|
1829
1833
|
}
|
|
1830
1834
|
});
|
|
@@ -1901,12 +1905,12 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1901
1905
|
const proxyOpts = computeProxyOpts.value;
|
|
1902
1906
|
if (props.formConfig) {
|
|
1903
1907
|
if (!VxeUIFormComponent) {
|
|
1904
|
-
|
|
1908
|
+
errLog('vxe.error.reqComp', ['vxe-form']);
|
|
1905
1909
|
}
|
|
1906
1910
|
}
|
|
1907
1911
|
if (props.pagerConfig) {
|
|
1908
1912
|
if (!VxeUIPagerComponent) {
|
|
1909
|
-
|
|
1913
|
+
errLog('vxe.error.reqComp', ['vxe-pager']);
|
|
1910
1914
|
}
|
|
1911
1915
|
}
|
|
1912
1916
|
// const { data, columns, proxyConfig } = props
|
|
@@ -1915,7 +1919,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1915
1919
|
// errLog('vxe.error.errConflicts', ['[grid] data', 'proxy-config'])
|
|
1916
1920
|
// }
|
|
1917
1921
|
if (proxyOpts.props) {
|
|
1918
|
-
|
|
1922
|
+
warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response']);
|
|
1919
1923
|
}
|
|
1920
1924
|
if (columns && columns.length) {
|
|
1921
1925
|
$xeGrid.loadColumn(columns);
|