HomeDocs
Skip to main content

dlt.changeNavigationBarProgress

Introduction​

Update the progress of the navigation bar progress bar.

Parameters​

Object object

PropertyTypeDefaultRequiredDescription
startProgressnumber0NoThe starting value of the navigation bar progress bar.
endProgressnumber0YesThe target value of the navigation bar progress bar.
durationnumber200NoThe time it takes to complete the progress bar from startProgress to endProgress, range: 0~60000 ms
successfunctionNoCallback function for a successful API call.
failfunctionNoCallback function for a failed API call.
completefunctionNoCallback function that will be executed when the API call ends (both success and failure).

object.success Callback Function​

Parameters​

Object res​

PropertyTypeDescription
successstringtrue-Set successfully.

object.fail Callback Function​

Parameters​

Object res​

PropertyTypeDescription
errMsgstring1. The number of startProgress should be between 1 and 100!
2. The number of endProgress should be between 1 and 100, with startProgress must be less than endProgress!
3. The duration must be in the range 0 to 60000 milliseconds!
successstringfalse-Set failed.

Sample Code​

// pages/index/index.js
Page({
changeNavigationBarProgress() {
dlt.changeNavigationBarProgress({
startProgress: 10, // The starting value of the navigation bar progress bar.
endProgress: 100, // The target value of the navigation bar progress bar.
duration: 1000, // The time it takes to complete the progress bar refresh.
});
},
});
Privacy agreementDeveloper agreementcontact us: developer_private.mi@dlightek.com © 2024 MiniApp. All Rights Reserved.