Breadcrumb 用于展示当前页面在层级结构中的位置,支持箭头、斜线分隔符和可点击上级页面。
提供箭头与斜线两种分隔方式;末级为当前页面,不参与点击。
单个面包屑项可配置左侧或右侧 16px 图标,图标与文本间距为 4px。
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---|---|---|---|---|
| items | 面包屑项目数组 | array | { label, href, current, disabled, iconBefore, iconAfter } | 内置 5 项 |
| separator | 分隔符样式 | string | 'arrow' | 'slash' | 'arrow' |
| label | 单项文本 | string | - | '上级页面' |
| href | 单项链接地址,有值时渲染为 a 标签 | string | - | '' |
| current | 是否为当前页面 | boolean | true | false | false |
| disabled | 是否禁用 | boolean | true | false | false |
| iconBefore | 文本前图标 class 或 HTML | string | - | '' |
| iconAfter | 文本后图标 class 或 HTML | string | - | '' |
| onNavigate | 点击上级项回调 | function | - | null |
| className | 自定义类名 | string | - | '' |
| id | 自定义 id | string | - | '' |