调整
Showing
2 changed files
with
36 additions
and
14 deletions
... | @@ -6,27 +6,35 @@ export const constantRouterMap = [ | ... | @@ -6,27 +6,35 @@ export const constantRouterMap = [ |
6 | { | 6 | { |
7 | path: '/', | 7 | path: '/', |
8 | name: 'index', | 8 | name: 'index', |
9 | component: () => import('@/layouts/TabBarLayout'), // 路由懒加载 | 9 | component: () => import('@/layouts/AppLayout'), |
10 | redirect: '/home', | 10 | redirect: '/home', |
11 | meta: { | 11 | meta: { |
12 | title: '首页', // 页面标题 | 12 | title: '首页', |
13 | keepAlive: false // keep-alive 标识 | 13 | keepAlive: false |
14 | }, | 14 | }, |
15 | children: [ | 15 | children: [ |
16 | { | 16 | { |
17 | path: '/home', | 17 | path: '/', |
18 | name: 'Home', | 18 | component: () => import('@/layouts/TabBarLayout'), |
19 | component: () => import('@/views/home/index'), | 19 | redirect: '/home', |
20 | meta: { title: '首页', keepAlive: false } | ||
21 | }, | ||
22 | { | ||
23 | path: '/about', | ||
24 | name: 'About', | ||
25 | component: () => import('@/views/home/about'), | ||
26 | meta: { | 20 | meta: { |
27 | title: '关于我', | 21 | title: '首页', |
28 | keepAlive: false | 22 | keepAlive: false |
29 | } | 23 | }, |
24 | children: [ | ||
25 | { | ||
26 | path: '/home', | ||
27 | name: 'Home', | ||
28 | component: () => import('@/views/home/index'), | ||
29 | meta: { title: '首页', keepAlive: false } | ||
30 | }, | ||
31 | { | ||
32 | path: '/about', | ||
33 | name: 'About', | ||
34 | component: () => import('@/views/home/about'), | ||
35 | meta: { title: '关于我', keepAlive: false } | ||
36 | } | ||
37 | ] | ||
30 | } | 38 | } |
31 | ] | 39 | ] |
32 | } | 40 | } | ... | ... |
src/layouts/AppLayout.vue
0 → 100644
-
Please register or sign in to post a comment