NavigationDuplicated: Avoided redundant navigation to current location:

 

 

 vue-router.esm.js?ac56:2065 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: 

打开router文件夹下的index.js文件中添加如下代码:

 

 

 

const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
    return originalPush.call(this, location).catch(err => err)
}

 

posted @ 2022-01-19 13:33  ThisCall  阅读(664)  评论(1编辑  收藏  举报