diff --git a/2019/12/vue-router.md b/2019/12/vue-router.md index f038db1..82ccd78 100644 --- a/2019/12/vue-router.md +++ b/2019/12/vue-router.md @@ -299,3 +299,25 @@ export default { 4.访问时 的路径 : localhost:8080/#/父路由名/子组件名 全部代码 + +``` +const routes = [ + { path: "/a/:id", component: aa }, + { + path: "/b", + component: bb, + // beforeEnter:(to,from,next)=>{ + // window.console.log(to,"aaassjlfml;") + // next() + // }, + + children: [ + // {path:'/',component:bb}, + {path:'c',component:c}, + {path:'d',component:d}, + ] + }, + +] + +```