vxe-table 4.19.16 → 4.19.18
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 +262 -230
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/grid/src/grid.js +12 -11
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/panel.js +7 -3
- 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 +2 -1
- 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 +8 -7
- package/es/table/src/emits.js +4 -4
- package/es/table/src/footer.js +5 -5
- package/es/table/src/header.js +10 -8
- package/es/table/src/table.js +10 -3
- 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.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +1144 -1073
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/panel.js +13 -7
- 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 +15 -11
- 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 +19 -9
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/emits.js +9 -1
- package/lib/table/src/footer.js +5 -4
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +12 -8
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +43 -42
- 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 +3 -3
- package/packages/grid/src/grid.ts +13 -11
- package/packages/table/module/custom/panel.ts +8 -3
- 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 +3 -1
- 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/footer.ts +5 -5
- package/packages/table/src/header.ts +10 -8
- package/packages/table/src/table.ts +9 -2
- package/packages/table/src/util.ts +2 -16
- package/packages/toolbar/src/toolbar.ts +17 -15
- package/packages/ui/src/log.ts +13 -3
- package/styles/theme/dark.scss +1 -1
- package/styles/variable.scss +1 -1
- /package/es/{iconfont.1781753820219.ttf → iconfont.1782186482222.ttf} +0 -0
- /package/es/{iconfont.1781753820219.woff → iconfont.1782186482222.woff} +0 -0
- /package/es/{iconfont.1781753820219.woff2 → iconfont.1782186482222.woff2} +0 -0
- /package/lib/{iconfont.1781753820219.ttf → iconfont.1782186482222.ttf} +0 -0
- /package/lib/{iconfont.1781753820219.woff → iconfont.1782186482222.woff} +0 -0
- /package/lib/{iconfont.1781753820219.woff2 → iconfont.1782186482222.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 {
|
|
@@ -1021,8 +1022,11 @@ export default defineVxeComponent({
|
|
|
1021
1022
|
const resizeParams = {
|
|
1022
1023
|
$table: $xeTable,
|
|
1023
1024
|
column,
|
|
1024
|
-
columnIndex:
|
|
1025
|
-
$columnIndex:
|
|
1025
|
+
columnIndex: $xeTable.getColumnIndex(column),
|
|
1026
|
+
$columnIndex: $xeTable.getVMColumnIndex(column),
|
|
1027
|
+
_columnIndex: $xeTable.getVTColumnIndex(column),
|
|
1028
|
+
rowIndex: -1,
|
|
1029
|
+
_rowIndex: -1,
|
|
1026
1030
|
$rowIndex: -1
|
|
1027
1031
|
};
|
|
1028
1032
|
if (reMinWidth) {
|
|
@@ -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';
|
|
@@ -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 */
|
|
@@ -140,11 +141,11 @@ export class ColumnInfo {
|
|
|
140
141
|
// 跨列
|
|
141
142
|
colSpan: 1,
|
|
142
143
|
// 数据排序
|
|
143
|
-
order: null,
|
|
144
|
-
sortTime: 0,
|
|
144
|
+
order: null, // 用于记录排序类型,升序和倒序
|
|
145
|
+
sortTime: 0, // 用于多列的先后顺序
|
|
145
146
|
// 列排序
|
|
146
|
-
sortNumber: 0,
|
|
147
|
-
renderSortNumber: 0,
|
|
147
|
+
sortNumber: 0, // 用于记录自定义列顺序
|
|
148
|
+
renderSortNumber: 0, // 用于记录自定义列顺序
|
|
148
149
|
renderAggFn: '',
|
|
149
150
|
renderAggDigits: null,
|
|
150
151
|
renderAggFormat: null,
|
|
@@ -154,9 +155,9 @@ export class ColumnInfo {
|
|
|
154
155
|
renderHeight: 0,
|
|
155
156
|
renderResizeWidth: 0,
|
|
156
157
|
renderAutoWidth: 0,
|
|
157
|
-
resizeWidth: 0,
|
|
158
|
+
resizeWidth: 0, // 手动调整
|
|
158
159
|
renderLeft: 0,
|
|
159
|
-
renderArgs: [],
|
|
160
|
+
renderArgs: [], // 渲染参数可用于扩展
|
|
160
161
|
model: {},
|
|
161
162
|
renderHeader: renderHeader || colConfs.renderHeader,
|
|
162
163
|
renderCell: renderCell || colConfs.renderCell,
|
package/es/table/src/emits.js
CHANGED
|
@@ -15,7 +15,7 @@ export const tableEmits = [
|
|
|
15
15
|
'columns-change',
|
|
16
16
|
'data-change',
|
|
17
17
|
'footer-data-change',
|
|
18
|
-
'current-change',
|
|
18
|
+
'current-change', // 已废弃
|
|
19
19
|
'current-row-change',
|
|
20
20
|
'current-row-disabled',
|
|
21
21
|
'current-column-change',
|
|
@@ -49,7 +49,7 @@ export const tableEmits = [
|
|
|
49
49
|
'filter-visible',
|
|
50
50
|
'clear-filter',
|
|
51
51
|
'clear-all-filter',
|
|
52
|
-
'resizable-change',
|
|
52
|
+
'resizable-change', // 废弃
|
|
53
53
|
'column-resizable-change',
|
|
54
54
|
'row-resizable-change',
|
|
55
55
|
'toggle-row-group-expand',
|
|
@@ -67,7 +67,7 @@ export const tableEmits = [
|
|
|
67
67
|
'column-dragend',
|
|
68
68
|
'enter-append-row',
|
|
69
69
|
'tab-append-row',
|
|
70
|
-
'edit-actived',
|
|
70
|
+
'edit-actived', // 废弃
|
|
71
71
|
'edit-activated',
|
|
72
72
|
'edit-disabled',
|
|
73
73
|
'valid-error',
|
|
@@ -78,7 +78,7 @@ export const tableEmits = [
|
|
|
78
78
|
'custom-visible-all',
|
|
79
79
|
'custom-fixed-change',
|
|
80
80
|
'custom-sort-change',
|
|
81
|
-
'change-fnr',
|
|
81
|
+
'change-fnr', // 废弃
|
|
82
82
|
'open-fnr',
|
|
83
83
|
'show-fnr',
|
|
84
84
|
'hide-fnr',
|
package/es/table/src/footer.js
CHANGED
|
@@ -206,17 +206,17 @@ export default defineVxeComponent({
|
|
|
206
206
|
const renderHeads = (isOptimizeMode, renderColumnList) => {
|
|
207
207
|
const { fixedType, footerTableData } = props;
|
|
208
208
|
const { footerRowClassName, footerRowStyle } = tableProps;
|
|
209
|
-
return footerTableData.map((row,
|
|
210
|
-
const
|
|
211
|
-
const rowParams = { $table: $xeTable, row, _rowIndex, $rowIndex, fixed: fixedType, type: renderType };
|
|
209
|
+
return footerTableData.map((row, _rowIndex) => {
|
|
210
|
+
const $rowIndex = _rowIndex;
|
|
211
|
+
const rowParams = { $table: $xeTable, row, rowIndex: _rowIndex, _rowIndex, $rowIndex, fixed: fixedType, type: renderType };
|
|
212
212
|
return h('tr', {
|
|
213
|
-
key:
|
|
213
|
+
key: _rowIndex,
|
|
214
214
|
class: [
|
|
215
215
|
'vxe-footer--row',
|
|
216
216
|
footerRowClassName ? XEUtils.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''
|
|
217
217
|
],
|
|
218
218
|
style: footerRowStyle ? (XEUtils.isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle) : null
|
|
219
|
-
}, renderRows(isOptimizeMode, renderColumnList, footerTableData, row,
|
|
219
|
+
}, renderRows(isOptimizeMode, renderColumnList, footerTableData, row, _rowIndex, _rowIndex));
|
|
220
220
|
});
|
|
221
221
|
};
|
|
222
222
|
const renderVN = () => {
|
package/es/table/src/header.js
CHANGED
|
@@ -48,7 +48,7 @@ export default defineVxeComponent({
|
|
|
48
48
|
$xeTable.dispatchEvent('columns-change', { visibleColgroups, collectColumn, visibleColumn }, null);
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
-
const renderRows = (isGroup, isOptimizeMode, headerGroups,
|
|
51
|
+
const renderRows = (isGroup, isOptimizeMode, headerGroups, _rowIndex, cols) => {
|
|
52
52
|
const $xeGrid = $xeTable.xeGrid;
|
|
53
53
|
const $xeGantt = $xeTable.xeGantt;
|
|
54
54
|
const { fixedType } = props;
|
|
@@ -63,7 +63,7 @@ export default defineVxeComponent({
|
|
|
63
63
|
const headerCellOpts = computeHeaderCellOpts.value;
|
|
64
64
|
const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight;
|
|
65
65
|
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts;
|
|
66
|
-
const isLastRow =
|
|
66
|
+
const isLastRow = _rowIndex === headerGroups.length - 1;
|
|
67
67
|
return cols.map((column, $columnIndex) => {
|
|
68
68
|
const { type, showHeaderOverflow, headerAlign, align, filters, headerClassName, editRender, cellRender } = column;
|
|
69
69
|
const colid = column.id;
|
|
@@ -91,7 +91,9 @@ export default defineVxeComponent({
|
|
|
91
91
|
$table: $xeTable,
|
|
92
92
|
$grid: $xeGrid,
|
|
93
93
|
$gantt: $xeGantt,
|
|
94
|
-
|
|
94
|
+
rowIndex: _rowIndex,
|
|
95
|
+
_rowIndex,
|
|
96
|
+
$rowIndex: _rowIndex,
|
|
95
97
|
column,
|
|
96
98
|
columnIndex,
|
|
97
99
|
$columnIndex,
|
|
@@ -113,7 +115,7 @@ export default defineVxeComponent({
|
|
|
113
115
|
thAttrs.rowspan = column.rowSpan > 1 ? column.rowSpan : null;
|
|
114
116
|
}
|
|
115
117
|
if (mergeHeadFlag && mergeHeaderList.length && (showCustomHeader || isLastRow)) {
|
|
116
|
-
const spanRest = mergeHeaderCellMaps[`${
|
|
118
|
+
const spanRest = mergeHeaderCellMaps[`${_rowIndex}:${showCustomHeader ? $columnIndex : _columnIndex}`];
|
|
117
119
|
if (spanRest) {
|
|
118
120
|
const { rowspan, colspan } = spanRest;
|
|
119
121
|
if (!rowspan || !colspan) {
|
|
@@ -331,16 +333,16 @@ export default defineVxeComponent({
|
|
|
331
333
|
const { fixedType } = props;
|
|
332
334
|
const { headerRowClassName, headerRowStyle } = tableProps;
|
|
333
335
|
const floatingFilterOpts = computeFloatingFilterOpts.value;
|
|
334
|
-
const rowVNs = headerGroups.map((cols,
|
|
335
|
-
const params = { $table: $xeTable, $rowIndex, fixed: fixedType, type: renderType };
|
|
336
|
+
const rowVNs = headerGroups.map((cols, _rowIndex) => {
|
|
337
|
+
const params = { $table: $xeTable, rowIndex: _rowIndex, _rowIndex, $rowIndex: _rowIndex, fixed: fixedType, type: renderType };
|
|
336
338
|
return h('tr', {
|
|
337
|
-
key:
|
|
339
|
+
key: _rowIndex,
|
|
338
340
|
class: [
|
|
339
341
|
'vxe-header--row',
|
|
340
342
|
headerRowClassName ? (XEUtils.isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName) : ''
|
|
341
343
|
],
|
|
342
344
|
style: headerRowStyle ? (XEUtils.isFunction(headerRowStyle) ? headerRowStyle(params) : headerRowStyle) : null
|
|
343
|
-
}, renderRows(isGroup, isOptimizeMode, headerGroups,
|
|
345
|
+
}, renderRows(isGroup, isOptimizeMode, headerGroups, _rowIndex, cols));
|
|
344
346
|
});
|
|
345
347
|
if (floatingFilterOpts.enabled) {
|
|
346
348
|
rowVNs.push(h('tr', {
|
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';
|
|
@@ -6958,7 +6959,7 @@ export default defineVxeComponent({
|
|
|
6958
6959
|
style: null,
|
|
6959
6960
|
options: [],
|
|
6960
6961
|
column: null,
|
|
6961
|
-
multiple: false,
|
|
6962
|
+
multiple: false, // 选项是覅多选
|
|
6962
6963
|
visible: false
|
|
6963
6964
|
});
|
|
6964
6965
|
}
|
|
@@ -10667,7 +10668,13 @@ export default defineVxeComponent({
|
|
|
10667
10668
|
}
|
|
10668
10669
|
if (editOpts.trigger === 'manual') {
|
|
10669
10670
|
if (actived.args && actived.row === row && column !== actived.column) {
|
|
10670
|
-
|
|
10671
|
+
if (editOpts.mode === 'row') {
|
|
10672
|
+
handleChangeCell(evnt, params);
|
|
10673
|
+
}
|
|
10674
|
+
else {
|
|
10675
|
+
checkValidate('blur')
|
|
10676
|
+
.catch((e) => e);
|
|
10677
|
+
}
|
|
10671
10678
|
}
|
|
10672
10679
|
}
|
|
10673
10680
|
else if (!actived.args || row !== actived.row || column !== actived.column) {
|
|
@@ -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.18"}`;
|
|
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);
|