vue 列表页跳转详情页获取id的方法
详情页路由
{ path: 'orderDetails/:id', name: 'orderDetails', component: orderDetails, },
列表
openDetails(row){ //查看详情 this.$router.push({path:'orderDetails/'+row.number}) },
详情页
this.$route.params && this.$route.params.id
详情页路由
{ path: 'orderDetails/:id', name: 'orderDetails', component: orderDetails, },
列表
openDetails(row){ //查看详情 this.$router.push({path:'orderDetails/'+row.number}) },
详情页
this.$route.params && this.$route.params.id