Closed frankcou closed 1 year ago
由于缺乏足够的信息,我们暂时关闭了该 Issue。请修改(不要回复) Issue 提供最小重现以重新开启。谢谢。
我使用最新版本 4.0.81
的 umi 依赖时,没遇到这个问题,当你配置了 base
为 /aaaaaaaaaaaaa
时,访问 /
路径会自动跳转到 /aaaaaaaaaaaaa/
,这是符合预期的。
如有问题,需要给一个可以复现的仓库链接。
aaaaaaaaaaaaa
我知道这个问题是为什么,是因为跳转时不是/xxx/xxx的路由而是用了location.pathname 导致的
怎么解决的
What happens?
前提:我只有一个路由地址,为/booking 配置base为
/aaaaaaaaaaaaa/
之后,访问localhost:4118/aaaaaaaaaaaaa/booking,会跳转到localhost:4118/aaaaaaaaaaaaa/aaaaaaaaaaaaa/booking
浏览器显示警告:
No routes matched location "/aaaaaaaaaaaaa/booking"
Mini Showcase Repository(REQUIRED)
这个是我config.local.ts的配置:
config.ts配置:
相关依赖:
Context