[Vue warn]: Error in v-on handler (Promise/async): "NavigationDuplicated: Navigating to current loca
问题:[Vue warn]: Error in v-on handler (Promise/async): “NavigationDuplicated: Navigating to current location (”/article") is not allowed"
红框为如今所处的路由地址。html
解决前是这样:this.$router.push({ path: ‘/commonSetting’ })vue
解决后:this.$router.push({ path: ‘/commonSetting’ },onComplete => {},
onAbort => {})
注:就是在this.$router.push('/article') 加入onComplete => {},
onAbort => {}
原因:多次触发跳转就会有这个报错
意思详见Vue Router官网:https://router.vuejs.org/zh/guide/essentials/navigation.html