使用不同的参数跳转到当前根、刷新页面并检索该参数是在空白页上实现的。 例如/detail? id=1是否跳至/detail? id=2
detail.vue
导出默认值{ methods : } test ((this.$ router.push ) path:(/empty ),query: ) router3360 )/detaault }} empty.vue空白页(此页要求添加与路由表对应的路由() )。
exportdefault{created(}(/重定向this.$router.replace ) this.$route.query.router ) }只需跳转到当前路由即可
注意:使用这种方法,原有的路由会消失(被替换)
test () (this.$router.go ) )0)