解決vue項目路由出現message: "Navigating to current location (XXX) is not allowed"的問題

緣由:在路由中添加了相同的路由。 解決: 重寫路由的push方法vue 在src/router/index.js 裏面import Router from 'vue-router'下面寫入下面方法便可web /** * 重寫路由的push方法 */ const routerPush = Router.prototype.push Router.prototype.push = function p
相關文章
相關標籤/搜索