因为只有在.umi/router.js中找到了<Router history={window.g_history}> 这个一句,所以猜测4处获取的history是通过1处传递的,但是现在还是不太清楚Router中的history是通过何中方式挂载到组件中的props属性上的,但是只要是经过router.config.js这个文件中的路由的组件都能在其组件中获取到history属性ant design pro 中 组建的history属性由来

绿框中如果想要用到history其实可以通过组件传值的形式传过去如下:

ant design pro 中 组建的history属性由来

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-29
  • 2021-07-04
  • 2022-12-23
  • 2022-01-16
  • 2022-12-23
猜你喜欢
  • 2021-10-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2021-12-13
  • 2021-07-13
相关资源
相似解决方案