scroll-view scroll-y="true" @scrolltolower="scroll_y">
你的请求数据
<u-loadmore :status="status" />
</scroll-view>
status: 'loadmore', //上拉状态
last_page: -1, //最后一页
page: 1,//第一页
// 上拉加载更多
scroll_y() {
if(this.page==this.last_page)this.status='nomore'
if (this.page >= this.last_page) return;
this.status = 'loading';
this.page = ++this.page;
if (this.page <= this.last_page) this.getData()//你的请求数据concat()连接
setTimeout(() => {
if (this.page >= this.last_page) this.status = 'nomore'
}, 3000)
},