原文:關於VUE項目中報Error: Avoided redundant navigation to current location: 的錯

在VUE中路由遇到Error: Avoided redundant navigation to current location:報錯顯示是路由重復, 雖然對項目無影響,但是看到有紅的還是不舒服。 於是查了一下發現可以這樣解決 router文件夾下面的index.js中加上下面幾句代碼 const originalPush Router.prototype.push Router.prototy ...

2020-06-15 13:43 0 12068 推薦指數:

查看詳情

Vue Avoided redundant navigation to current location Error

這個報錯的根源就是vue-router組件,錯誤內容翻譯一下是: Avoided redundant navigation to current location === 避免冗余導航到當前位置 這個問題的解決方案就是屏蔽它,就是重寫vue-router的push方法,不影響正常使用 ...

Thu Jun 25 01:42:00 CST 2020 0 3244
Avoided redundant navigation to current location

問題 在做菜單跳轉功能時,發現如果多次點擊同一個項,發生重復跳轉就會報錯。 Avoided redundant navigation to current location... 解決 (1) 高版本 VueRouter 新加的報錯信息,第一種辦法是減低 VueRouter ...

Sun Jul 19 01:28:00 CST 2020 0 1069
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM