动静替换和批改URL的参数,可应用webpack-merge包来实现
1.装置 npm install webpack-merge -D
2.援用: import merge from 'webpack-merge'
3.应用办法:

1️新增一个id this.$router.push({    query:merge(this.$route.query,{'id':'123'})})2️ 批改idthis.$router.push({    query:merge(this.$route.query,{'id':'456'})})3️ 替换所有idthis.$router.push({    query:merge({},{'userId':'xxx123456'})})

最初再加上location.reload(),刷新一下以后页面就跳转过来了

特别感谢一下博主:https://www.jianshu.com/p/b9e...