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
相关文章
相关标签/搜索