Closed Mankvis closed 4 months ago
{ "private": true, "author": "", "scripts": { "dev": "umi dev", "build": "umi build", "postinstall": "umi setup", "setup": "umi setup", "start": "npm run dev" }, "dependencies": { "@ant-design/pro-components": "^2.7.10", "@emotion/css": "^11.11.2", "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", "antd": "^5.18.1", "umi": "^4.2.10" }, "devDependencies": { "@types/react": "^18.0.33", "@types/react-dom": "^18.0.11", "@umijs/plugins": "^4.2.11", "typescript": "^5.0.3" } }
@chenshuai2144
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
🐛 bug 描述
在使用 umi 和 pro-components 布局的时候,在设置 menuHeaderRender 出现问题,如果返回 a 标签则会出现警告 validateDOMNesting(...): cannot appear as a descendant of . 如果不加 a 标签样式又出问题
📷 复现步骤
menuHeaderRender={(logo, title) => ( <> <a> {logo} {title} </a> </> )}
🏞 期望结果
💻 复现代码
© 版本信息
🚑 其他信息