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

!21126 gird scroll bar示例代码滚动不显示

Merge pull request !21126 from tomkl123/grid_scroll_bar_update
......@@ -187,11 +187,12 @@ struct GridExample {
.columnsGap(10)
.rowsGap(10)
.edgeEffect(EdgeEffect.Spring)
.scrollBar(BarState.On)
.onScrollIndex((first: number) => {
console.info(first.toString())
})
.onScrollBarUpdate((index: number, offset: number) => {
return {totalOffset: (index / 5) * (80 + 10) - 10 - offset, totalLength: 80 * 5 + 10 * 4}
return {totalOffset: (index / 5) * (80 + 10) - offset, totalLength: 80 * 5 + 10 * 4}
})
.width('90%')
.backgroundColor(0xFAEEE0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册