vue在配置路由的时候如下:
{ path: "/app", name: "app", component: welcome, redirect: "app/first", children: [ { path: "first", name: "first", component: first, redirect:"first/index", children:[ { path: "index", name: "index", component: index } ] } ] }
这样在访问路径的时候,想要访问index。路径必须是app/first/index.
有没有办法可以使得访问first的子路由index时,不带上父路由first的路径,即通过app/index即可访问index页面。前提是,不允许改变first和index的父子关系
子衿沉夜
相关分类