在使用动态路由时出现了一个错误,无法解决,请各位大佬帮忙看看

NavigationDuplicated {_name: “NavigationDuplicated”, name: “NavigationDuplicated”, message: “Navigating to current location (”/") is not allowed", stack: “Error↵ at new NavigationDuplicated (http://loca…er (http://localhost:8080/app.bundle.js:79084:14)”}

在router.js内添加

const originalPush = Router.prototype.push;
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err);
};