vue路由跳轉報錯:NavigationDuplicated: Navigating to current location ("/F_moments") is not allowed...

vue中經過路由進行頁面跳轉時報如下錯誤: 緣由:在跳轉時push了相同的地址vue 解決:在引入vue-router的文件(router文件夾下的index.js)中加入如下代碼便可web const originalPush = Router.prototype.push; Router.prototype.push = function push(location) { return o
相關文章
相關標籤/搜索