动态替换修改url参数,可以使用webpack-merge包完成1.安装npminstallwebpack-merge-D2。引用:importmergefrom'webpack-merge'3.使用方法:1??添加一个idthis.$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...
