vue 修改当前页面传入的query参数
需求:
需要在详情页面修改当前页面query传过来的参数。
代码:
const query=JSON.parse(JSON.stringify(this.$route.query))
query.state=true;//state 修改的参数
this.$router.push({ path: this.$route.path, query })
需求:
需要在详情页面修改当前页面query传过来的参数。
代码:
const query=JSON.parse(JSON.stringify(this.$route.query))
query.state=true;//state 修改的参数
this.$router.push({ path: this.$route.path, query })
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步