解决vue-router重复点击报错问题

#1 在router的index.js里面加入以下代码

 ```

const originalPush = Router.prototype.push

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

 ```

注意Router名,与import Router from 'vue-router'引入的名保持一致

你可能感兴趣的:(解决vue-router重复点击报错问题)