vue-navigation icon indicating copy to clipboard operation
vue-navigation copied to clipboard

router.beforeEach会执行两次

Open zhangchuanbo opened this issue 6 years ago • 2 comments

在某些情况下两次跳转的页面不同,第一次是我需要跳转的页面,第二次则是当前页面,最后导致页面不能正确跳转。在这种情况下地址栏未更新。手动填写地址栏可以正确跳转。

zhangchuanbo avatar Jan 23 '19 11:01 zhangchuanbo

找到原因了,是因为登陆界面的route路由元信息中的name为空,导致第二次进入beforeEach的时候没有值。

zhangchuanbo avatar Jan 23 '19 11:01 zhangchuanbo

自荐

hezhongfeng avatar Jun 10 '20 07:06 hezhongfeng