May 19, 2021 WeChat Mini Program Development Document
Define the onPullDownRefresh handler in Page to listen for the page user's pull-down refresh event.
enablePullDownRefresh
needs to be turned on in
config
window
options.
wx.stopPullDownRefresh
stop the pull-down refresh of the current page.
Base library 1.5.0 starts to support, and low versions need to be compatible
Start a pull-down refresh, trigger a pull-down refresh animation after the call, and the effect is consistent with the user's manual pull-down refresh
Object parameter description:
Parameters | Type | Required | Description |
---|---|---|---|
success | Function | Whether | The interface calls a successful callback function |
fail | Function | Whether | The interface calls the failed callback function |
complete | Function | Whether | Callback function at end of interface call (call succeeds, fails are executed) |
Success returns a description of the parameters:
The name of the argument | Type | Description |
---|---|---|
errMsg | String | The result of the interface call |
Example code:
wx.startPullDownRefresh()
Stop the current page pull-down refresh.
Example code:
Page({
onPullDownRefresh: function(){
wx.stopPullDownRefresh()
}
})