diff --git a/src/layouts/index.vue b/src/layouts/index.vue index 8113e41..2747132 100644 --- a/src/layouts/index.vue +++ b/src/layouts/index.vue @@ -1,15 +1,53 @@ + + + {{ $route.meta.title }} + + + + + + + {{ tab.title }} + + + + + + + diff --git a/src/router/index.ts b/src/router/index.ts index 7a88f56..d3a9e95 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -7,15 +7,33 @@ const router = createRouter({ { path: '/', name: 'home', - component: Home + component: Home, + meta: { + title: '首页' + } }, { path: '/design', name: 'design', + meta: {}, // route level code-splitting // this generates a separate chunk (About.[hash].js) for this route // which is lazy-loaded when the route is visited. component: Design + }, { + path: '/survey', + name: 'survey', + meta: { + title: '问卷' + }, + component: () => import('../views/Survey/Inex.vue') + }, { + path: '/market', + name: 'market', + meta: { + title: '模板' + }, + component: () => import('../views/Market/Index.vue') } ] }); diff --git a/src/views/Home/Index.vue b/src/views/Home/Index.vue index c3a1388..89972c9 100644 --- a/src/views/Home/Index.vue +++ b/src/views/Home/Index.vue @@ -21,14 +21,15 @@ const func = [{ - - - 首页 - - - + + + title @@ -39,18 +40,8 @@ const func = [{