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,10 +4,11 @@ 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
|
+
import { warnLog, errLog } from '../../../ui/src/log'
|
|
7
8
|
|
|
8
9
|
import type { TableValidatorMethods, TableValidatorPrivateMethods, VxeTableDefines } from '../../../../types'
|
|
9
10
|
|
|
10
|
-
const { getConfig, validators, hooks
|
|
11
|
+
const { getConfig, validators, hooks } = VxeUI
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* 校验规则
|
|
@@ -253,7 +254,7 @@ hooks.add('tableValidatorModule', {
|
|
|
253
254
|
fullValidate (rows, cb) {
|
|
254
255
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
255
256
|
if (XEUtils.isFunction(cb)) {
|
|
256
|
-
|
|
257
|
+
warnLog('vxe.error.notValidators', ['fullValidate(rows, callback)', 'fullValidate(rows)'])
|
|
257
258
|
}
|
|
258
259
|
}
|
|
259
260
|
return beginValidate(rows, cb, true)
|
|
@@ -264,7 +265,7 @@ hooks.add('tableValidatorModule', {
|
|
|
264
265
|
validate (rows, cb) {
|
|
265
266
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
266
267
|
if (XEUtils.isFunction(cb)) {
|
|
267
|
-
|
|
268
|
+
warnLog('vxe.error.notValidators', ['validate(rows, callback)', 'validate(rows)'])
|
|
268
269
|
}
|
|
269
270
|
}
|
|
270
271
|
return beginValidate(rows, cb)
|
|
@@ -390,12 +391,12 @@ hooks.add('tableValidatorModule', {
|
|
|
390
391
|
customValid = gvItem.cellValidatorMethod(validParams)
|
|
391
392
|
} else {
|
|
392
393
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
393
|
-
|
|
394
|
+
warnLog('vxe.error.notValidators', [validator])
|
|
394
395
|
}
|
|
395
396
|
}
|
|
396
397
|
} else {
|
|
397
398
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
398
|
-
|
|
399
|
+
errLog('vxe.error.notValidators', [validator])
|
|
399
400
|
}
|
|
400
401
|
}
|
|
401
402
|
} else {
|
|
@@ -4,10 +4,11 @@ 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
|
+
import { errLog } from '../../ui/src/log'
|
|
7
8
|
|
|
8
9
|
import type { VxeGlobalRendererHandles, VxeColumnPropTypes, VxeButtonComponent } from '../../../types'
|
|
9
10
|
|
|
10
|
-
const { getConfig, renderer, getI18n
|
|
11
|
+
const { getConfig, renderer, getI18n } = VxeUI
|
|
11
12
|
|
|
12
13
|
const componentDefaultModelProp = 'modelValue'
|
|
13
14
|
|
|
@@ -181,7 +182,7 @@ function getComponentOns (renderOpts: any, params: any, modelFunc?: any, changeF
|
|
|
181
182
|
ons[getOnName(key)] = function (...args: any[]) {
|
|
182
183
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
183
184
|
if (!XEUtils.isFunction(func)) {
|
|
184
|
-
|
|
185
|
+
errLog('vxe.error.errFunc', [func])
|
|
185
186
|
}
|
|
186
187
|
}
|
|
187
188
|
func(params, ...args)
|
|
@@ -2,10 +2,11 @@ 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
|
+
import { warnLog, errLog } from '../../ui/src/log'
|
|
5
6
|
|
|
6
7
|
import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types'
|
|
7
8
|
|
|
8
|
-
const { getI18n, formats
|
|
9
|
+
const { getI18n, formats } = VxeUI
|
|
9
10
|
export class ColumnInfo {
|
|
10
11
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
11
12
|
constructor ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, _vm: any, { renderHeader, renderCell, renderFooter, renderData }: any = {}) {
|
|
@@ -16,16 +17,16 @@ export class ColumnInfo {
|
|
|
16
17
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
17
18
|
const types = ['seq', 'checkbox', 'radio', 'expand', 'html']
|
|
18
19
|
if (_vm.type && types.indexOf(_vm.type) === -1) {
|
|
19
|
-
|
|
20
|
+
warnLog('vxe.error.errProp', [`type=${_vm.type}`, types.join(', ')])
|
|
20
21
|
}
|
|
21
22
|
if (XEUtils.isBoolean(_vm.cellRender) || (_vm.cellRender && !XEUtils.isObject(_vm.cellRender))) {
|
|
22
|
-
|
|
23
|
+
warnLog('vxe.error.errProp', [`column.cell-render=${_vm.cellRender}`, 'column.cell-render={}'])
|
|
23
24
|
}
|
|
24
25
|
if (XEUtils.isBoolean(_vm.editRender) || (_vm.editRender && !XEUtils.isObject(_vm.editRender))) {
|
|
25
|
-
|
|
26
|
+
warnLog('vxe.error.errProp', [`column.edit-render=${_vm.editRender}`, 'column.edit-render={}'])
|
|
26
27
|
}
|
|
27
28
|
if (_vm.cellRender && _vm.editRender) {
|
|
28
|
-
|
|
29
|
+
warnLog('vxe.error.errConflicts', ['column.cell-render', 'column.edit-render'])
|
|
29
30
|
}
|
|
30
31
|
if (_vm.type === 'expand') {
|
|
31
32
|
const { props: tableProps } = $xeTable
|
|
@@ -33,19 +34,19 @@ export class ColumnInfo {
|
|
|
33
34
|
const { computeTreeOpts } = $xeTable.getComputeMaps()
|
|
34
35
|
const treeOpts = computeTreeOpts.value
|
|
35
36
|
if (treeConfig && (treeOpts.showLine || treeOpts.line)) {
|
|
36
|
-
|
|
37
|
+
errLog('vxe.error.errConflicts', ['tree-config.showLine', 'column.type=expand'])
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
if (formatter) {
|
|
40
41
|
if (XEUtils.isString(formatter)) {
|
|
41
42
|
const gFormatOpts = formats.get(formatter) || XEUtils[formatter]
|
|
42
43
|
if (!gFormatOpts || !XEUtils.isFunction(gFormatOpts.cellFormatMethod)) {
|
|
43
|
-
|
|
44
|
+
errLog('vxe.error.notFormats', [formatter])
|
|
44
45
|
}
|
|
45
46
|
} else if (XEUtils.isArray(formatter)) {
|
|
46
47
|
const gFormatOpts = formats.get(formatter[0]) || XEUtils[formatter[0]]
|
|
47
48
|
if (!gFormatOpts || !XEUtils.isFunction(gFormatOpts.cellFormatMethod)) {
|
|
48
|
-
|
|
49
|
+
errLog('vxe.error.notFormats', [formatter[0]])
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
}
|
|
@@ -126,7 +127,9 @@ export class ColumnInfo {
|
|
|
126
127
|
|
|
127
128
|
renderWidth: 0,
|
|
128
129
|
renderHeight: 0,
|
|
130
|
+
renderResizeWidth: 0,
|
|
129
131
|
resizeWidth: 0, // 手动调整
|
|
132
|
+
|
|
130
133
|
renderLeft: 0,
|
|
131
134
|
renderArgs: [], // 渲染参数可用于扩展
|
|
132
135
|
model: {},
|