解决再次点击饿了么导航组件(同一个)跳转路由报错问题

1,276 阅读1分钟

在router.js中加入这段代码

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