vxe-table 4.7.5 → 4.7.7
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 +10 -9
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/hook.js +8 -15
- package/es/table/module/custom/panel.js +166 -102
- package/es/table/module/edit/hook.js +11 -10
- package/es/table/module/export/hook.js +31 -11
- package/es/table/module/validator/hook.js +6 -5
- package/es/table/render/index.js +3 -2
- package/es/table/src/columnInfo.js +10 -8
- package/es/table/src/table.js +143 -85
- package/es/table/style.css +49 -12
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +12 -11
- package/es/ui/index.js +6 -3
- package/es/ui/src/log.js +5 -0
- package/es/vxe-table/style.css +49 -12
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +9 -9
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +348 -206
- 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/hook.js +8 -17
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +96 -42
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +10 -10
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/hook.js +33 -12
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/validator/hook.js +6 -6
- package/lib/table/module/validator/hook.min.js +1 -1
- package/lib/table/render/index.js +3 -3
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/columnInfo.js +10 -9
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/table.js +149 -85
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +49 -12
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +11 -11
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +6 -3
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +13 -0
- package/lib/ui/src/log.min.js +1 -0
- package/lib/vxe-table/style/style.css +49 -12
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +10 -9
- package/packages/table/module/custom/hook.ts +10 -17
- package/packages/table/module/custom/panel.ts +166 -104
- package/packages/table/module/edit/hook.ts +11 -10
- package/packages/table/module/export/hook.ts +35 -13
- package/packages/table/module/validator/hook.ts +6 -5
- package/packages/table/render/index.ts +3 -2
- package/packages/table/src/columnInfo.ts +11 -8
- package/packages/table/src/table.ts +142 -85
- package/packages/toolbar/src/toolbar.ts +12 -11
- package/packages/ui/index.ts +4 -1
- package/packages/ui/src/log.ts +8 -0
- package/styles/components/table-module/custom.scss +45 -9
- package/styles/components/table.scss +1 -0
|
@@ -4,7 +4,8 @@ import { VxeUI } from '../../../ui';
|
|
|
4
4
|
import { getFuncText, eqEmptyValue } from '../../../ui/src/utils';
|
|
5
5
|
import { scrollToView } from '../../../ui/src/dom';
|
|
6
6
|
import { handleFieldOrColumn, getRowid } from '../../src/util';
|
|
7
|
-
|
|
7
|
+
import { warnLog, errLog } from '../../../ui/src/log';
|
|
8
|
+
const { getConfig, validators, hooks } = VxeUI;
|
|
8
9
|
/**
|
|
9
10
|
* 校验规则
|
|
10
11
|
*/
|
|
@@ -229,7 +230,7 @@ hooks.add('tableValidatorModule', {
|
|
|
229
230
|
fullValidate(rows, cb) {
|
|
230
231
|
if (process.env.NODE_ENV === 'development') {
|
|
231
232
|
if (XEUtils.isFunction(cb)) {
|
|
232
|
-
|
|
233
|
+
warnLog('vxe.error.notValidators', ['fullValidate(rows, callback)', 'fullValidate(rows)']);
|
|
233
234
|
}
|
|
234
235
|
}
|
|
235
236
|
return beginValidate(rows, cb, true);
|
|
@@ -240,7 +241,7 @@ hooks.add('tableValidatorModule', {
|
|
|
240
241
|
validate(rows, cb) {
|
|
241
242
|
if (process.env.NODE_ENV === 'development') {
|
|
242
243
|
if (XEUtils.isFunction(cb)) {
|
|
243
|
-
|
|
244
|
+
warnLog('vxe.error.notValidators', ['validate(rows, callback)', 'validate(rows)']);
|
|
244
245
|
}
|
|
245
246
|
}
|
|
246
247
|
return beginValidate(rows, cb);
|
|
@@ -362,13 +363,13 @@ hooks.add('tableValidatorModule', {
|
|
|
362
363
|
}
|
|
363
364
|
else {
|
|
364
365
|
if (process.env.NODE_ENV === 'development') {
|
|
365
|
-
|
|
366
|
+
warnLog('vxe.error.notValidators', [validator]);
|
|
366
367
|
}
|
|
367
368
|
}
|
|
368
369
|
}
|
|
369
370
|
else {
|
|
370
371
|
if (process.env.NODE_ENV === 'development') {
|
|
371
|
-
|
|
372
|
+
errLog('vxe.error.notValidators', [validator]);
|
|
372
373
|
}
|
|
373
374
|
}
|
|
374
375
|
}
|
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 } from '../../ui/src/vn';
|
|
7
|
-
|
|
7
|
+
import { errLog } from '../../ui/src/log';
|
|
8
|
+
const { getConfig, renderer, getI18n } = VxeUI;
|
|
8
9
|
const componentDefaultModelProp = 'modelValue';
|
|
9
10
|
const defaultCompProps = { transfer: true };
|
|
10
11
|
function getModelEvent(renderOpts) {
|
|
@@ -159,7 +160,7 @@ function getComponentOns(renderOpts, params, modelFunc, changeFunc) {
|
|
|
159
160
|
ons[getOnName(key)] = function (...args) {
|
|
160
161
|
if (process.env.NODE_ENV === 'development') {
|
|
161
162
|
if (!XEUtils.isFunction(func)) {
|
|
162
|
-
|
|
163
|
+
errLog('vxe.error.errFunc', [func]);
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
166
|
func(params, ...args);
|
|
@@ -2,7 +2,8 @@ import XEUtils from 'xe-utils';
|
|
|
2
2
|
import { VxeUI } from '../../ui';
|
|
3
3
|
import { toFilters } from './util';
|
|
4
4
|
import { getFuncText } from '../../ui/src/utils';
|
|
5
|
-
|
|
5
|
+
import { warnLog, errLog } from '../../ui/src/log';
|
|
6
|
+
const { getI18n, formats } = VxeUI;
|
|
6
7
|
export class ColumnInfo {
|
|
7
8
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
8
9
|
constructor($xeTable, _vm, { renderHeader, renderCell, renderFooter, renderData } = {}) {
|
|
@@ -12,16 +13,16 @@ export class ColumnInfo {
|
|
|
12
13
|
if (process.env.NODE_ENV === 'development') {
|
|
13
14
|
const types = ['seq', 'checkbox', 'radio', 'expand', 'html'];
|
|
14
15
|
if (_vm.type && types.indexOf(_vm.type) === -1) {
|
|
15
|
-
|
|
16
|
+
warnLog('vxe.error.errProp', [`type=${_vm.type}`, types.join(', ')]);
|
|
16
17
|
}
|
|
17
18
|
if (XEUtils.isBoolean(_vm.cellRender) || (_vm.cellRender && !XEUtils.isObject(_vm.cellRender))) {
|
|
18
|
-
|
|
19
|
+
warnLog('vxe.error.errProp', [`column.cell-render=${_vm.cellRender}`, 'column.cell-render={}']);
|
|
19
20
|
}
|
|
20
21
|
if (XEUtils.isBoolean(_vm.editRender) || (_vm.editRender && !XEUtils.isObject(_vm.editRender))) {
|
|
21
|
-
|
|
22
|
+
warnLog('vxe.error.errProp', [`column.edit-render=${_vm.editRender}`, 'column.edit-render={}']);
|
|
22
23
|
}
|
|
23
24
|
if (_vm.cellRender && _vm.editRender) {
|
|
24
|
-
|
|
25
|
+
warnLog('vxe.error.errConflicts', ['column.cell-render', 'column.edit-render']);
|
|
25
26
|
}
|
|
26
27
|
if (_vm.type === 'expand') {
|
|
27
28
|
const { props: tableProps } = $xeTable;
|
|
@@ -29,20 +30,20 @@ export class ColumnInfo {
|
|
|
29
30
|
const { computeTreeOpts } = $xeTable.getComputeMaps();
|
|
30
31
|
const treeOpts = computeTreeOpts.value;
|
|
31
32
|
if (treeConfig && (treeOpts.showLine || treeOpts.line)) {
|
|
32
|
-
|
|
33
|
+
errLog('vxe.error.errConflicts', ['tree-config.showLine', 'column.type=expand']);
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
if (formatter) {
|
|
36
37
|
if (XEUtils.isString(formatter)) {
|
|
37
38
|
const gFormatOpts = formats.get(formatter) || XEUtils[formatter];
|
|
38
39
|
if (!gFormatOpts || !XEUtils.isFunction(gFormatOpts.cellFormatMethod)) {
|
|
39
|
-
|
|
40
|
+
errLog('vxe.error.notFormats', [formatter]);
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
else if (XEUtils.isArray(formatter)) {
|
|
43
44
|
const gFormatOpts = formats.get(formatter[0]) || XEUtils[formatter[0]];
|
|
44
45
|
if (!gFormatOpts || !XEUtils.isFunction(gFormatOpts.cellFormatMethod)) {
|
|
45
|
-
|
|
46
|
+
errLog('vxe.error.notFormats', [formatter[0]]);
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
}
|
|
@@ -117,6 +118,7 @@ export class ColumnInfo {
|
|
|
117
118
|
renderVisible: false,
|
|
118
119
|
renderWidth: 0,
|
|
119
120
|
renderHeight: 0,
|
|
121
|
+
renderResizeWidth: 0,
|
|
120
122
|
resizeWidth: 0,
|
|
121
123
|
renderLeft: 0,
|
|
122
124
|
renderArgs: [],
|