使用 Component 构造器构造页面如何写下拉刷新和上拉加载?

发布于 9 年前作者 xia597837 次浏览最后编辑 9 年前来自 issues

使用 Component 构造器构造页面如何写下拉刷新和上拉加载?

按照文档来,页面的生命周期方法(即 on 开头的方法),应写在 methods 定义段中。

那我把下拉刷新onPullDownRefresh写在methods里为什么实现不了下拉刷新呢?

3 回复
kongguiying
kongguiying1 楼6 年前

组件没有下拉刷新、上拉加载,页面才有。可以在页面配置下拉刷新、上拉加载,触发后传参到子组件,子组件需要监听observers参数。

nakang
nakang2 楼6 年前

this.onPullDownRefresh?

xiuyingren
xiuyingren3 楼6 年前

页面配置里面是不是没有开启下拉刷新

“enablePullDownRefresh”:true