On the Page, customize the onPullDownRefresh function to listen to the pull-to-refresh event from the user.

  • The "pullRefresh": true options needs to be configured in the .json configuration file of the related page to enable the pull-to-refresh event.
  • when the data refresh is processed completely, call my.stopPullDownRefresh to stop the pull-to-refresh for that page.

Sample Code:

In the pull-down-refresh.json configuration file, the code configuration is as below:

    "pullRefresh": true

In the Page, define the onPullDownRefresh processing function:

onPullDownRefresh() {
    console.log('onPullDownRefresh', new Date())