問題 在做菜單跳轉功能時,發現如果多次點擊同一個項,發生重復跳轉就會報錯。 Avoided redundant navigation to current location... 解決 (1) 高版本 VueRouter 新加的報錯信息,第一種辦法是減低 VueRouter ...
這個報錯的根源就是vue router組件,錯誤內容翻譯一下是:Avoided redundant navigation to current location 避免冗余導航到當前位置 這個問題的解決方案就是屏蔽它,就是重寫vue router的push方法,不影響正常使用 在 Vue.use VueRouter的時候 ,前面加上這一句即可 主要的作用就是把err給屏蔽了,不進行輸出了,頁面看不 ...
2020-06-24 17:42 0 3244 推薦指數:
問題 在做菜單跳轉功能時,發現如果多次點擊同一個項,發生重復跳轉就會報錯。 Avoided redundant navigation to current location... 解決 (1) 高版本 VueRouter 新加的報錯信息,第一種辦法是減低 VueRouter ...
在router文件夾下的index.js中加入紅色字體代碼即可解決 ...
在VUE中路由遇到Error: Avoided redundant navigation to current location:報錯顯示是路由重復,雖然對項目無影響,但是看到有紅的還是不舒服。於是查了一下發現可以這樣解決在你引入VueRouter的時候再加上一句話: const ...
在VUE中路由遇到Error: Avoided redundant navigation to current location:報錯顯示是路由重復, 雖然對項目無影響,但是看到有紅的還是不舒服。 於是查了一下 ...
在VUE中路由遇到Error: Avoided redundant navigation to current location:報錯顯示是路由重復,雖然對項目無影響,但是看到有紅的還是不舒服。於是查了一下發現可以這樣解決在你引入VueRouter的時候再加上一句話: const ...
解決方法 打開你router目錄下的index.js文件,復制下面代碼,添加到最下方就可以了。 ...
vue-router.esm.js?ac56:2065 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: 打開router文件夾 ...
直接在 router下的index文件中加入下邊的代碼: ...