在 router /index,js 添加
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
防止多次点击路由出错
最新推荐文章于 2023-05-27 14:46:27 发布
在 router /index,js 添加
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}