You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
import Vue from 'vue' import store from "../../store"; import GlobalLoading from "./index.vue"; export function showLoading(info=''){ store.commit("SET_SHOW_LOADING",{flag:true,info}) }
export function hideLoading(){ store.commit("SET_SHOW_LOADING",{flag:false,info:''}) }
export function showLoadingAuto(info='',time = 2000){ store.commit("SET_SHOW_LOADING",{flag:true,info}) setTimeout(()=>{ store.commit("SET_SHOW_LOADING",{flag:false,info:''}) },time) }
Vue.prototype.$showLoading = showLoading Vue.prototype.$hideLoading = hideLoading Vue.prototype.$showLoadingAuto = showLoadingAuto // Vue.component("globalLoading",GlobalLoading)
// export default GlobalLoading
|