当你不仅想从这个页面跳转到另一个页面,而且想带参数跳转怎么办?你不能再使用router-link方法了。我们需要使用vue-router来传递参数。一共有两种方法。1.使用params方法传参,写this.$router.push({name:'xxx你要跳转到的页面'params:{id:id//目标页面需要接受的参数}})当目标页面要接受参数时,她需要写this.$router.params.id2。反向使用query,其实写法和params的写法类似,只是名字改成了paththis。$router.push({path:'/你想要的路径',query:{id:id}})接受参数this.$router.query.id
