vue-m-loading
v0.0.4
Published
a vue loading component
Readme
vue-loading
Install
npm install vue-m-loading -SQuickStart
import loading from 'vue-loading';
import 'vue-loading/dist/vue-loading.css';
// in Global variable
const loading = VueLoading.default;
Vue.use(loading);//in component
this.$loading(true,{
id:'loading1',
section:''
});
//in Global
Vue.loading(true,{
id: 'loading2',
section: ''
});Params
show: first param, anonymous, whether to show loadingid: the loading element's idsection: a element selector used by querySelector,the section to show loading
Methods
Vue.clearLoading: clear all loadings, such as when vue router switch
Preview

