vue 修改当前页面传入的query参数

需求:

  需要在详情页面修改当前页面query传过来的参数。

 

代码:

const query=JSON.parse(JSON.stringify(this.$route.query))
query.state=true;//state 修改的参数
this.$router.push({ path: this.$route.path, query })

 

posted @ 2021-07-06 10:31  _houjie  阅读(3483)  评论(0编辑  收藏  举报