NavigationDuplicated: Navigating to current location ("/admin/dataAdmin") is not allowed
这种情况改写一下路由的push方法就可以了,将要跳转的 location的路由放进去。
原文参考地址:https://blog.csdn.net/txl910514/article/details/102746160
const routerPush = Router.prototype.push
Router.prototype.push = function push(location) {
return routerPush.call(this, location).catch(error=> error)
}