未验证 提交 604df0d5 编写于 作者: O openharmony_ci 提交者: Gitee

!18865 更新文档scrolltoindex添加动效

Merge pull request !18865 from limeng/list_scrolltoindex
......@@ -131,11 +131,12 @@ currentOffset(): { xOffset: number, yOffset: number }
### scrollToIndex
scrollToIndex(value: number): void
scrollToIndex(value: number, smooth?:boolean): void
滑动到指定Index。
开启smooth动效时,会对经过的所有item进行加载和布局计算,当大量加载item时会导致性能问题。
> **说明:**
>
......@@ -143,10 +144,10 @@ scrollToIndex(value: number): void
**参数:**
| 参数名 | 参数类型 | 必填 | 参数描述 |
| ------ | -------- | ---- | ---------------------------------- |
| value | number | 是 | 要滑动到的列表项在列表中的索引值。 |
| 参数名 | 参数类型 | 必填 | 参数描述 |
| --------------------- | -------- | ---- | ------------------------------------------------------------ |
| value | number | 是 | 要滑动到的列表项在列表中的索引值。 |
| smooth<sup>10+ </sup> | boolean | 否 | 设置滑动到列表项在列表中的索引值时是否有动效,true表示有动效,false表示没有动效。<br/>默认值:false。<br/>**说明:** <br/>当前仅List组件支持该参数。 |
### scrollBy<sup>9+</sup>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册