Skip to content

Pull Down To Refresh

startPullDownRefresh

TIP

The API usage is as follows: wx.startPullDownRefresh(Object object)

  • Functional description: Start pull-down refresh. After calling, the pull-down refresh animation is triggered, and the effect is the same as the user manually pulling down to refresh.
  • Parameters and descriptions: Object object
PropertiesTypeDefault valueRequiredDescription
successFunction-NoCallback function for successful interface call
failFunction-NoCallback function for failed interface call
completeFunction-NoCallback function for interface call completion (executed regardless of success or failure)
  • Sample code:
js
wx.startPullDownRefresh()

stopPullDownRefresh

TIP

The API usage is as follows: wx.stopPullDownRefresh(Object object)

  • Functional description: Stop the pull-down refresh of the current page.
  • Parameters and descriptions: Object object
PropertiesTypeDefault valueRequiredDescription
successFunction-NoCallback function for successful interface call
failFunction-NoCallback function for failed interface call
completeFunction-NoCallback function for interface call completion (executed regardless of success or failure)
  • Sample code:
js
Page({
  onPullDownRefresh () {
    wx.stopPullDownRefresh()
  }
})