分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-01-16 5884c9023393061afbe6d3d6e709e53e672ddde8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// 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()
})