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 Error: Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location
- VueUncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: “/
- Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to crrent location: “/home“
- Vue elementui: solution for error: avoided redundant navigation to current location: “/xxx”
- Vue: How to Solve error avoided redundant navigation to current location: “/xxx”
- [Solved] Vue console error: navigationduplicated: avoided redundant navigation to current location
- [Solved] Vue Error: Avoided redundant navigation to current location:/xxxx
- How to Solve Uncaught (in promise) Error (Two Solutions)
- How to solve Uncaught (in promise) error in VUE?
- Vue solves the problem of repeated click navigation route error
- [Solved] Vue-router Error: Navigation cancelled from “/course“ to “/user“ with a new navigation.
- [Solved] Uncaught (in promise) DOMException: Failed to load because no supported source was found.
- [Solved] Uncaught (in promise) TypeError: XXX.a is not a constructor
- ArcGIS API for JavaScript Error Uncaught(in promise): TypeError: xxx is not a constructor
- [Solved] echarts Draw Errror: echarts-d9fd185e.js:31447 Uncaught (in promise) Error: Initialize failed: invalid dom.
- [Solved] Echarts Error: Uncaught (in promise) Error: Initialize failed: invalid dom.
- [Solved] vue-roter 4 Error: Error: Invalid route component/Uncaught (in promise) Error: Invalid route component
- [Solved] Turf.js error: uncaught (in promise) error: the solution of invalid unit
- request.js?b775:101 Uncaught (in promise) Error: Failed to convert value of type ‘java.lang.String’ to required type ‘java.lang.Long’;
- Solve the problem of repeatedly clicking the same route console in Vue to report an error