vue router重複點擊報錯:NavigationDuplicated 的解決方法

今天使用的時候報了這個錯誤,從新裝了node_modules包也沒辦法解決,網上查了一下解決方法很簡單,直接附上兩段代碼,由於我使用push沒有生效因此我使用了replace方法,寫在main.js文件中就能夠了。javascript import Router from 'vue-router' const originalPush = Router.prototype.push Router.
相關文章
相關標籤/搜索