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版本都不起作用。最后采用了上面最简单的判断方式。

原文地址:https://www.cnblogs.com/stella1024/p/13376687.html