vue this.$router.push传值的两种方式,在URL展示传递的参数或者不展示
1、paramsthis.$router.push({ name: 'internet', params: { version: params.row.version, name: params.row.name, kind: params.row.kind } })参数不会显示在地址栏接收:this.version = this.$route.params.versionthis.name= t
·
1、params
this.$router.push({ name: 'internet', params: { version: params.row.version, name: params.row.name, kind: params.row.kind } })
参数不会显示在地址栏
接收:
this.version = this.$route.params.version
this.name= this.$route.params.name
this.kind = this.$route.params.kind
2、query
this.$router.push({ name: 'internet', query: { version: params.row.version, name: params.row.name, kind: params.row.kind } })
参数会显示在地址栏
接收:
this.version = this.$route.query.version
this.name= this.$route.query.name
this.kind = this.$route.query.kind
更多推荐
已为社区贡献2条内容
所有评论(0)