import type { RendererProps, ThemeProps } from 'jamis-core'; import type { BaseSchema, SchemaIcon, SchemaUrlPath } from '../types'; export type ItemPlace = 'start' | 'middle' | 'end'; export type TooltipPositionType = 'top' | 'bottom' | 'left' | 'right'; export interface BreadcrumbBaseItem { href?: string; icon?: string; label?: string; dropdown?: Array; } export interface BreadcrumbItemProps { item: BreadcrumbBaseItem; itemPlace: ItemPlace; labelMaxLength?: number; tooltipContainer?: any; tooltipPosition?: TooltipPositionType; [propName: string]: any; } export interface BreadcrumbCompProps extends ThemeProps { tooltipContainer?: any; tooltipPosition?: TooltipPositionType; items: Array; [propName: string]: any; } export interface BreadcrumbItemDropDown extends Omit { /** * 文字 */ label?: string; /** * 图标类名 */ icon?: SchemaIcon; /** * 链接地址 */ href?: SchemaUrlPath; } export interface BreadcrumbItemSchema extends Omit { /** * 文字 */ label?: string; /** * 图标类名 */ icon?: SchemaIcon; /** * 链接地址 */ href?: SchemaUrlPath; /** * 下拉菜单 */ dropdown?: Array; } /** * Breadcrumb 显示组件 * */ export interface BreadcrumbSchema extends BaseSchema { /** * 指定为面包屑显示控件 */ type: 'breadcrumb'; /** * 面包项类名 */ itemClassName?: string; /** * 分隔符 */ separator?: string; /** * 分隔符类名 */ separatorClassName?: string; /** * 下拉菜单类名 */ dropdownClassName?: string; /** * 下拉菜单项类名 */ dropdownItemClassName?: string; /** * 列表 */ items?: Array; /** * labelMaxLength */ labelMaxLength?: number; /** * 浮窗提示位置 */ tooltipPosition?: TooltipPositionType; /** * 可用来通过 API 拉取 options。 */ source?: string; } export interface BreadcrumbProps extends RendererProps, Omit { }