umi 项目使用 Ant Design Pro ProLayout 组件在添加 base 或开启 hash 时菜单不能正常选中。
解决方法:
传入 location 即可:
const IndexPage: React.FC<BasicLayoutProps> = (props) => {
const { location, children } = props;
...
return (
<ProLayout
location={location}
...
>
{children}
</ProLayout>
);
};
export default IndexPage;
未经允许不得转载:w3h5 » umi项目antd pro ProLayout添加base或开启hash时菜单不能正常选中的解决方法
原创文章,作者:3628473679,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/228532.html