We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在app.tsx中,进行layout的配置:
export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) => { .... menuItemRender: (menuItemProps, defaultDom, props) => { if (menuItemProps.isUrl || !menuItemProps.path || (!menuItemProps.children && menuItemProps.parentId === 'max-tabs')) { return defaultDom; } return <Link to={menuItemProps.path}> <Space> <span>{menuItemProps.icon}</span> <span className={'ml-1'}>{menuItemProps.name}</span> </Space> </Link> }, ... }
这里通过自定义菜单项的渲染方法:menuItemRender,主要是实现对于子菜单,也支持图标,因为正常情况下,子菜单的图标就算配置了,也是不显示的,如果直接返回defaultDom,就不会出现残影,比如: menuItemRender: (menuItemProps, defaultDom, props) => { return defaultDom; }
The text was updated successfully, but these errors were encountered:
图片是使用录屏时的截图
Sorry, something went wrong.
补充一个,如果使用自己控制菜单的展开、折叠,那么动画会卡的批爆
No branches or pull requests
在app.tsx中,进行layout的配置:
这里通过自定义菜单项的渲染方法:menuItemRender,主要是实现对于子菜单,也支持图标,因为正常情况下,子菜单的图标就算配置了,也是不显示的,如果直接返回defaultDom,就不会出现残影,比如:
menuItemRender: (menuItemProps, defaultDom, props) => {
return defaultDom;
}
© 版本信息
🚑 其他信息
The text was updated successfully, but these errors were encountered: