1 | # Overview
|
2 | vue-indicator is a mobile loading indicator plugin for vue.js.
|
3 |
|
4 | # Installation
|
5 | First, install `vue-indicator` from npm:
|
6 | ```bash
|
7 | $ npm install vue-indicator
|
8 | ```
|
9 |
|
10 | Then use it:
|
11 | ```Javascript
|
12 | // ES6 mudule
|
13 | import Indicator from 'vue-indicator';
|
14 |
|
15 | // CommonJS
|
16 | const Indicator = require('vue-indicator').default;
|
17 | ```
|
18 |
|
19 | # Usage
|
20 | Open an indicator:
|
21 | ```Javascript
|
22 | Indicator.open();
|
23 | ```
|
24 |
|
25 | Open an indicator with a string:
|
26 | ```Javascript
|
27 | Indicator.open('Loading...');
|
28 | ```
|
29 |
|
30 | Open an indicator with an object:
|
31 | ```Javascript
|
32 | Indicator.open({ text:'Loading...', spinnerType: 'fading-circle' });
|
33 | ```
|
34 |
|
35 | Then close it:
|
36 | ```Javascript
|
37 | Indicator.close();
|
38 | ```
|
39 |
|
40 | # API
|
41 | | Option | Description | Value | Default |
|
42 | |-------------|----------------|-------------------------------------------------------------|---------|
|
43 | | text | indicator text | String | |
|
44 | | spinnerType | spinner type | 'snake', 'fading-circle', 'double-bounce', 'triple-bounce' | 'snake' |
|
45 |
|
46 | # License
|
47 | MIT
|