{ path: ‘/describe/:id‘, name: ‘Describe‘, component: Describe }
this.$router.push({ path: `/describe/${id}`, })
{
path: ‘/describe‘,
name: ‘Describe‘,
component: Describe
}
this.$router.push({
name: ‘Describe‘,
params: {
id: id
}
})
{
path: ‘/describe‘,
name: ‘Describe‘,
component: Describe
}
this.$router.push({
path: ‘/describe‘,
query: {
id: id
}
})
vue-router和react-router-dom路由传参对照
原文:https://www.cnblogs.com/zhangjixiang123/p/10128074.html