最后撸一遍:vant下滑翻页
每次有项目遇到这个的时候都要重新撸一遍代码和文档。
这次做个记录,省的下次再撸。
部分代码:
data:{
loading:false,
finished:false,
}
methods:{
apiCallBack(){
//for()=>push,逻辑代码已省略
that.page+=1;
that.loading=false;
if(data.length<1 || that.page===res.page+1){
that.finished=true;
}
}
}
以上代码只提供参考,并不是完全正确。
请结合上下环境编写代码。