main.js 579 B

123456789101112131415161718192021222324252627282930
  1. import Vue from 'vue';
  2. import App from './App.vue';
  3. import ElementUI from 'element-ui';
  4. import 'element-ui/lib/theme-chalk/index.css';
  5. // 路由跳转进度条
  6. import NProgress from 'nprogress';
  7. import 'nprogress/nprogress.css';
  8. import './index.css';
  9. import router from './router/router';
  10. import store from './store';
  11. Vue.use(ElementUI);
  12. router.beforeEach((to, from, next) => {
  13. NProgress.start();
  14. next()
  15. });
  16. router.afterEach(transition => {
  17. NProgress.done();
  18. });
  19. new Vue({
  20. el: '#app',
  21. router,
  22. store,
  23. render: (h) => h(App),
  24. })
  25. console.log(process.env.BASE_API)