admin管理员组

文章数量:1612098

出现原因:在当前路由,重复点击了当前路由

"Navigating to current location ("/某路由") is not allowed"

解决方案:

router/index.js文件里添加下列方法即可
/**
 * 重写路由的push方法
 */
const routerPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return routerPush.call(this, location).catch(error=> error)
}

本文标签: 报错项目NavigatingvueCurrent