ant-design / ant-design/pro-components
🧐[问题]menuHeaderRender自定义时PC端会出现两个Logo
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
### 🧐 问题描述
因为想在移动端sider展示logo,所以自定义了menuHeaderRender。但PC出现了两个Logo,而且是同一个组件。有什么办法可以只留一个吗?
### 💻 示例代码
```
"@ant-design/pro-components": "^2.6.48",
"antd": "^5.13.2",
```
```
{
fixSiderbar: true,
layout: 'mix',
splitMenus: true,
menuHeaderRender: (logo, title, props) => {
return (
{logo}
{title}
)
},
}
```
### 🚑 其他信息
PC:
移动端:
Contributor guide
Research direction
Start by reproducing the reported configuration with layout set to mix, splitMenus enabled, and a custom menuHeaderRender using the supplied package versions. Check the menuHeaderRender behavior on PC and mobile; done means the PC view shows one logo while the mobile sider still shows the logo.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100