docs_vue2/one/docs/en-US/components/breadcrumb-item.md

49 lines
1.2 KiB
Markdown
Raw Normal View History

2020-08-13 11:47:56 +08:00
# BreadcrumbItem
:::tip
`BreadcrumbItem` is required to be used within [`Breadcrumb`](./breadcrumb).
:::
## Demos
2021-08-23 19:37:43 +08:00
See [the demos of `Breadcrumb`](./breadcrumb#demos).
2020-08-13 11:47:56 +08:00
## API
### Props
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| ``to`` | `string | Object` | - | The target location. See [`Link`](./link)'s the [`to`](./link#props-to) prop. |
| ``type`` | `string` | `'link'` | [^link] |
| ``native`` | `boolean` | `false` | When set to `true` and `to` is specified, native `<a>` element will be used and `to` will be set as the `href` attribute to this `<a>` element. |
2020-08-13 11:47:56 +08:00
^^^link
The type of the item.
+++Enum values
| Value | Description |
| -- | -- |
| `link` | Hyperlink. |
| `text` | Pure text. |
+++
^^^
### Slots
| Name | Description |
| -- | -- |
| ``default`` | The content of the breadcrumb item. |
2020-08-13 11:47:56 +08:00
### Events
| Name | Description |
| -- | -- |
| ``redirect`` | Triggered when clicking the item with `type` value `link`. The callback parameter list is `(event: Event)`. `event` is a [native click event object](https://developer.mozilla.org/en-US/docs/Web/Events/click). |
2020-08-13 11:47:56 +08:00
### Icons
| Name | Description |
| -- | -- |
| ``separator`` | The separator between adjacent breadcrumb items. |