【报错】Uncaught (in promise) Error: Avoided redundant navigation to current location:
vue项目中,重复点击路由会出现如下报错解决办法:在router的配置文件中(router -> index.js)加上:const originalPush = Router.prototype.pushRouter.prototype.push = function push (location) {return originalPush.call(this, location).cat
·
vue项目中,重复点击路由会出现如下报错
解决办法:
在router的配置文件中(router -> index.js)加上:
const originalPush = Router.prototype.push
Router.prototype.push = function push (location) {
return originalPush.call(this, location).catch(err => err)
}
即可解决
参考:
https://blog.csdn.net/xiecheng1995/article/details/106497172/?utm_medium=distribute.pc_relevant.none-task-blog-baidujs-1
更多推荐
已为社区贡献2条内容
所有评论(0)