mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
feat(components): [table] support native scrollbar (#21539)
* feat(components): [table] support native scrollbar * Update table.vue * Update packages/components/table/src/table/defaults.ts Co-authored-by: btea <2356281422@qq.com> --------- Co-authored-by: anhao <wzanh@sinopec.com> Co-authored-by: btea <2356281422@qq.com>
This commit is contained in:
@@ -304,6 +304,7 @@ table/tooltip-formatter
|
||||
| allow-drag-last-column ^(2.9.2) | whether to allow drag the last column | ^[boolean] | true |
|
||||
| tooltip-formatter ^(2.9.4) | customize tooltip content when using `show-overflow-tooltip` | ^[Function]`(data: { row: any, column: any, cellValue: any }) => VNode \| string` | — |
|
||||
| preserve-expanded-content ^(2.9.7) | whether to preserve expanded row content in DOM when collapsed | ^[boolean] | false |
|
||||
| native-scrollbar ^(2.10.5) | whether to use native scrollbars | ^[boolean] | false |
|
||||
|
||||
### Table Events
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
:wrap-style="scrollbarStyle"
|
||||
:always="scrollbarAlwaysOn"
|
||||
:tabindex="scrollbarTabindex"
|
||||
:native="nativeScrollbar"
|
||||
@scroll="$emit('scroll', $event)"
|
||||
>
|
||||
<table
|
||||
|
||||
@@ -160,6 +160,7 @@ interface TableProps<T extends DefaultRow> {
|
||||
tooltipFormatter?: TableOverflowTooltipFormatter<T>
|
||||
appendFilterPanelTo?: string
|
||||
scrollbarTabindex?: number | string
|
||||
nativeScrollbar?: boolean
|
||||
}
|
||||
|
||||
type TableTooltipData<T extends DefaultRow> = Parameters<
|
||||
@@ -421,6 +422,10 @@ export default {
|
||||
* @description whether to preserve expanded row content in DOM when collapsed
|
||||
*/
|
||||
preserveExpandedContent: Boolean,
|
||||
/**
|
||||
* @description whether to use native scrollbars
|
||||
*/
|
||||
nativeScrollbar: Boolean,
|
||||
}
|
||||
export type {
|
||||
SummaryMethod,
|
||||
|
||||
Reference in New Issue
Block a user