小さなプログラムのスクロールビューは、プルアップとプルダウンのロードとリフレッシュを実現します

<scroll-view scroll-y='true' scroll-with-animation='true'  bindscrolltolower='pullup' refresher-enabled='true' style="height:100%" bindrefresherrefresh='dropDown' refresher-triggered='{
     
     {xialaType}}'>

</scroll-view>
	data:{
    
    
		xialaType:false
	}
  pullup(){
    
    
    console.log("到底部了,这里写懒加载的方法")
  },
  dropDown(){
    
    
	console.log("下拉刷新开启")
	that.setData({
    
    
	  xialaType:true
	})
	console.log("下拉刷新结束后关闭")
	that.setData({
    
    
	  xialaType:false
	})
	wx.hideNavigationBarLoading();
    wx.stopPullDownRefresh();
  }

おすすめ

転載: blog.csdn.net/hql1024/article/details/107512098