Ant Design Pro工程中修改src/layouts/BasicLayout.jsx中的logomenuHeaderRender两个props即可实现icon的点击事件

src/layouts/BasicLayout.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const BasicLayout = props => {
return (
<ProLayout
logo={<Link to="/"><img src={logo} alt="logo"/></Link>}
menuHeaderRender={(logoDom, titleDom) => (
<Link to="/">
{logoDom}
{titleDom}
</Link>
)}
>
</ProLayout>
);
};