import { defineComponent } from 'vue' ; import { getPrefixCls } from '../_utils/global-config' ; import { getChildrenComponents , getComponentNumber } from '../_utils/vue-utils' ; /**
 * TODO: 下拉菜单功能
 */ export default defineComponent ( { name : 'Breadcrumb' , props : { zh en maxCount : { type : Number , default : 0 } } , zh en slot setup ( props , { slots } ) { const prefixCls = getPrefixCls ( 'breadcrumb' ) ; return ( ) => { const children = slots . default ?. ( ) ?? [ ] ; const total = getComponentNumber ( children , 'BreadcrumbItem' ) ; const mergedChildren = getChildrenComponents ( children , 'BreadcrumbItem' , ( vn , index ) => ( { index , total , maxCount : props . maxCount , separator : slots . separator } ) ) ; return < div class = { prefixCls } > { mergedChildren } < /div>; } ; } } ) ;