WeChat Mini Program API Pull-down Refresh


onPullDownRefresh


Define the onPullDownRefresh processing function in the Page to listen for user pull-down refresh events on the page.

  • Needs to enable enablePullDownRefresh in the window option of config.
  • After processing the data refresh, wx.stopPullDownRefresh can stop the pull-down refresh of the current page.

wx.stopPullDownRefresh()

Stop the pull-down refresh of the current page.

Sample code:

Page({
  onPullDownRefresh: function(){
    wx.stopPullDownRefresh()
  }
})