Vue路由跳轉報錯「Avoided redundant navigation to current location「

在本身作項目的過程當中遇到了一個這樣的問題,使用this.$router.push()跳轉會報錯,可是不會影響頁面。javascript 緣由就是在使用vue-router進行路由跳轉時,因爲導航重複進而報錯。vue 解決:重寫router原型中的push方法,在router下的index.js中添加java const originalPush = Router.prototype.push R
相關文章
相關標籤/搜索