uniapp开发app时,部分页面,需要用到下拉刷新数据。
page配置
开启enablePullDownRefresh
{
//设备详情
"path": "pages/equipment/detail",
"style": {
"navigationStyle": "custom",
"enablePullDownRefresh": true
}
},
页面js代码
onPullDownRefresh() {
this.getdata()
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},