ant-design-vue
ant-design-vue copied to clipboard
[Feature Request] Support icon in breadcrumb item overlay
- [x] I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
https://github.com/vueComponent/ant-design-vue/blob/3003d67c4f537c39c58b135e6103e0572f5f3b6f/components/breadcrumb/Breadcrumb.tsx#L92-L109
When using itemRender
to put an icon into the breadcrumb-item, it would also be put inside menu-item of the overlay. As the #icon
slot of menu-item is not available in #itemRender
scope, the icon style is not correct.
What does the proposed API look like?
I'm not sure how to design the API, but I think we could at least provide a isOverlay
arg for itemRender
slotProps, so that users could avoid rendering the icon in overlay.
{itemRender({
route: child,
params,
routes,
paths: addChildPath(tempPaths, child.path, params),
isOverlay: true, // <---- here
})}
--- update
I realized that the isOverlay
could be determined by slotProps.routes.includes(slotProps.route)
, so it might not be necessary.
you can also use slotProps.route.children && slotProps.route.children.length
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.