0
点赞
收藏
分享

微信扫一扫

前端工作总结248-uni-预加载问题

三分梦_0bc3 2022-09-17 阅读 104

<u-loadmore :status="status" />

onReachBottom() {
console.log('触底~~~~')
if (this.pageNo >= this.pages){
this.status = 'nomore';
return;
}
this.status = 'loading';
this.pageNo = ++this.pageNo;
setTimeout(() => {
this.getData()
if (this.pageNo >= this.pages) {
this.status = 'nomore';
} else {
this.status = 'loading';
}
}, 2000)
}

举报

相关推荐

0 条评论