vue Uncaught Error: Redirected when going from “/*“ to “/*“ 路由报错

 
Uncaught Error: Redirected when going from "/*" to "/*"  

报类似的错 大部分因为触发了vue-router 路由导航重定向了

 

简单的方法就是直接触发跳转的逻辑上,把error抛出来

 this.$router.replace({
        path: this.$route.path,
        query
   })
 .catch(()=>{});//把error 抛出来

 

 

扩展参考 https://blog.csdn.net/ProgrammingWhite/article/details/107693339

posted @ 2020-08-05 14:05  天渺工作室  阅读(3023)  评论(0编辑  收藏  举报