Skip to content

Commit

Permalink
feat(breadcrumb-item): add slots type (tusen-ai#6599)
Browse files Browse the repository at this point in the history
  • Loading branch information
nailiable committed Dec 7, 2024
1 parent f4901d6 commit aa30016
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/breadcrumb/src/BreadcrumbItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import {
type ExtractPropTypes,
h,
inject,
type PropType
type PropType,
type SlotsType
} from 'vue'
import { resolveSlot, warn } from '../../_utils'
import { useBrowserLocation } from '../../_utils/composable/use-browser-location'
Expand All @@ -24,9 +25,15 @@ export type BreadcrumbItemProps = Partial<
ExtractPropTypes<typeof breadcrumbItemProps>
>

export interface BreadcrumbItemSlots {
default?: any
separator?: any
}

export default defineComponent({
name: 'BreadcrumbItem',
props: breadcrumbItemProps,
slots: Object as SlotsType<BreadcrumbItemSlots>,
setup(props, { slots }) {
const NBreadcrumb = inject(breadcrumbInjectionKey, null)
if (!NBreadcrumb) {
Expand Down

0 comments on commit aa30016

Please sign in to comment.