Skip to content

ygtzz/vue-loading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-loading

Install

npm install vue-m-loading -S

QuickStart

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 loading
  • id: the loading element's id
  • section: a element selector used by querySelector,the section to show loading

Methods

  • Vue.clearLoading: clear all loadings, such as when vue router switch

Preview

loading image

About

a vue loading component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published