解决 Avoided redundant navigation to current location: "/"

时间:2021-02-16 23:26:34   收藏:0   阅读:923

技术分享图片

 

 

解决方法

打开你router目录下的index.js文件,复制下面代码,添加到最下方就可以了。

const originalPush = VueRouter.prototype.push
   VueRouter.prototype.push = function push(location) {
   return originalPush.call(this, location).catch(err => err)
}
VueRouter 是你引入 vue-router 

原文:https://www.cnblogs.com/maxiag/p/14407356.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!