报错内容
Navigating to current location ("/home/index") is not allowed
解决方式
在src/router.js 里面import Router from 'vue-router’下面写入下面方法即可
const routerPush = Router.prototype.push
Router.prototype.push = function push(location) {
return routerPush.call(this, location).catch(error=> error)
}