vue怎麼去掉url參數

如果帶參數跳轉的頁面是tag下的頁面時,切換tag不會路由切換,切換tag頁時url上的參數還是會在,切換時去掉跳轉時帶的參數用:

location.replace(location.href.replace(location.hash, `#${this.$route.path}`))
`#${this.$route.path}`裏面的#不能去掉
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章