Skip to content

Breadcrumb

Breadcrumb component enhanced based on Element Plus Breadcrumb.

Displays the location of the current page, making it easier to browser back.

Basic usage

:::dem bk-breadcrumb 组件支持两种使用方式:

  1. 手动方式:通过 <bk-breadcrumb-item> 标签手动定义每个面包屑项,适用于简单的、静态的面包屑导航。
  2. 数据驱动方式:通过 datacurrentRoute 属性自动根据路由生成面包屑路径,适用于动态的、基于树形结构的数据。

两种方式都支持 separator 属性来设置分隔符,默认值为 '/'。

breadcrumb/basic

:::

Icon separator

:::dem Set separator-icon to use svg icon as the separator,it will cover separator

breadcrumb/icon

:::

NameDescriptionTypeDefault
configBreadcrumb configuration objectobject
dataBreadcrumb data arrayarray
currentRouteCurrent route pathstring
Element Plus Breadcrumb Attributes
NameDescriptionTypeDefault
separatorseparator characterstring/
separator-iconicon component of icon separatorstring / Component
Element Plus Breadcrumb Slots
NameDescriptionSubtags
defaultcustomize default contentBreadcrumb Item
NameDescriptionTypeDefault
idUnique identifier for the itemnumber / string
iconIcon to displaystring
menu_nameDisplay name for the menu itemstring
linkURL or route pathstring
childrenChild items arrayarray
Element Plus BreadcrumbItem Attributes
NameDescriptionTypeDefault
totarget route of the link, same as to of vue-routerstring / object''
replaceif true, the navigation will not leave a history recordbooleanfalse
Element Plus BreadcrumbItem Slots
NameDescription
defaultcustomize default content

Released under the MIT License.