mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
feat(components): [table] expose scroll event (#12524)
* feat(components): [table] expose scroll event * chore: update doc
This commit is contained in:
parent
897ba8bb9d
commit
f1e95dc3a9
@ -312,6 +312,7 @@ table/table-layout
|
||||
| current-change | triggers when current row changes | ^[Function]`(currentRow: any, oldCurrentRow: any) => void` |
|
||||
| header-dragend | triggers after changing a column's width by dragging the column header's border | ^[Function]`(newWidth: number, oldWidth: number, column: any, event: MouseEvent) => void` |
|
||||
| expand-change | triggers when user expands or collapses a row (for expandable table, second param is expandedRows; for tree Table, second param is expanded) | ^[Function]`(row: any, expandedRows: any[]) => void & (row: any, expanded: boolean) => void` |
|
||||
| scroll ^(2.9.0) | Invoked after scrolled | ^[Function]`({ scrollLeft: number, scrollTop: number }) => void` |
|
||||
|
||||
### Table Slots
|
||||
|
||||
|
@ -65,6 +65,7 @@
|
||||
:wrap-style="scrollbarStyle"
|
||||
:always="scrollbarAlwaysOn"
|
||||
:tabindex="scrollbarTabindex"
|
||||
@scroll="$emit('scroll', $event)"
|
||||
>
|
||||
<table
|
||||
ref="tableBody"
|
||||
@ -229,6 +230,7 @@ export default defineComponent({
|
||||
'current-change',
|
||||
'header-dragend',
|
||||
'expand-change',
|
||||
'scroll',
|
||||
],
|
||||
setup(props) {
|
||||
type Row = typeof props.data[number]
|
||||
|
Loading…
Reference in New Issue
Block a user