这个功能解决了什么问题
背景
当前 pullToRefreshItem 是 LazyListScope 的扩展函数(定义在 material3/PullToRefresh.kt),仅支持 LazyColumn / LazyRow。
LazyVerticalStaggeredGrid 使用的是独立的 LazyStaggeredGridScope,两者没有继承关系,因此无法直接使用 pullToRefreshItem。
使用场景
在瀑布流列表(如素材列表、商品列表等)中,下拉刷新是高频交互需求。目前业务层我只能使用LazyVerticalStaggeredGrid外层套LazyColumn使用pullToRefreshItem,在安卓平台上item复杂就非常卡,体验不能接受。
环境信息
- Kuikly 版本:
2.21.0
- 平台:Android / iOS / 鸿蒙
你建议的方案是什么
期望方案
希望官方能为 LazyVerticalStaggeredGrid 提供与 pullToRefreshItem 等价的下拉刷新能力,可能的方向:
- 方案 A :为 LazyStaggeredGridScope 新增 pullToRefreshItem 扩展函数,复用 PullToRefreshState 和 PullToRefreshItem UI 组件
- 方案 B :将 pullToRefreshItem 的核心逻辑抽象为通用的 LazyLayoutScope 扩展(如果 LazyListScope 和 LazyStaggeredGridScope 有公共基类/接口的话)
- 方案 C :提供独立的 PullToRefreshBox 容器组件(类似 Jetpack Compose Material3 的方案),基于 NestedScrollConnection 实现,可包裹任意可滚动组件
其他补充信息
No response
这个功能解决了什么问题
背景
当前
pullToRefreshItem是LazyListScope的扩展函数(定义在material3/PullToRefresh.kt),仅支持LazyColumn/LazyRow。LazyVerticalStaggeredGrid使用的是独立的LazyStaggeredGridScope,两者没有继承关系,因此无法直接使用pullToRefreshItem。使用场景
在瀑布流列表(如素材列表、商品列表等)中,下拉刷新是高频交互需求。目前业务层我只能使用LazyVerticalStaggeredGrid外层套LazyColumn使用pullToRefreshItem,在安卓平台上item复杂就非常卡,体验不能接受。
环境信息
2.21.0你建议的方案是什么
期望方案
希望官方能为 LazyVerticalStaggeredGrid 提供与 pullToRefreshItem 等价的下拉刷新能力,可能的方向:
其他补充信息
No response