|
|
@@ -60,6 +60,10 @@ const routes = [
|
|
|
path:"/pagethree/child2/:id",
|
|
|
name:"pagethreechild2",
|
|
|
component: () => import("../views/PageThreeChild2.vue")
|
|
|
+ },{
|
|
|
+ path:"/pagethree/child3",
|
|
|
+ name:"pagethreechild3",
|
|
|
+ component: () => import("../views/PageThreeChild3.vue")
|
|
|
}
|
|
|
]
|
|
|
},{
|
|
|
@@ -69,6 +73,13 @@ const routes = [
|
|
|
redirect:"/",
|
|
|
// 别名 访问 /backhome 也会跳转到 / 首页
|
|
|
alias:"/backhome"
|
|
|
+ },{
|
|
|
+ // 实现 404 页面
|
|
|
+ // 通配符路由 必须写在最后面
|
|
|
+ // 当访问的路径 都没有匹配到其他路由的时候 就会跳转到通配符路由
|
|
|
+ path:"*",
|
|
|
+ name:"error",
|
|
|
+ component: () => import("../views/ErrorPage.vue")
|
|
|
}
|
|
|
]
|
|
|
|