vue-loading presented in Vue2
npm i -S vue2-loading
font-awesome for spinner css
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>
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"