报错提示:
解决方法:
在router.js中添加如下代码:
//重复点击报错问题解决
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err);
};
报错提示:
解决方法:
在router.js中添加如下代码:
//重复点击报错问题解决
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err);
};