错误:在VUE中路由遇到Error: Avoided redundant navigation to current location:
报错显示是路由重复
解决办法:
在引入router时,加上
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
具体加入的位置:router.js
如果是使用VueRouter,就在引入VueRouter的时候再加上
本文为 _喵小花儿和喵小胖儿的博客博主原创文章,遵循 CC 4.0 BY-SA 版权协议,附上原文出处链接和声明。 原文链接:blog.csdn.net/qq_41687299…