动态路由

定义:

{
    path:'/details/:id'
    name:'Details',
    component:Details
}

获取传参:

console.log(this.$route.params.id)

 

posted @ 2020-04-09 12:00  2350305682  阅读(127)  评论(0)    收藏  举报