Error

vue-router.esm.js?a12b:2046 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: "/homeauto".

Solution

switchTab(path) {
   if (this.$router.path == path) return
   this.$router.push(path)
}
This solution is simple and effective.