|
1 | 1 | import { GITHUB } from '@/config' |
2 | 2 | import Layout from '@/layout/web' |
3 | | -import Home from '@/views/web/home' |
4 | | -import Article from '@/views/web/article' |
5 | | -import Archives from '@/views/web/archives' |
6 | | -import Categories from '@/views/web/categories' |
7 | | -import List from '@/views/web/tag' |
8 | | -import About from '@/views/web/about' |
9 | | - |
10 | 3 | import lazy from '@/components/Lazy' |
11 | | -const PageNotFound = lazy(() => import('@/components/404')) |
12 | | -const GithubLogining = lazy(() => import('@/components/GithubLogining')) |
13 | 4 |
|
14 | 5 | export default { |
15 | 6 | path: '/', |
16 | 7 | name: 'home', |
17 | 8 | component: Layout, |
18 | 9 | childRoutes: [ |
19 | | - { path: '', component: Home }, |
20 | | - { path: 'article/:id', component: Article }, |
21 | | - { path: 'archives', component: Archives }, |
22 | | - { path: 'categories', component: Categories }, |
23 | | - { path: 'categories/:name', component: List }, |
24 | | - { path: 'tags/:name', component: List }, |
25 | | - { path: '/github', component: GITHUB.enable && GithubLogining }, |
26 | | - { path: '/about', component: About }, |
27 | | - { path: '*', component: PageNotFound } |
28 | | - ] |
| 10 | + { path: '', component: lazy(() => import('@/views/web/home')) }, |
| 11 | + { path: 'article/:id', component: lazy(() => import('@/views/web/article')) }, |
| 12 | + { path: 'archives', component: lazy(() => import('@/views/web/archives')) }, |
| 13 | + { path: 'categories', component: lazy(() => import('@/views/web/categories')) }, |
| 14 | + { path: 'categories/:name', component: lazy(() => import('@/views/web/tag')) }, |
| 15 | + { path: 'tags/:name', component: lazy(() => import('@/views/web/tag')) }, |
| 16 | + { path: '/github', component: GITHUB.enable && lazy(() => import('@/components/GithubLogining')) }, |
| 17 | + { path: '/about', component: lazy(() => import('@/views/web/home')) }, |
| 18 | + { path: '*', component: lazy(() => import('@/components/404')) }, |
| 19 | + ], |
29 | 20 | } |
0 commit comments