提交 | 用户 | age
|
36e1de
|
1 |
/** |
L |
2 |
* router 配置,使用路由懒加载 |
|
3 |
*/ |
|
4 |
import Vue from 'vue' |
|
5 |
import Router from 'vue-router' |
|
6 |
import Store from '../store' |
|
7 |
// import HelloWorld from '@/components/HelloWorld' |
|
8 |
|
|
9 |
Vue.use(Router) |
|
10 |
|
|
11 |
let router = new Router({ |
|
12 |
// mode: 'history', |
|
13 |
routes: [ |
|
14 |
{ |
|
15 |
path: '/', |
|
16 |
name: 'root', |
|
17 |
component: () => import('@/pages/index'), |
|
18 |
}, |
|
19 |
{ |
|
20 |
path: '/index', |
|
21 |
name: 'index', |
|
22 |
component: () => import('@/pages/index'), |
|
23 |
} |
|
24 |
] |
|
25 |
}) |
|
26 |
|
|
27 |
export default router |