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)
}
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)
}
Read More:
- Vue solves the problem of repeated click navigation route error
- Solve the problem of repeatedly clicking the same route console in Vue to report an error
- Vue: How to Solve error avoided redundant navigation to current location: “/xxx”
- [Solved] Vue route jumps to the same page many times error: Navigationduplicated
- Jest Vue $route error [How to Modify]
- [Solved] Vue Route Error: Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_42__.defineComponent) is not a function
- Vue elementui: solution for error: avoided redundant navigation to current location: “/xxx”
- [Solved] Vue Error: Avoided redundant navigation to current location:/xxxx
- [Solved] Vue console error: navigationduplicated: avoided redundant navigation to current location
- How to Solve “Vue is not defined” Error
- How to Solve Vue editor bridge error
- How to Solve Vue3 Import lodash error
- [Solved] vue-roter 4 Error: Error: Invalid route component/Uncaught (in promise) Error: Invalid route component
- Vue: How to Solve Eslint error
- How to solve Uncaught (in promise) error in VUE?
- How to Solve VUE Error: Avoid mutating a prop directly since the value will be overwritten …
- How to Solve Vue add element Install Error
- How to Solve VUE Error: Mixed spaces and tabs
- How to Solve Vue cli syntax Close Error
- How to Solve Vue3 using deep syntax Error