vue怎么去掉url参数

如果带参数跳转的页面是tag下的页面时,切换tag不会路由切换,切换tag页时url上的参数还是会在,切换时去掉跳转时带的参数用:

location.replace(location.href.replace(location.hash, `#${this.$route.path}`))
`#${this.$route.path}`里面的#不能去掉
posted @ 2021-11-22 16:41  zzwlong  阅读(3366)  评论(0编辑  收藏  举报