vue 改变路由参数

更改路由传递的参数:

const query = JSON.parse(JSON.stringify(this.$route.query)) // 获取路由参数信息
query.id = Name //改变参数
this.$router.push({path:this.$route.path,query}) //更新路由

参考:

https://segmentfault.com/q/1010000022503369?sort=created

原文地址:https://www.cnblogs.com/yc-c/p/14089807.html