vue脚手架 路由报错Avoided redundant navigation to current location: "/"

解决方法1

const originalPush = Router.prototype.push

Router.prototype.push = function push(location) {

return originalPush.call(this, location).catch(err => err)

}

在router文件夹下index.js 最下方加入以上代码 

解决方法2 

vue-router 用3.0版本

你可能感兴趣的:(vue脚手架 路由报错Avoided redundant navigation to current location: "/")