vxe-table 3.7.0-beta.6 → 3.7.0-beta.8
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/README.md +6 -9
- package/lib/filter/src/mixin.js +13 -7
- package/lib/filter/src/mixin.min.js +1 -1
- package/lib/form/src/form.js +24 -4
- package/lib/form/src/form.min.js +1 -1
- package/lib/grid/src/grid.js +7 -3
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.umd.js +352 -89
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +6 -1
- package/lib/input/src/input.min.js +1 -1
- package/lib/locale/lang/en-US.js +8 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +8 -0
- package/lib/locale/lang/es-ES.js +8 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +8 -0
- package/lib/locale/lang/ja-JP.d.ts +1 -1
- package/lib/locale/lang/ja-JP.js +8 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +8 -0
- package/lib/locale/lang/pt-BR.d.ts +8 -0
- package/lib/locale/lang/pt-BR.js +330 -0
- package/lib/locale/lang/pt-BR.min.js +1 -0
- package/lib/locale/lang/pt-BR.umd.js +344 -0
- package/lib/locale/lang/zh-CN.d.ts +1 -1
- package/lib/locale/lang/zh-CN.js +8 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +8 -0
- package/lib/locale/lang/zh-HK.d.ts +1 -1
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +8 -0
- package/lib/locale/lang/zh-MO.d.ts +1 -1
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +8 -0
- package/lib/locale/lang/zh-TC.d.ts +1 -1
- package/lib/locale/lang/zh-TC.js +8 -0
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +8 -0
- package/lib/locale/lang/zh-TW.d.ts +1 -1
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +8 -0
- package/lib/menu/src/mixin.js +3 -3
- package/lib/menu/src/mixin.min.js +1 -1
- package/lib/select/src/select.js +6 -1
- package/lib/select/src/select.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/cell.js +2 -0
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/columnInfo.js +6 -6
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +43 -16
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +11 -24
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +2 -2
- package/lib/table/style/style.min.css +1 -1
- package/lib/textarea/src/textarea.js +6 -1
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +18 -6
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/v-x-e-table/index.js +3 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/commands.js +58 -2
- package/lib/v-x-e-table/src/commands.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +4 -1
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/lib/v-x-e-table/src/formats.js +58 -2
- package/lib/v-x-e-table/src/formats.min.js +1 -1
- package/lib/v-x-e-table/src/menus.js +58 -2
- package/lib/v-x-e-table/src/menus.min.js +1 -1
- package/lib/v-x-e-table/src/renderer.js +10 -0
- package/lib/v-x-e-table/src/renderer.min.js +1 -1
- package/lib/v-x-e-table/src/store.js +5 -2
- package/lib/v-x-e-table/src/store.min.js +1 -1
- package/lib/v-x-e-table/src/validators.js +15 -0
- package/lib/v-x-e-table/src/validators.min.js +1 -0
- package/lib/validator/src/mixin.js +26 -4
- package/lib/validator/src/mixin.min.js +1 -1
- package/package.json +2 -2
- package/packages/filter/src/mixin.js +5 -1
- package/packages/form/src/form.js +24 -5
- package/packages/grid/src/grid.js +7 -3
- package/packages/input/src/input.js +4 -1
- package/packages/locale/lang/en-US.js +8 -0
- package/packages/locale/lang/es-ES.js +8 -0
- package/packages/locale/lang/ja-JP.d.ts +1 -1
- package/packages/locale/lang/ja-JP.js +8 -0
- package/packages/locale/lang/pt-BR.d.ts +8 -0
- package/packages/locale/lang/pt-BR.js +323 -0
- package/packages/locale/lang/zh-CN.d.ts +1 -1
- package/packages/locale/lang/zh-CN.js +8 -0
- package/packages/locale/lang/zh-HK.d.ts +1 -1
- package/packages/locale/lang/zh-MO.d.ts +1 -1
- package/packages/locale/lang/zh-TC.d.ts +1 -1
- package/packages/locale/lang/zh-TC.js +8 -0
- package/packages/locale/lang/zh-TW.d.ts +1 -1
- package/packages/menu/src/mixin.js +3 -3
- package/packages/select/src/select.js +4 -1
- package/packages/table/src/cell.js +2 -0
- package/packages/table/src/columnInfo.js +6 -6
- package/packages/table/src/methods.js +36 -15
- package/packages/table/src/table.js +5 -1
- package/packages/textarea/src/textarea.js +4 -1
- package/packages/toolbar/src/toolbar.js +18 -6
- package/packages/v-x-e-table/index.js +2 -0
- package/packages/v-x-e-table/src/commands.js +48 -2
- package/packages/v-x-e-table/src/conf.js +4 -1
- package/packages/v-x-e-table/src/formats.js +48 -2
- package/packages/v-x-e-table/src/menus.js +48 -2
- package/packages/v-x-e-table/src/renderer.js +11 -1
- package/packages/v-x-e-table/src/store.js +4 -2
- package/packages/v-x-e-table/src/validators.js +7 -0
- package/packages/validator/src/mixin.js +25 -4
- package/styles/all.scss +30 -0
- package/styles/css-variable.scss +272 -0
- package/styles/cssvar.scss +2 -275
- package/styles/index.scss +2 -0
- package/styles/modules.scss +4 -1
- package/styles/table.scss +4 -4
- package/styles/tooltip.scss +2 -2
- package/styles/variable.scss +1 -4
- package/types/form.d.ts +14 -12
- package/types/table.d.ts +4 -0
- package/types/v-x-e-table/commands.d.ts +21 -13
- package/types/v-x-e-table/formats.d.ts +19 -12
- package/types/v-x-e-table/index.d.ts +7 -1
- package/types/v-x-e-table/menus.d.ts +17 -6
- package/types/v-x-e-table/validators.d.ts +30 -0
- package/types/validator.d.ts +15 -4
- /package/lib/icon/style/{iconfont.1689639571797.ttf → iconfont.1690504677290.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1689639571797.woff → iconfont.1690504677290.woff} +0 -0
- /package/lib/icon/style/{iconfont.1689639571797.woff2 → iconfont.1690504677290.woff2} +0 -0
- /package/lib/{iconfont.1689639571797.ttf → iconfont.1690504677290.ttf} +0 -0
- /package/lib/{iconfont.1689639571797.woff → iconfont.1690504677290.woff} +0 -0
- /package/lib/{iconfont.1689639571797.woff2 → iconfont.1690504677290.woff2} +0 -0
package/types/table.d.ts
CHANGED
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
import { ToolbarButtonConfig } from '../toolbar'
|
|
2
|
-
import {
|
|
2
|
+
import { Table } from '../table'
|
|
3
3
|
|
|
4
4
|
/* eslint-disable no-use-before-define */
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
export namespace VxeGlobalCommandsHandles {
|
|
7
|
+
export interface CommandsOptions {
|
|
8
|
+
commandMethod?: (params: CommandMethodParams, ...args: any[]) => void
|
|
9
|
+
}
|
|
10
|
+
export interface CommandMethodParams {
|
|
11
|
+
$table: Table;
|
|
12
|
+
code: string;
|
|
13
|
+
button?: ToolbarButtonConfig;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
7
16
|
|
|
8
17
|
/**
|
|
9
|
-
*
|
|
18
|
+
* 全局格式化
|
|
10
19
|
*/
|
|
11
|
-
export
|
|
12
|
-
mixin(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
button?: ToolbarButtonConfig;
|
|
20
|
+
export interface VxeGlobalCommands {
|
|
21
|
+
mixin(opts: {
|
|
22
|
+
[name: string]: VxeGlobalCommandsHandles.CommandsOptions | ((params: VxeGlobalCommandsHandles.CommandMethodParams, ...args: any[]) => void)
|
|
23
|
+
}): VxeGlobalCommands
|
|
24
|
+
has(name: string): boolean
|
|
25
|
+
get(name: string): VxeGlobalCommandsHandles.CommandsOptions
|
|
26
|
+
add(name: string, options: VxeGlobalCommandsHandles.CommandsOptions | ((params: VxeGlobalCommandsHandles.CommandMethodParams, ...args: any[]) => void)): VxeGlobalCommands
|
|
27
|
+
delete(name: string): void
|
|
28
|
+
forEach(callback: (options: VxeGlobalCommandsHandles.CommandsOptions, name: string) => void): void
|
|
21
29
|
}
|
|
@@ -2,20 +2,27 @@ import { ColumnInfo } from '../column'
|
|
|
2
2
|
|
|
3
3
|
/* eslint-disable no-use-before-define */
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
export namespace VxeGlobalFormatsHandles {
|
|
6
|
+
export interface FormatsOptions {
|
|
7
|
+
formatMethod?: (params: FormatMethodParams, ...args: any[]) => string | number
|
|
8
|
+
}
|
|
9
|
+
export interface FormatMethodParams {
|
|
10
|
+
cellValue: any
|
|
11
|
+
row: any
|
|
12
|
+
column: ColumnInfo
|
|
13
|
+
}
|
|
14
|
+
}
|
|
6
15
|
|
|
7
16
|
/**
|
|
8
17
|
* 全局格式化
|
|
9
18
|
*/
|
|
10
|
-
export
|
|
11
|
-
mixin(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
row: any,
|
|
20
|
-
column: ColumnInfo;
|
|
19
|
+
export interface VxeGlobalFormats {
|
|
20
|
+
mixin(opts: {
|
|
21
|
+
[name: string]: VxeGlobalFormatsHandles.FormatsOptions | ((params: VxeGlobalFormatsHandles.FormatMethodParams, ...args: any[]) => string | number)
|
|
22
|
+
}): VxeGlobalFormats
|
|
23
|
+
has(name: string): boolean
|
|
24
|
+
get(name: string): VxeGlobalFormatsHandles.FormatsOptions
|
|
25
|
+
add(name: string, options: VxeGlobalFormatsHandles.FormatsOptions | ((params: VxeGlobalFormatsHandles.FormatMethodParams, ...args: any[]) => string | number)): VxeGlobalFormats
|
|
26
|
+
delete(name: string): void
|
|
27
|
+
forEach(callback: (options: VxeGlobalFormatsHandles.FormatsOptions, name: string) => void): void
|
|
21
28
|
}
|
|
@@ -8,6 +8,7 @@ import { VxeGlobalInterceptor } from './interceptor'
|
|
|
8
8
|
import { VxeGlobalCommands } from './commands'
|
|
9
9
|
import { VxeGlobalFormats } from './formats'
|
|
10
10
|
import { VxeGlobalMenus } from './menus'
|
|
11
|
+
import { VxeGlobalValidators } from './validators'
|
|
11
12
|
import { VxeGlobalSetup } from './setup'
|
|
12
13
|
|
|
13
14
|
/* eslint-disable no-use-before-define */
|
|
@@ -73,6 +74,10 @@ export interface VXETableCore {
|
|
|
73
74
|
* Table context menu
|
|
74
75
|
*/
|
|
75
76
|
menus: VxeGlobalMenus;
|
|
77
|
+
/**
|
|
78
|
+
* Validators table/form
|
|
79
|
+
*/
|
|
80
|
+
validators: VxeGlobalValidators
|
|
76
81
|
/**
|
|
77
82
|
* 弹窗
|
|
78
83
|
*/
|
|
@@ -103,7 +108,7 @@ export interface VXETableCore {
|
|
|
103
108
|
}
|
|
104
109
|
|
|
105
110
|
/**
|
|
106
|
-
* 一个基于 vue 的 PC
|
|
111
|
+
* 一个基于 vue 的 PC 端表单/表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、JSON 配置式为零代码而设计...
|
|
107
112
|
*/
|
|
108
113
|
export const VXETable: VXETableCore
|
|
109
114
|
|
|
@@ -112,6 +117,7 @@ export * from './interceptor'
|
|
|
112
117
|
export * from './commands'
|
|
113
118
|
export * from './formats'
|
|
114
119
|
export * from './menus'
|
|
120
|
+
export * from './validators'
|
|
115
121
|
export * from './setup'
|
|
116
122
|
|
|
117
123
|
export default VXETable
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
import { MenuLinkParams } from '../menu'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/* eslint-disable no-use-before-define */
|
|
4
|
+
|
|
5
|
+
export namespace VxeGlobalMenusHandles {
|
|
6
|
+
export type MenusOption = {
|
|
7
|
+
menuMethod?: (params: MenuMethodParams, event: Event) => any
|
|
8
|
+
}
|
|
9
|
+
export type MenuMethodParams = MenuLinkParams
|
|
10
|
+
}
|
|
4
11
|
|
|
5
12
|
/**
|
|
6
13
|
* 全局快捷菜单
|
|
7
14
|
*/
|
|
8
|
-
export
|
|
9
|
-
mixin(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
export interface VxeGlobalMenus {
|
|
16
|
+
mixin(opts: {
|
|
17
|
+
[code: string]: VxeGlobalMenusHandles.MenusOption | ((params: VxeGlobalMenusHandles.MenuMethodParams, event: Event) => any)
|
|
18
|
+
}): VxeGlobalMenus
|
|
19
|
+
has(code: string): boolean
|
|
20
|
+
get(code: string): VxeGlobalMenusHandles.MenusOption
|
|
21
|
+
add(code: string, options: VxeGlobalMenusHandles.MenusOption | ((params: VxeGlobalMenusHandles.MenuMethodParams, event: Event) => any)): VxeGlobalMenus
|
|
22
|
+
delete(code: string): void
|
|
23
|
+
forEach(callback: (options: VxeGlobalMenusHandles.MenusOption, code: string) => void): void
|
|
13
24
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CellRuleValidatorParams } from '../validator'
|
|
2
|
+
import { FormRuleValidatorParams } from '../form'
|
|
3
|
+
|
|
4
|
+
/* eslint-disable no-use-before-define */
|
|
5
|
+
|
|
6
|
+
export namespace VxeGlobalValidatorsHandles {
|
|
7
|
+
export interface ValidatorsOptions {
|
|
8
|
+
itemValidatorMethod?: ItemValidatorMethod
|
|
9
|
+
cellValidatorMethod?: CellValidatorMethod
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type ItemValidatorMethod = (params: ItemValidatorParams, ...args: any[]) => void | Error | Promise<any>
|
|
13
|
+
export type CellValidatorMethod = (params: CellValidatorParams, ...args: any[]) => void | Error | Promise<any>
|
|
14
|
+
export type ItemValidatorParams = FormRuleValidatorParams
|
|
15
|
+
export type CellValidatorParams = CellRuleValidatorParams
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 全局快捷菜单
|
|
20
|
+
*/
|
|
21
|
+
export interface VxeGlobalValidators {
|
|
22
|
+
mixin(options: {
|
|
23
|
+
[code: string]: VxeGlobalValidatorsHandles.ValidatorsOptions
|
|
24
|
+
}): VxeGlobalValidators
|
|
25
|
+
has(code: string): boolean
|
|
26
|
+
get(code: string): VxeGlobalValidatorsHandles.ValidatorsOptions
|
|
27
|
+
add(code: string, callback: VxeGlobalValidatorsHandles.ValidatorsOptions): VxeGlobalValidators
|
|
28
|
+
delete(code: string): void
|
|
29
|
+
forEach(callback: (options: VxeGlobalValidatorsHandles.ValidatorsOptions, code: string) => void): void
|
|
30
|
+
}
|
package/types/validator.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { VXETableComponent } from './component'
|
|
|
2
2
|
import { ColumnInfo } from './column'
|
|
3
3
|
import { Table } from './table'
|
|
4
4
|
|
|
5
|
+
/* eslint-disable no-use-before-define */
|
|
6
|
+
|
|
5
7
|
/**
|
|
6
8
|
* 表格校验
|
|
7
9
|
*/
|
|
@@ -32,7 +34,7 @@ export interface ColumnEditRule {
|
|
|
32
34
|
* 使用自定义校验函数,接收一个 Promise
|
|
33
35
|
* @param params 参数
|
|
34
36
|
*/
|
|
35
|
-
validator?:
|
|
37
|
+
validator?: string | ((params: CellRuleValidatorParams) => void | Error | Promise<any>);
|
|
36
38
|
/**
|
|
37
39
|
* 提示消息
|
|
38
40
|
*/
|
|
@@ -41,9 +43,18 @@ export interface ColumnEditRule {
|
|
|
41
43
|
maxWidth?: number;
|
|
42
44
|
}
|
|
43
45
|
|
|
44
|
-
export
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
export interface CellRuleValidatorParams {
|
|
47
|
+
$table: Table,
|
|
48
|
+
cellValue: any,
|
|
49
|
+
rule: ColumnEditRule;
|
|
50
|
+
rules: ColumnEditRule[];
|
|
51
|
+
column: ColumnInfo;
|
|
52
|
+
columnIndex: number;
|
|
53
|
+
row: any;
|
|
54
|
+
rowIndex: number;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function ColumnValidatorMethod(params: ColumnEditValidErrParams): void | Error | Promise<any>;
|
|
47
58
|
|
|
48
59
|
export interface ColumnEditValidErrParams {
|
|
49
60
|
$table: Table,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|