参考:https://blog.csdn.net/weixin_44003190/article/details/90704291
uniapp 制作一个可复用的segmented-control(tab选项卡)
自己创造一个轮子:https://www.cnblogs.com/Leesttee/p/10598589.html
这里还有点要注意,因为是竖向滑动,所以原生的下拉触底周期函数失效,需要使用scroll提供的API——scrolltolower
/下拉加载更多/
onReachBottom(){
debugger
// this.loadData();
console.log('加载更多');
},
/下拉加载更多/
onPageScroll:function(res){
console.log('加载更多22222');
},
onToButtom() {
console.log('refresh');
uni.showLoading({
title: '加载中',
});
console.log('加载更多333333');
setTimeout(() => {
this.loadData();
uni.hideLoading();
}, 1000)
},