Skip to content

Commit

Permalink
releases 3.3.18
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Dec 4, 2024
1 parent 9e138b4 commit e901349
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vxe-pc-ui",
"version": "3.3.17",
"version": "3.3.18",
"description": "A vue based PC component library",
"scripts": {
"update": "npm install --legacy-peer-deps",
Expand Down
12 changes: 12 additions & 0 deletions types/components/grid.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,9 @@ export namespace VxeGridDefines {
$grid: VxeGridConstructor<D>
}

export interface KeydownStartEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.KeydownStartEventParams<D> { }
export interface KeydownEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.KeydownEventParams<D> { }
export interface KeydownEndEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.KeydownEndEventParams<D> { }
export interface PasteEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.PasteEventParams<D> { }
export interface CopyEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.CopyEventParams<D> { }
export interface CutEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.CutEventParams<D> { }
Expand Down Expand Up @@ -387,6 +389,7 @@ export namespace VxeGridDefines {
export interface ColumnDragstartEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.ColumnDragstartEventParams<D> { }
export interface ColumnDragoverEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.ColumnDragoverEventParams<D> { }
export interface ColumnDragendEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.ColumnDragendEventParams<D> { }
export interface EnterAppendRowEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.EnterAppendRowEventParams<D> { }

export interface ProxyQueryEventParams<D = any> extends GridEventParams<D> {
status: boolean
Expand Down Expand Up @@ -424,7 +427,9 @@ export namespace VxeGridDefines {
}

export interface VxeGridEventProps<D = any> {
onKeydownStart?: VxeGridEvents.KeydownStart<D>
onKeydown?: VxeGridEvents.Keydown<D>
onKeydownEnd?: VxeGridEvents.KeydownEnd<D>
onPaste?: VxeGridEvents.Paste<D>
onCopy?: VxeGridEvents.Copy<D>
onCut?: VxeGridEvents.Cut<D>
Expand Down Expand Up @@ -466,6 +471,7 @@ export interface VxeGridEventProps<D = any> {
onColumnDragstart?: VxeGridEvents.ColumnDragstart<D>
onColumnDragover?: VxeGridEvents.ColumnDragover<D>
onColumnDragend?: VxeGridEvents.ColumnDragend<D>
onEnterAppendRow?: VxeGridEvents.EnterAppendRow<D>

// grid
onProxyQuery?: VxeGridEvents.ProxyQuery<D>
Expand All @@ -488,7 +494,9 @@ export interface VxeGridEventProps<D = any> {
}

export interface VxeGridListeners<D = any> {
keydownStart?: VxeGridEvents.KeydownStart<D>
keydown?: VxeGridEvents.Keydown<D>
keydownEnd?: VxeGridEvents.KeydownEnd<D>
paste?: VxeGridEvents.Paste<D>
copy?: VxeGridEvents.Copy<D>
cut?: VxeGridEvents.Cut<D>
Expand Down Expand Up @@ -530,6 +538,7 @@ export interface VxeGridListeners<D = any> {
columnDragstart?: VxeGridEvents.ColumnDragstart<D>
columnDragover?: VxeGridEvents.ColumnDragover<D>
columnDragend?: VxeGridEvents.ColumnDragend<D>
enterAppendRow?: VxeGridEvents.EnterAppendRow<D>

// grid
proxyQuery?: VxeGridEvents.ProxyQuery<D>
Expand All @@ -552,7 +561,9 @@ export interface VxeGridListeners<D = any> {
}

export namespace VxeGridEvents {
export type KeydownStart<D = any> = (params: VxeGridDefines.KeydownStartEventParams<D>) => void
export type Keydown<D = any> = (params: VxeGridDefines.KeydownEventParams<D>) => void
export type KeydownEnd<D = any> = (params: VxeGridDefines.KeydownEndEventParams<D>) => void
export type Paste<D = any> = (params: VxeGridDefines.PasteEventParams<D>) => void
export type Copy<D = any> = (params: VxeGridDefines.CopyEventParams<D>) => void
export type Cut<D = any> = (params: VxeGridDefines.CutEventParams<D>) => void
Expand Down Expand Up @@ -594,6 +605,7 @@ export namespace VxeGridEvents {
export type ColumnDragstart<D = any> = (params: VxeGridDefines.ColumnDragstartEventParams<D>) => void
export type ColumnDragover<D = any> = (params: VxeGridDefines.ColumnDragoverEventParams<D>) => void
export type ColumnDragend<D = any> = (params: VxeGridDefines.ColumnDragendEventParams<D>) => void
export type EnterAppendRow<D = any> = (params: VxeGridDefines.EnterAppendRowEventParams<D>) => void

export type ProxyQuery<D = any> = (params: VxeGridDefines.ProxyQueryEventParams<D>) => void
export type ProxyDelete<D = any> = (params: VxeGridDefines.ProxyDeleteEventParams<D>) => void
Expand Down
38 changes: 38 additions & 0 deletions types/components/table.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,30 @@ export namespace VxeTablePropTypes {
* 用于 mouse-config.area,是否将回车键行为改成 Tab 键行为
*/
enterToTab?: boolean
/**
* 只有 isEdit 有效,编辑模式,支持覆盖式和末端插入式编辑
*/
editMode?: 'coverage' | 'insert' | '' | null
/**
* 当在最后一行按下回车键时,自动插入新行
*/
isLastEnterAppendRow?: boolean
/**
* 只对 isEnter=true 有效,用于回车键执行之前的方法,返回 false 可以阻止默认行为
*/
beforeEnterMethod?(params: {
row: D
column: VxeTableDefines.ColumnInfo<D>
$table: VxeTableConstructor<D> & VxeTablePrivateMethods<D>
}): boolean
/**
* 只对 isEnter=true 有效,用于重写回车键的方法
*/
enterMethod?(params: {
row: D
column: VxeTableDefines.ColumnInfo<D>
$table: VxeTableConstructor<D> & VxeTablePrivateMethods<D>
}): void
/**
* 只对 isDel=true 有效,用于删除键清空单元格内容方法
*/
Expand Down Expand Up @@ -4261,6 +4285,17 @@ export namespace VxeTableDefines {
}
}

export interface EnterAppendRowEventParams {
row: D
rowIndex: number
$rowIndex: number
_rowIndex: number
column: VxeTableDefines.ColumnInfo<D>
columnIndex: number
$columnIndex: number
_columnIndex: number
}

export interface VxeTableCustomStoreObj {
btnEl: HTMLDivElement | null
isAll: boolean
Expand Down Expand Up @@ -4534,6 +4569,7 @@ export interface VxeTableEventProps<D = any> {
onColumnDragstart?: VxeTableEvents.ColumnDragstart<D>
onColumnDragover?: VxeTableEvents.ColumnDragover<D>
onColumnDragend?: VxeTableEvents.ColumnDragend<D>
onEnterAppendRow?: VxeTableEvents.EnterAppendRow<D>

/**
* 已废弃,请使用 onEditActivated
Expand Down Expand Up @@ -4606,6 +4642,7 @@ export interface VxeTableListeners<D = any> {
columnDragstart?: VxeTableEvents.ColumnDragstart<D>
columnDragover?: VxeTableEvents.ColumnDragover<D>
columnDragend?: VxeTableEvents.ColumnDragend<D>
enterAppendRow?: VxeTableEvents.EnterAppendRow<D>

/**
* 已废弃,请使用 editActivated
Expand Down Expand Up @@ -4661,6 +4698,7 @@ export namespace VxeTableEvents {
export type ColumnDragstart<D = VxeTablePropTypes.Row> = (params: VxeTableDefines.ColumnDragstartEventParams<D>) => void
export type ColumnDragover<D = VxeTablePropTypes.Row> = (params: VxeTableDefines.ColumnDragoverEventParams<D>) => void
export type ColumnDragend<D = VxeTablePropTypes.Row> = (params: VxeTableDefines.ColumnDragendEventParams<D>) => void
export type EnterAppendRow<D = VxeTablePropTypes.Row> = (params: VxeTableDefines.EnterAppendRowEventParams<D>) => void

/**
* 已废弃,请使用 EditActivated
Expand Down

0 comments on commit e901349

Please sign in to comment.