Add the following code to the routing file router/index.js
//Solve the problem that vue-router in the navigation bar of ElementUI reports an error when repeatedly clicking the menu in version 3.0 or above
const originalPush = Router.prototype.push
Router.prototype.push = function push (location) {
return originalPush.call(this, location).catch(err => err)
}
Good position!!!!!
Type
Read More:
- Vue: How to Solve error avoided redundant navigation to current location: “/xxx”
- Vue elementui: solution for error: avoided redundant navigation to current location: “/xxx”
- VueUncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: “/
- [Solved] Vue console error: navigationduplicated: avoided redundant navigation to current location
- Vue solves the problem of repeated click navigation route error
- [Solved] Vue Error: Avoided redundant navigation to current location:/xxxx
- How to Solve Vue route jump repeated clicks Error
- Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to crrent location: “/home“
- Solve the problem of repeatedly clicking the same route console in Vue to report an error
- Solving routing errors by rewriting Vue push method
- [Solved] Vue route jumps to the same page many times error: Navigationduplicated
- Vue Error: Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location
- [Solved] Vue3 Configuration routing error: Catch all routes (“*“) must now be defined using a param with a custom regexp.
- How to open a page in a new window by Vue router
- Vue displays 404 and 500 interfaces according to HTTP response status
- [Solved] Vue-cli Error: Module not found: Error: Can‘t resolve ‘vue-router ‘
- [Solved] Uncaught Error: Provide the “history“ option when calling “createRouter()“
- [Solved] react-router-dom Error: index.js:1 Warning: Functions are not valid as a React child.
- How to React page to achieve entry and exit animation
- [Solved] vue-roter 4 Error: Error: Invalid route component/Uncaught (in promise) Error: Invalid route component