跳到主要内容
版本:v6

ion-breadcrumb

shadow

面包屑(Breadcrumb)是作为面包屑组件子元素的单个导航项。面包屑可以链接到应用中的其他位置,也可以是纯文本。每个面包屑与其下一个面包屑之间有一个分隔符,并且可以选择性地包含图标。

更多信息请参阅面包屑文档。

接口​

interface BreadcrumbCollapsedClickEventDetail {
collapsedBreadcrumbs?: HTMLIonBreadcrumbElement[];
}

虽然不是必需的,但此接口可以替代 CustomEvent 接口以提供更强的类型支持。

interface BreadcrumbCustomEvent extends CustomEvent {
detail: BreadcrumbCollapsedClickEventDetail;
target: HTMLIonBreadcrumbElement;
}

属性​

active​

说明If true, the breadcrumb will take on a different look to show that it is the currently active breadcrumb. Defaults to true for the last breadcrumb if it is not set on any.
属性active
类型boolean
默认值false

color​

说明The color to use from your application's color palette. Default options are: "primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", and "dark". For more information on colors, see theming.
属性color
类型"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string | undefined
默认值undefined

disabled​

说明If true, the user cannot interact with the breadcrumb.
属性disabled
类型boolean
默认值false

download​

说明This attribute instructs browsers to download a URL instead of navigating to it, so the user will be prompted to save it as a local file. If the attribute has a value, it is used as the pre-filled file name in the Save prompt (the user can still change the file name if they want).
属性download
类型string | undefined
默认值undefined

href​

说明Contains a URL or a URL fragment that the hyperlink points to. If this property is set, an anchor tag will be rendered.
属性href
类型string | undefined
默认值undefined

mode​

说明The mode determines which platform styles to use.

这是一个虚拟属性,在初始化时设置一次,之后更改其值不会更新组件。
属性mode
类型"ios" | "md"
默认值undefined

rel​

说明Specifies the relationship of the target object to the link object. The value is a space-separated list of link types.
属性rel
类型string | undefined
默认值undefined

routerAnimation​

说明When using a router, it specifies the transition animation when navigating to another page using href.
属性undefined
类型((baseEl: any, opts?: any) => Animation) | undefined
默认值undefined

routerDirection​

说明When using a router, it specifies the transition direction when navigating to another page using href.
属性router-direction
类型"back" | "forward" | "root"
默认值'forward'

separator​

说明If true, show a separator between this breadcrumb and the next. Defaults to true for all breadcrumbs except the last.
属性separator
类型boolean | undefined
默认值undefined

target​

说明Specifies where to display the linked URL. Only applies when an href is provided. Special keywords: "_blank", "_self", "_parent", "_top".
属性target
类型string | undefined
默认值undefined

事件​

Name说明冒泡
ionBlurEmitted when the breadcrumb loses focus.true
ionFocusEmitted when the breadcrumb has focus.true

方法​

该组件没有可用的公共方法。

CSS 阴影部分​

Name说明
collapsed-indicatorThe indicator element that shows the breadcrumbs are collapsed.
nativeThe native HTML anchor or div element that wraps all child elements.
separatorThe separator element between each breadcrumb.

CSS 自定义属性​

Name说明
--background-focusedBackground color of the breadcrumb when focused
--colorText color of the breadcrumb
--color-activeText color of the active breadcrumb
--color-focusedText color of the breadcrumb when focused
--color-hoverText color of the breadcrumb on hover

插槽​

该组件没有可用的插槽。