Add the following code to the index.js file under the router folder:
import Router from 'vue-router' // 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) }
Similar Posts:
- [Solved] VUE Project Error: Avoided redundant navigation to current location: “/XXX“
- [Solved] Vue route Duplicate Error: error avoid redundant navigation to current location: “/home”
- [Solved] Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to
- [Solved] Vue Error: NavigationDuplicated: Avoided redundant navigation to current location: “xxx”.
- How to Solve Vue Error: NavigationDuplicated
- Resolve Vue the navigationduplicated error on the console
- Uncaught (in promise) NavigationDuplicated [How to Solve]
- [Solved] Vue Error: Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location
- [Solved] Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location
- [Solved] Vue router common problems (push error, push duplicate route refresh)