vexip-ui
Version:
A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good
33 lines (32 loc) • 1 kB
TypeScript
import { InjectionKey } from 'vue';
export interface BreadcrumbOptions {
label: string;
name?: string | (() => string);
}
export type SeparatorRenderFn = (data: {
label: string | number;
}) => any;
export interface BreadcrumbItemState {
label: string | number;
}
export interface BreadcrumbState {
separator: string;
separatorRenderer: null | SeparatorRenderFn;
increaseItem: (item: BreadcrumbItemState) => void;
decreaseItem: (item: BreadcrumbItemState) => void;
handleSelect: (label: string | number) => void;
refreshLabels: () => void;
handleSeparatorClick: (label: string | number) => void;
}
export type SelectEvent = (label: string | number) => void;
export interface BreadcrumbSlots {
default?: () => any;
item?: (params: {
option: BreadcrumbOptions;
index: number;
}) => any;
separator?: (params: {
label: string | number;
}) => any;
}
export declare const BREADCRUMB_STATE: InjectionKey<BreadcrumbState>;