小程序scroll-view实现上拉下拉加载刷新

<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
	})
  }

你可能感兴趣的:(微信小程序)