根据文档的描述,作上拉加载时直接实现页面的onReachBottom
()函数便可。可是要作下拉刷新时,除了实现onPullDownRefresh
()函数外,还必需要在app.json中配置开启enablePullDownRefresh。json
"enablePullDownRefresh": "true"
可是已经按上面写法配置后,在微信开发者工具的模拟器上运行能够下拉刷新,在苹果然机上却不能触发下拉刷新!微信
缘由是"true"是字符串而不是Boolean类型的!!把"true"去掉引号变成ture便可。微信开发
参考:app
另外,如今作下拉刷新时,应该考虑用Page页面自带的onPullDownRefresh事件,而不是用scroll-view组件,缘由 https://zhuanlan.zhihu.com/p/24739728?refer=oldtimes函数