onPullDownRefresh
On the Page, customize the onPullDownRefresh function to listen to the pull-to-refresh event from the user.
- The
"pullRefresh": trueoptions needs to be configured in the.jsonconfiguration file of the related page to enable the pull-to-refresh event.
- when the data refresh is processed completely, call
my.stopPullDownRefreshto stop the pull-to-refresh for that page.
Sample Code:
In the pull-down-refresh.json configuration file, the code configuration is as below:
copy
{
"pullRefresh": true
}In the Page, define the onPullDownRefresh processing function:
copy
onPullDownRefresh() {
console.log('onPullDownRefresh', new Date())
}