From 7811e0fbce3664fa0dcade5b1acc819cd0c3ac3d Mon Sep 17 00:00:00 2001 From: asd <374367073@qq.com> Date: Mon, 9 Dec 2019 11:32:31 +0800 Subject: [PATCH] update --- 2019/12/vue-router.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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}, + ] + }, + +] + +```