---
title: "@ant-design/pro-layout icon 点击事件"
date: 2019-11-16T11:24:36.000Z
author: Z.SHINCHVEN
tags: [Ant Design Pro, @ant-design/pro-layout]
canonical: https://atlassc.net/2019/11/17/ant-design-prolayout-icon-click
---
在`Ant Design Pro`工程中修改`src/layouts/BasicLayout.jsx`中的`logo`和`menuHeaderRender`两个props即可实现icon的点击事件

```jsx
// src/layouts/BasicLayout.jsx
const BasicLayout = props => {
  return (
    <ProLayout
      logo={<Link to="/"><img src={logo} alt="logo"/></Link>}
      menuHeaderRender={(logoDom, titleDom) => (
        <Link to="/">
          {logoDom}
          {titleDom}
        </Link>
      )}
    >
    </ProLayout>
  );
};
```
