docs(components): [table-v2] update the type description for Events (#13362)

This commit is contained in:
xy 2023-07-20 16:25:33 +08:00 committed by GitHub
parent c4d8270296
commit 972c8f4ef4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -498,6 +498,32 @@ type HeaderCellSlotProps = {
onColumnSorted: (e: MouseEvent) => void
}
type RowCommonParams = {
rowData: any
rowIndex: number
}
type RowEventHandlerParams = {
rowKey: KeyType
event: Event
} & RowCommonParams
type RowEventHandler = (params: RowEventHandlerParams) => void
type RowEventHandlers = {
onClick?: RowEventHandler
onContextmenu?: RowEventHandler
onDblclick?: RowEventHandler
onMouseenter?: RowEventHandler
onMouseleave?: RowEventHandler
}
type RowsRenderedParams = {
rowCacheStart: number
rowCacheEnd: number
rowVisibleStart: number
rowVisibleEnd: number
}
type RowSlotProps = {
columnIndex: number
rowIndex: number
@ -507,6 +533,11 @@ type RowSlotProps = {
style: CSSProperties
}
type RowExpandParams = {
expanded: boolean
rowKey: KeyType
} & RowCommonParams
type Data = {
[key: KeyType]: any
children?: Array<any>