vue中路由跳转参数传递
方式一:
传值:this.$router.push(path:"/path",query:{id:1})
取值:this.$route.query.id
方式二:
传值:this.$router.push(name:“path”,params:{id:1})
取值:this.$route.params.id
取值的是this.$ route 不是this.$router
vue中路由跳转参数传递
方式一:
传值:this.$router.push(path:"/path",query:{id:1})
取值:this.$route.query.id
方式二:
传值:this.$router.push(name:“path”,params:{id:1})
取值:this.$route.params.id
取值的是this.$ route 不是this.$router