点击三级分类跳转的时候带上了query参数,然后再次点击关键字搜索,需要把keyword和原来的参数合并
console.log("qury",this.$route.query); let query = JSON.parse(JSON.stringify(this.$route.query)) query.keyword = this.keyword this.$router.push({ name:"search", query:query })
深拷贝实现
标签:keyword,route,JSON,参数,query,路由 From: https://www.cnblogs.com/sgj191024/p/17608874.html