|
@@ -24,7 +24,19 @@ const routes = [
|
|
// name 代表路由的名称
|
|
// name 代表路由的名称
|
|
name:"mypage",
|
|
name:"mypage",
|
|
// component 代表路由的组件 当前要显示的页面
|
|
// component 代表路由的组件 当前要显示的页面
|
|
- component:() => import("../views/MyPage.vue")
|
|
|
|
|
|
+ component:() => import("../views/MyPage.vue"),
|
|
|
|
+ children:[
|
|
|
|
+ {
|
|
|
|
+ path:'/mypage/childone',
|
|
|
|
+ name:'childone',
|
|
|
|
+ component:() => import("../views/ChildOne.vue")
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ path:'/mypage/childtwo',
|
|
|
|
+ name:"childtwo",
|
|
|
|
+ component:() => import("../views/ChildTwo.vue")
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
|