123456789101112131415161718192021222324252627282930313233343536 |
- import Vue from 'vue'
- import App from './App'
- import store from './store' // store
- import plugins from './plugins' // plugins
- import './permission' // permission
- Vue.use(plugins)
- import {toast} from "@/utils/common.js"
- /**
- * 引用全局加载 loading
- * */
- import loading from "./components/loading/loading.vue"
- Vue.component('loading',loading);
- //是否显示加载中 的方法 调用store中的mutations方法
- function loadings(tf){
- /* if(tf){
- store.commit("switch_loading",tf)
- }else{
- store.commit("switch_loading")
- } */
- store.commit("switch_loading",tf);
- }
- //也挂在到原型链上 方便在每个页面中 使用 this.$loading() 去显示加载中
- Vue.prototype.$loading = loadings;
- Vue.config.productionTip = false
- Vue.prototype.$store = store
- Vue.prototype.$toast=toast;
- App.mpType = 'app'
- const app = new Vue({
- ...App
- })
- app.$mount()
- export default app
|