其他分享
首页 > 其他分享> > Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to 解决办法

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)
}

标签:err,redundant,NavigationDuplicated,promise,location,push,Router,prototype,origin
来源: https://www.cnblogs.com/pipihao/p/15009084.html