| scrollBarColor | Color | - | Color of the scrollbar. |
| scrollBarWidth | Length | - | Width of the scrollbar. |
- ScrollDirection
...
...
@@ -39,10 +39,18 @@ Scroll(scroller?: Scroller)
| Vertical | Only vertical scrolling is supported. |
| None | Scrolling is disabled. |
## Events
| Name | Description |
| -------- | -------- |
| onScroll(xOffset: number, yOffset: number) => void | Invoked when scrolling starts. It returns the horizontal and vertical offsets. |
| onScrollEdge(side: Edge) => void | Invoked when scrolling reaches the edge. |
| onScrollEnd() => void | Invoked when scrolling stops. |
## Scroller
Controller of the scrollable container component. You can bind this component to the container component and use it to control the scrolling of the container component. Currently, this component can be bound to the **<List>** and **<Scroll>** components.
Controller of the scrollable container component. You can bind this component to the container component and use it to control the scrolling of the container component. Currently, this component can be bound to the **\<List>** and **\<Scroll>** components.
### Objects to Import
...
...
@@ -53,7 +61,7 @@ scroller: Scroller = new Scroller()
```
### scroller.scrollTo
### scrollTo
scrollTo(value: { xOffset: number | string, yOffset: number | string, animation?: { duration: number, curve: Curve } }): void
...
...
@@ -69,7 +77,7 @@ Scrolls to the specified position.
| animation | {<br/>duration: number,<br/>curve: Curve \|<br/>CubicBezier \|<br/>SpringCurve<br/>} | No | | Animation configuration, which includes the following:<br/>- **duration**: scrolling duration.<br/>- **curve**: scrolling curve. |
### scroller.scrollEdge
### scrollEdge
scrollEdge(value: Edge): void
...
...
@@ -83,7 +91,7 @@ Scrolls to the edge of the container.
| value | Edge | Yes | - | Edge position to scroll to. |
@@ -95,7 +103,7 @@ Scrolls to the next or previous page.
| next | boolean | Yes | - | Whether to turn to the next page. The value **true** means to scroll to the next page, and the value **false** means to scroll to the previous page. |
| value | number | Yes | - | Index of the item to be scrolled to in the list. |
## Events
| Name | Description |
| -------- | -------- |
| onScroll(xOffset: number, yOffset: number) => void | Invoked to return the horizontal and vertical offsets during scrolling when the specified scroll event occurs. |
| onScrollEdge(side: Edge) => void | Callback for the event of scrolling to the edge. |
| onScrollEnd() => void | Invoked when scrolling stops. |