1.1.0 • Published 5 years ago
universal-loading v1.1.0
showLoading
Displays the loading prompt box.
Install
$ npm install universal-showLoading --saveor
$ npm install universal-api --saveUsage
import showLoading from 'universal-showLoading';
showLoading({
content: 'loading...'
});Methods
showLoading(options)
Supported
Arguments
| Property | Type | Description | required | Default |
|---|---|---|---|---|
| options | object | ✔️ | - | |
| options.content | string | Prompt content | ✔️ | - |
| options.success | Function | The callback function for a successful API call | ✘ | - |
| options.fail | Function | The callback function for a failed API call | ✘ | - |
| options.complete | Function | The callback function used when the API call completed (always executed whether the call succeeds or fails) | ✘ | - |
hideLoading
Hides the loading prompt box.
Install
$ npm install universal-hideLoading --saveor
$ npm install universal-api --saveUsage
import hideLoading from 'universal-hideLoading';
hideLoading();Methods
hideLoading(options)
Supported
Arguments
| Property | Type | Description | required | Default |
|---|---|---|---|---|
| options | object | ✔️ | - | |
| options.success | Function | The callback function for a successful API call | ✘ | - |
| options.fail | Function | The callback function for a failed API call | ✘ | - |
| options.complete | Function | The callback function used when the API call completed (always executed whether the call succeeds or fails) | ✘ | - |
2.0.0-beta
5 years ago
1.1.0
5 years ago
1.1.0-0
5 years ago
1.0.1
5 years ago
1.0.0
6 years ago
1.0.0-beta.1
6 years ago