在vue项目中的table表中,只要其中这一条的数据,然后点击跳转后,在跳转的页面获取到我点击的这一条数据,那么可以使用this.$router.push()的方法
有两种方式,
1.第一种是name,和params
this.$router.push({
name: '/modifyUser',//这里是你要跳转的路由name
params: {
userID:999
})
获取参数的方法
this.route.params.userID
2.第二种是path,和query
this.$router.push({
path: '/modifyUser',//这里是你要跳转的路由path
query:{
userID:999
}
})
获取参数的方法
this.route.query.userID
注意:name只能使用params;path只能使用query,不要搞混了