diff --git a/components/breadcrumb/BreadcrumbSeparator.tsx b/components/breadcrumb/BreadcrumbSeparator.tsx index 74a7e8cdd..80f99f8ce 100644 --- a/components/breadcrumb/BreadcrumbSeparator.tsx +++ b/components/breadcrumb/BreadcrumbSeparator.tsx @@ -6,6 +6,7 @@ import { getSlot } from '../_util/props-util'; export default defineComponent({ name: 'ABreadcrumbSeparator', __ANT_BREADCRUMB_SEPARATOR: true, + inheritAttrs: false, props: { prefixCls: PropTypes.string, }, @@ -16,10 +17,15 @@ export default defineComponent({ }, render() { const { prefixCls: customizePrefixCls } = this; + const { separator, class: className, ...restAttrs } = this.$attrs; const getPrefixCls = this.configProvider.getPrefixCls; const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls); const children = getSlot(this); - return {children || '/'}; + return ( + + {children.length > 0 ? children : '/'} + + ); }, });