{
path: "/song",
component: Song,
children: [
{
path: ":id",
component: Songditail
},
{
path: "/getNewsList",
component: newslist
}
]
}
this.$router.push({ path: "/song/getNews" })
newslist
{
path: "/song",
component: Song,
children: [
{
path: ":id",
component: Songditail
},
{
path: "/getNewsList",
component: newslist
}
]
}
this.$router.push({ path: "/song/getNews" })
newslist
I don't quite understand the relationship between / recommend/getNews and your defined route
your match newslist >
to / song/getNewsList
, then go : id
, Songditail
put / getNewsList
in front of : id
try