vue 路由嵌套问题

92 阅读1分钟

如何实现访问/user/:id/posts 不经过user组件 直接访问userPosts组件

image.png

user、userposts、userprofile三个组件为三个单独的页面的 且 路由配置不变的情况下如何实现:

访问/user/:id 跳转到user组件

访问/user/:id/posts 到 userposts组件

访问/user/:id/profile 到 userprofile 组件