This repository was archived by the owner on May 12, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 "dependencies" : {
1111 "element-ui" : " ^2.4.5" ,
1212 "normalize.css" : " ^8.0.1" ,
13+ "nprogress" : " ^0.2.0" ,
1314 "vue" : " ^2.5.17" ,
1415 "vue-router" : " ^3.0.1" ,
1516 "vuex" : " ^3.0.1"
Original file line number Diff line number Diff line change 11import Vue from 'vue'
2+ import 'normalize.css'
23import App from './App.vue'
3- import router from './router'
4+ // Shouldn't use Router instance directly without 'PERMISSION/index' processing.
5+ import router from './permission'
46import store from './store'
5- import 'normalize.css'
67import './plugins/element.js'
78
89Vue . config . productionTip = false
Original file line number Diff line number Diff line change 1+ import router from 'ROUTER'
2+ import NProgress from 'nprogress'
3+ import 'nprogress/nprogress.css'
4+
5+ NProgress . configure ( { showSpinner : false } )
6+
7+ router . beforeEach ( ( to , from , next ) => {
8+ NProgress . start ( )
9+ next ( )
10+ } )
11+
12+ router . afterEach ( ( to , from ) => {
13+ NProgress . done ( )
14+ } )
15+
16+ export default router
Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ import { constantComponents } from './components'
44
55Vue . use ( Router )
66
7+ /**
8+ * ! NOTICE
9+ * This router instance should not be added directly without
10+ * `PERMISSION/index` processing.
11+ */
712export default new Router ( {
813 routes : [
914 {
Original file line number Diff line number Diff line change @@ -4791,6 +4791,10 @@ npm-run-path@^2.0.0:
47914791 gauge "~2.7.3"
47924792 set-blocking "~2.0.0"
47934793
4794+ nprogress@^0.2.0 :
4795+ version "0.2.0"
4796+ resolved "http://registry.npm.taobao.org/nprogress/download/nprogress-0.2.0.tgz#cb8f34c53213d895723fcbab907e9422adbcafb1"
4797+
47944798nth-check@^1.0.2, nth-check@~1.0.1 :
47954799 version "1.0.2"
47964800 resolved "http://registry.npm.taobao.org/nth-check/download/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c"
You can’t perform that action at this time.
0 commit comments