From 7ef0fee49df33ddf8f192191f99163aedbe4ad14 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Wed, 1 Dec 2021 15:26:43 +0300 Subject: [PATCH] Fixed #1836 - For Breadcrumb --- src/components/breadcrumb/Breadcrumb.d.ts | 58 +++++++++++++++++++---- 1 file changed, 49 insertions(+), 9 deletions(-) diff --git a/src/components/breadcrumb/Breadcrumb.d.ts b/src/components/breadcrumb/Breadcrumb.d.ts index a724b2529..7c526cf44 100755 --- a/src/components/breadcrumb/Breadcrumb.d.ts +++ b/src/components/breadcrumb/Breadcrumb.d.ts @@ -1,18 +1,58 @@ -interface BreadcrumbProps { - home?: any; - model?: any[]; +import { VNode } from 'vue'; +import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; +import { MenuItem } from '../menuitem'; + +export interface BreadcrumbProps { + /** + * An array of menuitems. + */ + model?: MenuItem[]; + /** + * Configuration for the home icon. + */ + home?: MenuItem; + /** + * Whether to apply 'router-link-active-exact' class if route exactly matches the item path. + * Default value is true. + */ exact?: boolean; } -interface BreadcrumbItemSlotInterface { - item: any; +export interface BreadcrumbSlots { + /** + * Custom item template. + * @param {Object} scope - item slot's params. + */ + item: (scope: { + /** + * Menuitem instance + */ + item: MenuItem; + }) => VNode[]; } -declare class Breadcrumb { - $props: BreadcrumbProps; - $slots: { - item: BreadcrumbItemSlotInterface +export declare type BreadcrumbEmits = { +} + +declare class Breadcrumb extends ClassComponent { } + +declare module '@vue/runtime-core' { + interface GlobalComponents { + Breadcrumb: GlobalComponentConstructor } } +/** + * + * Breadcrumb provides contextual information about page hierarchy. + * + * Helper API: + * + * - [MenuItem](https://www.primefaces.org/primevue/showcase/#/menumodel) + * + * Demos: + * + * - [Breadcrumb](https://www.primefaces.org/primevue/showcase/#/breadcrumb) + * + */ export default Breadcrumb;