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
| Properties | Type | Default value | Required | Description |
|---|---|---|---|---|
| success | Function | - | No | Callback function for successful interface call |
| fail | Function | - | No | Callback function for failed interface call |
| complete | Function | - | No | Callback 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
| Properties | Type | Default value | Required | Description |
|---|---|---|---|---|
| success | Function | - | No | Callback function for successful interface call |
| fail | Function | - | No | Callback function for failed interface call |
| complete | Function | - | No | Callback function for interface call completion (executed regardless of success or failure) |
- Sample code:
js
Page({
onPullDownRefresh () {
wx.stopPullDownRefresh()
}
})