vuejs-loading

1.0.4 • Public • Published

Installation

npm i vuejs-loading --save

Usage

//main.js
import Loading from 'vuejs-loading';
Vue.use(Loading);

//.vue files
/*show component*/
this.$loading.show({text:'hello world'});
/*close component*/
this.$loading.close();

Preview

vuejs-loading

Option

use option to custom the component.
option is an object.
Use option in the following ways:

  • Set option once.
this.$loading.show(option);
  • Set option globally, the next time you show the component, option would still be effective.
Vue.use(Loading, option);

option available:

key type default description
text string "加载中..." loading text
mask boolean true whether to show a fullscreen,transparent mask
callback function function to call when loading is closed
duration number auto close time, 1000 = 1 second; without duration, loading exists permanently

License

The MIT License

Package Sidebar

Install

npm i vuejs-loading

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

16.3 kB

Total Files

4

Last publish

Collaborators

  • fengjiejun