Tag Archives: Problems encountered in front end and their solutions

How to Solve Vue route jump repeated clicks Error

The following error message appears
Solution:
Set the index.js under router as follows, and the problem is solved


The code is as follows.
// Repeated click on the route reports an error
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
const originalReplace = VueRouter.prototype.replace
VueRouter.prototype.replace = function replace (location) {
return originalReplace.call(this, location).catch(err => err)
}