1.0.8 • Published 2 years ago

@uni/loading v1.0.8

Weekly downloads
455
License
BSD-3-Clause
Repository
github
Last release
2 years ago

showLoading

npm

Displays the loading prompt box.

Install

$ npm install @uni/showLoading --save

or

$ npm install @uni/apis --save

Usage

import showLoading from '@uni/showLoading';

showLoading({
  content: 'loading...'
});

Methods

showLoading(options)

Supported

Arguments

PropertyTypeDescriptionrequiredDefaultSupported
optionsobject ✔️--
options.contentstring Prompt content-
options.maskboolean Indicates whether to display a transparent mask to prevent touch penetrationfalse
options.delaynumber Delay display, the unit is milliseconds (ms), the default value is 0. If my.hideLoading is called before this time, it will not be displayed0
options.successFunction The callback function for a successful API call-
options.failFunction The callback function for a failed API call-
options.completeFunction The callback function used when the API call completed (always executed whether the call succeeds or fails)-

hideLoading

npm

Hides the loading prompt box.

Install

$ npm install @uni/hideLoading --save

or

$ npm install @uni/apis --save

Usage

import hideLoading from '@uni/hideLoading';

hideLoading();

Methods

hideLoading(options)

Supported

Arguments

PropertyTypeDescriptionrequiredDefault
optionsobject ✔️-
options.successFunction The callback function for a successful API call-
options.failFunction The callback function for a failed API call-
options.completeFunction The callback function used when the API call completed (always executed whether the call succeeds or fails)-