目录

Pull-to-Refresh

has.startPullDownRefresh

has.startPullDownRefresh(Object object)

Triggers the pull-to-refresh. After this API is called, the pull-to-refresh animation is triggered. The effect is the same as that triggered by the user from the UI.

  • The pull-to-refresh triggered from the UI will automatically stop within 4 seconds.
  • The pull-to-refresh triggered by this API remains active until has.stopPullDownRefresh is called.

Since: 1.0.0

Parameters

The input parameter is an object containing the following fields.

Name

Type

Mandatory

Description

success

function

No

Callback to be invoked when the API call is successful.

fail

function

No

Callback to be invoked when the API call fails.

complete

function

No

Callback to be invoked when the API call is complete, regardless of success or failure.

Example

has.startPullDownRefresh();

has.stopPullDownRefresh

has.stopPullDownRefresh(Object object)

Stops the pull-to-refresh on the current page.

Since: 1.0.0

Parameters

The input parameter is an object containing the following fields.

Name

Type

Mandatory

Description

success

function

No

Callback to be invoked when the API call is successful.

fail

function

No

Callback to be invoked when the API call fails.

complete

function

No

Callback to be invoked when the API call is complete, regardless of success or failure.

Example

has.stopPullDownRefresh();