// The Vue build version to load with the `import` command
|
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
|
import Vue from 'vue'
|
import App from './App'
|
import router from './router'
|
import ElementUI from 'element-ui'
|
import 'element-ui/lib/theme-chalk/index.css'
|
import iView from 'iview'
|
import 'iview/dist/styles/iview.css'
|
import http from './api/http'
|
import permission from './api/permission'
|
import store from './store/index'
|
import base from './utilities/common'
|
Vue.use(iView)
|
Vue.config.productionTip = false
|
Vue.use(ElementUI)
|
|
/* eslint-disable no-new */
|
var vue = new Vue({
|
el: '#app',
|
store,
|
router,
|
components: { App },
|
template: '<App/>'
|
})
|
// Vue.use(permission);
|
Vue.prototype.http = http;
|
Vue.prototype.http.init(vue);
|
Vue.prototype.permission = permission;
|
Vue.prototype.permission.init(vue);
|
Vue.prototype.base = base;
|
/* 2020.07.31增加手动打开tabs*/
|
Vue.prototype.$tabs = {};
|
router.beforeEach((to, from, next) => {
|
vue.$Loading.start({ color: 'white', height: 2 });
|
// NProgress.start();
|
next();
|
})
|
|
router.afterEach(() => {
|
vue.$Loading.finish();
|
// NProgress.done()
|
})
|