docs(components): [scrollbar] note warpRef (#10596)

docs(components): [scorllbar] note warpRef
This commit is contained in:
Xc 2022-11-14 11:14:40 +08:00 committed by GitHub
parent b3553a1cae
commit 6d30e402d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@ scrollbar/manual-scroll
### Attributes
| Name | Description | Type | Default |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ------- |
|------------|---------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------|---------|
| height | height of scrollbar | ^[string] / ^[number] | — |
| max-height | max height of scrollbar | ^[string] / ^[number] | — |
| native | whether to use the native scrollbar style | ^[boolean] | false |
@ -60,22 +60,21 @@ scrollbar/manual-scroll
### Events
| Name | Description | Type |
| ------ | ----------------------------------------------------- | ---------------------------------------------------------------- |
|--------|-------------------------------------------------------|------------------------------------------------------------------|
| scroll | triggers when scrolling, return distance of scrolling | ^[Function]`({ scrollLeft: number, scrollTop: number }) => void` |
### Slots
| Name | Description |
| ------- | ------------------------- |
|---------|---------------------------|
| default | customize default content |
### Exposes
| Method | Description | Type |
| ------------- | ------------------------------------------ | -------------------------------------------------------------------------- |
|---------------|--------------------------------------------|----------------------------------------------------------------------------|
| handleScroll | handle scroll event | ^[Function]`() => void` |
| scrollTo | scrolls to a particular set of coordinates | ^[Function]`(options: ScrollToOptions \| number, yCoord?: number) => void` |
| setScrollTop | Set distance to scroll top | ^[Function]`(scrollTop: number) => void` |
| setScrollLeft | Set distance to scroll left | ^[Function]`(scrollLeft: number) => void` |
| update | update scrollbar state manually | ^[Function]`() => void` |
| wrapRef | scrollbar wrap ref | ^[Object]`Ref<HTMLDivElement>` |
| update | update scrollbar state manually | ^[Function]`() => void` |