Vue Router 子路由进不去
检查一下子路由的路径是否带了根路径'/'比如children:[{path:"/modify/:id",name:"modifyAddress",props:true,component:ModifyDetail},{path:/"new",...
·
检查一下子路由的路径是否带了根路径'/'
比如
children:[
{
path:"/modify/:id",
name:"modifyAddress",
props:true,
component:ModifyDetail
},{
path:/"new",
name:"addAddress",
component:AddDetailContainer
}
]
这样是进不去的,应该承接父路由不需要添加'/'
,
{
path:"/addressDetail",
name:"addressDetail",
component:AddressDetailContainer,
children:[
{
path:"modify/:id",
name:"modifyAddress",
props:true,
component:ModifyDetail
},{
path:"new",
name:"addAddress",
component:AddDetailContainer
}
]
}
更多推荐
已为社区贡献16条内容
所有评论(0)