Vue中$router.push的Redirected when going from xxx to xxx via a navigation guard.问题解决过程
今天在做Vue项目时,我需要让Router路由到某个path后自动跳转到另一个path,于是就写了个守卫来实现:
1 | router.beforeEach((to, from, next) => { |
但是跳转的时候却遇到了这么个报错:
今天在做Vue项目时,我需要让Router路由到某个path后自动跳转到另一个path,于是就写了个守卫来实现:
1 | router.beforeEach((to, from, next) => { |
但是跳转的时候却遇到了这么个报错: