Parameters
Code Example
Related APIs
my.hideLoading
Hide loading
my.showToast
Show toast
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Display a loading indicator.
| Property | Type | Required | Description |
|---|---|---|---|
| content | String | No | Loading text message |
| delay | Number | No | Delay before showing, in ms (0 by default). If my.hideLoading is called before this delay elapses, the loading indicator is not displayed |
| success | Function | No | Callback on success |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
my.showLoading({ content: 'Loading...' });
my.request({
url: 'https://api.example.com/data',
complete: () => {
my.hideLoading();
}
});