Comments (5)
这是新功能,二级菜单不会显示Icon.若是需要实现,可以自己修改layout那个菜单渲染的函数.
from ant-design-pro-layout.
是否可以提供一下修改函数的样例
from ant-design-pro-layout.
是否可以提供一下修改函数的样例
这个可能你需要求助于 @chenshuai2144 看看有没有什么例子.目前我也没写过.我都是用的默认没有icon的.
from ant-design-pro-layout.
不要展示icon是最好的
from ant-design-pro-layout.
// 自定义菜单渲染
menuItemRender: (menuItemProps: any, defaultDom: any) => {
if (menuItemProps.isUrl || !menuItemProps.path) {
return defaultDom;
}
return (
<Link to={menuItemProps.path}>
{menuItemProps.icon} {menuItemProps.name}
</Link>
);
}
icon 自己处理下,字符创转化成@ant-design/icons组件
from ant-design-pro-layout.
Related Issues (20)
- 👑 [需求]希望能在菜单栏上增加一个分类的功能 HOT 2
- 🐛[BUG]6.2.4在mix模式下,第一次进入未选中默认选中的项 HOT 3
- 🐛[BUG]文档 pro-layout 的layout 值应该为 topmenu 和 sidemenu
- 🧐[问题] Upgrade from 5.0.19 to 6.2.4 breaks side-bar menu (从5.0.19升级到6.2.4会中断侧边栏菜单) HOT 2
- 🐛[BUG] V6.2.5 页面首次加载完,首次点击菜单会再次加载菜单,会闪烁一下 HOT 3
- 750分辨率下出现2个logo?🧐[问题]
- 👑 [需求]
- 🐛[BUG]ProLayout 6.2.5 SiderMenu的openKeys selectedKeys无法及时更新 HOT 5
- 🧐[问题] 点击面包屑,为什么会是整个页面刷新跳转,而不是局部刷新?
- 左侧菜单选中的bug🐛[BUG] HOT 2
- V6.2.5 typescript报错 HOT 4
- 🧐[问题]我不想让PageHeaderWrapper显示出来该怎么做? HOT 1
- 🐛[BUG] menuDataRender采用后台获取左侧菜单,第一次进入以及刷新页面,选中菜单未高亮 HOT 1
- 🧐[问题]菜单是否可以加参数? HOT 3
- 🐛[BUG] layout 属性设置为 top或mix没变化
- 🧐[问题] PageHeaderWrapper如何去掉 title,只保留面包屑 HOT 1
- 此仓库已废弃,访问 https://procomponent.ant.design/layout 了解更多 HOT 4
- 🐛[BUG] 好像还是可以新增? HOT 1
- 🧐 defaultOpenAll 选项在切换页面之后失效了 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ant-design-pro-layout.