|
|
@@ -8,24 +8,13 @@ import App from '@/app.vue'
|
|
8
|
8
|
import store from '@/store'
|
|
9
|
9
|
|
|
10
|
10
|
import IndexPage from '@/pages/index.vue'
|
|
11
|
|
-import ListPage from '@/pages/list'
|
|
12
|
|
-import SinglePage from '@/pages/single'
|
|
13
|
11
|
|
|
14
|
12
|
const router = new VueRouter({
|
|
15
|
13
|
mode: 'history',
|
|
16
|
14
|
routes: [
|
|
17
|
15
|
{ path: '/', component: IndexPage },
|
|
18
|
|
- { path: '/lazy', component: () => import(/* webpackChunkName: "pages-lazy" */ './pages/lazy.vue') },
|
|
19
|
|
- {
|
|
20
|
|
- path: '/:type',
|
|
21
|
|
- component: ListPage,
|
|
22
|
|
- props: { sidebar: true }
|
|
23
|
|
- },
|
|
24
|
|
- {
|
|
25
|
|
- path: '/:type/:id',
|
|
26
|
|
- component: SinglePage,
|
|
27
|
|
- props: { sidebar: true }
|
|
28
|
|
- },
|
|
|
16
|
+ { path: '/:type', component: () => import(/* webpackChunkName: "pages-list" */ './pages/list.vue'), props: { sidebar: true } },
|
|
|
17
|
+ { path: '/:type/:id', component: () => import(/* webpackChunkName: "pages-single" */ './pages/single.vue'), props: { sidebar: true } },
|
|
29
|
18
|
]
|
|
30
|
19
|
})
|
|
31
|
20
|
|