<scroll-view class="scroll-view scrollbox">
<view class="item" v-for="(val,i) in data">
</view>
</scroll-view>
export default {
onLoad: function (options) {
setTimeout(function () {
console.log('start pulldown');
}, 1000);
uni.startPullDownRefresh();
},
onPullDownRefresh() {
//setTimeout(function () {
console.log('5m');
uni.stopPullDownRefresh();
//}, 5000);
},
// 上拉加载
onReachBottom() {
console.log('上拉加载')
// setTimeout(() => {
// console.log('上拉加载停止')
// uni.stopPullDownRefresh()
// },5500)
},
}
pages.json
"pages": [
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "老年备忘录",
"enablePullDownRefresh": true, //需要新增
"onReachBottomDistance":50 //需要新增
}
}
],