Skip to content

Commit b290904

Browse files
committedJun 17, 2024·
releases 4.0.19
1 parent 4b60d80 commit b290904

File tree

6 files changed

+69
-12
lines changed

6 files changed

+69
-12
lines changed
 

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vxe-pc-ui",
3-
"version": "4.0.18",
3+
"version": "4.0.19",
44
"description": "A vue based PC component library",
55
"scripts": {
66
"update": "npm install --legacy-peer-deps",
@@ -25,7 +25,7 @@
2525
"style": "lib/style.css",
2626
"typings": "types/index.d.ts",
2727
"dependencies": {
28-
"@vxe-ui/core": "^1.0.6"
28+
"@vxe-ui/core": "^1.0.7"
2929
},
3030
"devDependencies": {
3131
"@types/resize-observer-browser": "^0.1.11",

‎types/ui/commands.d.ts

+17-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,28 @@ import { VxeGridConstructor } from '../components/grid'
22
import { VxeToolbarPropTypes } from '../components/toolbar'
33
import { VxeTableConstructor } from '../components/table'
44

5+
/* eslint-disable no-use-before-define */
6+
57
declare module '@vxe-ui/core' {
68
export namespace VxeGlobalCommandsHandles {
7-
export interface CommandMethodParams {
9+
export interface CommandsOptions {
10+
/**
11+
* 表格 - 自定义工具栏或数据代理的指令方法
12+
*/
13+
tableCommandMethod?: (params: TableCommandMethodParams, ...args: any[]) => void
14+
15+
/**
16+
* 已废弃,请使用 tableCommandMethod
17+
* @deprecated
18+
*/
19+
commandMethod?: (params: TableCommandMethodParams, ...args: any[]) => void
20+
}
21+
22+
export interface TableCommandMethodParams {
823
$grid: VxeGridConstructor | null
924
$table: VxeTableConstructor
1025
button?: VxeToolbarPropTypes.ButtonConfig | null
26+
code?: string
1127
}
1228
}
1329
}

‎types/ui/formats.d.ts

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
import { VxeTableDefines } from '../components/table'
22

3+
/* eslint-disable no-use-before-define */
4+
35
declare module '@vxe-ui/core' {
46
export namespace VxeGlobalFormatsHandles {
5-
export interface FormatMethodParams {
7+
export interface FormatsOptions {
8+
/**
9+
* 表格 - 自定义单元格格式化方法
10+
*/
11+
tableCellFormatMethod?: (params: TableCellFormatMethodParams, ...args: any[]) => string | number
12+
13+
/**
14+
* 已废弃,请使用 tableCellFormatMethod
15+
* @deprecated
16+
*/
17+
cellFormatMethod?: (params: TableCellFormatMethodParams, ...args: any[]) => string | number
18+
}
19+
export interface TableCellFormatMethodParams {
620
cellValue: any
721
row: any
822
column: VxeTableDefines.ColumnInfo

‎types/ui/interceptor.d.ts

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ import { VxeGridConstructor, VxeGridPrivateMethods } from '../components/grid'
33

44
declare module '@vxe-ui/core' {
55
export namespace VxeGlobalInterceptorHandles {
6+
export interface InterceptorOptions {
7+
/**
8+
* 表格 - 自定义菜单方法
9+
*/
10+
tableInterceptorMethod?: (params: any) => any
11+
}
12+
613
export type HookType = 'created' | 'mounted' | 'activated' | 'beforeUnmount' | 'unmounted'
714
export type EventType = 'event.clearEdit' | 'event.clearActived' | 'event.clearFilter' | 'event.clearAreas' | 'event.showMenu' | 'event.keydown' | 'event.export' | 'event.import'
815
export type Type = HookType | EventType

‎types/ui/menus.d.ts

+16-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,24 @@ import { VxeTableConstructor, VxeTableDefines, VxeTablePrivateMethods } from '..
22
import { VxeGridConstructor } from '../components/grid'
33
import { VxeGlobalRendererHandles } from '@vxe-ui/core'
44

5+
/* eslint-disable no-use-before-define */
6+
57
declare module '@vxe-ui/core' {
68
export namespace VxeGlobalMenusHandles {
7-
export interface MenuMethodParams extends VxeGlobalRendererHandles.RenderCellParams {
9+
export interface MenusOption {
10+
/**
11+
* 表格 - 自定义菜单方法
12+
*/
13+
tableMenuMethod?: (params: TableMenuMethodParams, event: Event) => any
14+
15+
/**
16+
* 已废弃,请使用 tableMenuMethod
17+
* @deprecated
18+
*/
19+
menuMethod?: (params: TableMenuMethodParams, event: Event) => any
20+
}
21+
22+
export interface TableMenuMethodParams extends VxeGlobalRendererHandles.RenderCellParams {
823
$grid: VxeGridConstructor | null
924
$table: VxeTableConstructor & VxeTablePrivateMethods
1025
$event: MouseEvent

‎types/ui/validators.d.ts

+12-7
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,25 @@ import { VxeTableDefines } from '../components/table'
66
declare module '@vxe-ui/core' {
77
export namespace VxeGlobalValidatorsHandles {
88
export interface ValidatorsOptions {
9-
formItemValidatorMethod?: ItemValidatorMethod
10-
cellValidatorMethod?: CellValidatorMethod
9+
formItemValidatorMethod?: FormItemValidatorMethod
10+
tableCellValidatorMethod?: TableCellValidatorMethod
1111

12+
/**
13+
* 已废弃,请使用 tableCellValidatorMethod
14+
* @deprecated
15+
*/
16+
cellValidatorMethod?: TableCellValidatorMethod
1217
/**
1318
* 已废弃,请使用 formItemValidatorMethod
1419
* @deprecated
1520
*/
16-
itemValidatorMethod?: ItemValidatorMethod
21+
itemValidatorMethod?: FormItemValidatorMethod
1722
}
1823

19-
export type ItemValidatorMethod = (params: ItemValidatorParams, ...args: any[]) => void | Error | Promise<any>
20-
export interface ItemValidatorParams extends VxeFormDefines.RuleValidatorParams {}
24+
export type FormItemValidatorMethod = (params: FormItemValidatorParams, ...args: any[]) => void | Error | Promise<any>
25+
export interface FormItemValidatorParams extends VxeFormDefines.RuleValidatorParams {}
2126

22-
export type CellValidatorMethod<D = any> = (params: CellValidatorParams<D>, ...args: any[]) => void | Error | Promise<any>
23-
export interface CellValidatorParams<D = any> extends VxeTableDefines.RuleValidatorParams<D> {}
27+
export type TableCellValidatorMethod<D = any> = (params: TableCellValidatorParams<D>, ...args: any[]) => void | Error | Promise<any>
28+
export interface TableCellValidatorParams<D = any> extends VxeTableDefines.RuleValidatorParams<D> {}
2429
}
2530
}

0 commit comments

Comments
 (0)
Please sign in to comment.