vue2-loading
vue-loading presented in Vue2
Install
npm i -S vue2-loading
Dependencies
font-awesome for spinner css
Usage
In App.vue<script> import VueLoading from 'vue2-loading' Vue.use(VueLoading, { text: 'Here I come...', bg: 'rgba(230, 233, 236, 0.8)', textColor: '#000', spinnerClass: 'fa fa-spin fa-spinner fa-3x' })</script> <template> <div v-loading="isLoading (Boolean)"> </div></template>
Options
text:
- loading block text
- default value: "Loading ..."
bg:
- loading block backgroundColor css,
- default value: "rgba(230, 233, 236, 0.8)"
textColor:
- loading message text css,
- default value: "#fff"
spinnerClass:
- loading spinner class,
- default value: "fa fa-spin fa-spinner fa-3x"