Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to 解决办法

main.js 配置如下

import Router from 'vue-router';
//路由导航冗余报错(路由重复)
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
    return originalPush.call(this, location).catch(err => err)
}
posted @ 2021-07-14 00:42  皮豪  阅读(206)  评论(0编辑  收藏  举报