umi [Bug] 设置 base 后,history.location.pathname 会携带 base ?

gywdnpxw  于 2022-10-22  发布在  其他
关注(0)|答案(1)|浏览(331)

https://github.com/umijs/umi/blob/master/examples/ant-design-pro/src/app.tsx#L38

设置 config.ts

base: '/demo/'

代码中获取 history.location.pathname 会携带 base

history.location.pathname => '/demo/user/login'

相关问题