Vue项目报错:Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location

我在使用路由跳转的时候,跳转不了,浏览器报错:

Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: “/main”.
createRouterError vue-router.esm.js:2065
createNavigationDuplicatedError vue-router.esm.js:2035
confirmTransition vue-router.esm.js:2328
transitionTo vue-router.esm.js:2260
push vue-router.esm.js:2704
push vue-router.esm.js:3020
push vue-router.esm.js:3019

错误原因是我没有加:

<router-view></router-view>

猜你喜欢

转载自blog.csdn.net/weixin_43394832/article/details/115742512
今日推荐