解决vue-router重复点击报错问题
在index.js路由配置文件
```javascript
import Vue from 'vue'
import Router from 'vue-router'
//解决vue-router重复点击报错问题(this.$router.replace())
const originalPush = Router.prototype.replace;
Router.prototype.replace = function replace(location) {
return originalPush.call(this, location).catch(err => err);
};
//解决vue-router重复点击报错问题(this.$router.push())
const originalPush = Router.prototype.push;
Router.prototype.push= function push(location) {
return originalPush.call(this, location).catch(err => err);
};
注意区分this.router.replace()和this.router.push()