vue跳转页面报错:Uncaught (in promise) Error: Redirected when going from "/person/modify" to "/ideaFeedback" via a navigation guard.


Uncaught (in promise) Error: Redirected when going from "/person/modify" to "/ideaFeedback" via a navigation guard.

 

原因:重复的重定向引起vue-router报错。。。

解决方案:在跳转前判断当前页面是否就是要跳转的页面,如果是则不再次跳转,这样就不会报错了。

 

说明:解决问题的过程中参考了其他博主给的方法更新vue-router版本都不起作用。最后采用了上面最简单的判断方式。

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM