問題 在做菜單跳轉功能時,發現如果多次點擊同一個項,發生重復跳轉就會報錯。 Avoided redundant navigation to current location... 解決 (1) 高版本 VueRouter 新加的報錯信息,第一種辦法是減低 VueRouter ...
發現原因:做vue項目中,不斷重復點擊當前路由導航會發生報錯, 解決方案: ...
2020-08-04 14:43 0 598 推薦指數:
問題 在做菜單跳轉功能時,發現如果多次點擊同一個項,發生重復跳轉就會報錯。 Avoided redundant navigation to current location... 解決 (1) 高版本 VueRouter 新加的報錯信息,第一種辦法是減低 VueRouter ...
解決方法 打開你router目錄下的index.js文件,復制下面代碼,添加到最下方就可以了。 ...
這個報錯的根源就是vue-router組件,錯誤內容翻譯一下是: Avoided redundant navigation to current location === 避免冗余導航到當前位置 這個問題的解決方案就是屏蔽它,就是重寫vue-router的push方法,不影響正常使用 ...
vue-router.esm.js?ac56:2065 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: 打開router文件夾 ...
直接在 router下的index文件中加入下邊的代碼: ...
記錄一下踩坑過程: 本來項目好好的,拉完代碼,重新安裝了node_modules,其它的都沒動,然后使用路由 push 的時候就會報這個錯。完全不知道為什么 然后找度娘,結果基本上千篇 ...
在router文件夾下的index.js中加入紅色字體代碼即可解決 ...
近期項目 進去突然報錯Avoided redundant navigation to current location: "/system/personNumList" 查資料發現說是 因為路由重復。 在router.js下加入一下代碼即可 ...