vue路由跳转报错:NavigationDuplicated: Navigating to current location ("/F_moments") is not allowed...
vue中通过路由进行页面跳转时报以下错误:原因:在跳转时push了相同的地址解决:在引入vue-router的文件(router文件夹下的index.js)中加入以下代码即可const originalPush = Router.prototype.push;Router.prototype.push = function push(location) {return origin...
·
vue中通过路由进行页面跳转时报以下错误:
原因:在跳转时push了相同的地址
解决:在引入vue-router的文件(router文件夹下的index.js)中加入以下代码即可
const originalPush = Router.prototype.push;
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
};
更多推荐
已为社区贡献1条内容
所有评论(0)