UNPKG

1.08 kBMarkdownView Raw
1# Overview
2vue-indicator is a mobile loading indicator plugin for vue.js.
3
4# Installation
5First, install `vue-indicator` from npm:
6```bash
7$ npm install vue-indicator
8```
9
10Then use it:
11```Javascript
12// ES6 mudule
13import Indicator from 'vue-indicator';
14
15// CommonJS
16const Indicator = require('vue-indicator').default;
17```
18
19# Usage
20Open an indicator:
21```Javascript
22Indicator.open();
23```
24
25Open an indicator with a string:
26```Javascript
27Indicator.open('Loading...');
28```
29
30Open an indicator with an object:
31```Javascript
32Indicator.open({ text:'Loading...', spinnerType: 'fading-circle' });
33```
34
35Then close it:
36```Javascript
37Indicator.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
47MIT