1 // 解决重复点击链接的报错,在router.js中添加 2 const originalPush = Router.prototype.push 3 Router.prototype.push = function push(location) { 4 return originalPush.call(this, location).catch(err => err) 5 }