The Rock
9 years ago
committed by
Benjy Cui
6 changed files with 87 additions and 23 deletions
@ -1,19 +1,27 @@ |
|||
--- |
|||
order: 0 |
|||
title: 基本 |
|||
title: |
|||
zh-CN: 基本 |
|||
en-US: Basic Usage |
|||
--- |
|||
|
|||
## zh-CN |
|||
|
|||
最简单的用法。 |
|||
|
|||
## en-US |
|||
|
|||
The simplest use |
|||
|
|||
````jsx |
|||
import { Breadcrumb } from 'antd'; |
|||
|
|||
ReactDOM.render( |
|||
<Breadcrumb> |
|||
<Breadcrumb.Item>首页</Breadcrumb.Item> |
|||
<Breadcrumb.Item><a href="">应用中心</a></Breadcrumb.Item> |
|||
<Breadcrumb.Item><a href="">应用列表</a></Breadcrumb.Item> |
|||
<Breadcrumb.Item>某应用</Breadcrumb.Item> |
|||
<Breadcrumb.Item>Home</Breadcrumb.Item> |
|||
<Breadcrumb.Item><a href="">Application Center</a></Breadcrumb.Item> |
|||
<Breadcrumb.Item><a href="">Application List</a></Breadcrumb.Item> |
|||
<Breadcrumb.Item>An Application</Breadcrumb.Item> |
|||
</Breadcrumb> |
|||
, mountNode); |
|||
```` |
|||
|
@ -1,19 +1,27 @@ |
|||
--- |
|||
order: 3 |
|||
title: 分隔符 |
|||
title: |
|||
zh-CN: 分隔符 |
|||
en-US: Configuring the Separator |
|||
--- |
|||
|
|||
## zh-CN |
|||
|
|||
使用 `separator=">"` 可以自定义分隔符。 |
|||
|
|||
## en-US |
|||
|
|||
The separator can be customized by setting the separator property: separator=">" |
|||
|
|||
````jsx |
|||
import { Breadcrumb } from 'antd'; |
|||
|
|||
ReactDOM.render( |
|||
<Breadcrumb separator=">"> |
|||
<Breadcrumb.Item>首页</Breadcrumb.Item> |
|||
<Breadcrumb.Item href="">应用中心</Breadcrumb.Item> |
|||
<Breadcrumb.Item href="">应用列表</Breadcrumb.Item> |
|||
<Breadcrumb.Item>某应用</Breadcrumb.Item> |
|||
<Breadcrumb.Item>Home</Breadcrumb.Item> |
|||
<Breadcrumb.Item href="">Application Center</Breadcrumb.Item> |
|||
<Breadcrumb.Item href="">Application List</Breadcrumb.Item> |
|||
<Breadcrumb.Item>An Application</Breadcrumb.Item> |
|||
</Breadcrumb> |
|||
, mountNode); |
|||
```` |
|||
|
@ -0,0 +1,32 @@ |
|||
--- |
|||
category: Components |
|||
type: Navigation |
|||
title: Breadcrumb |
|||
--- |
|||
|
|||
A breadcrumb displays the current location within a hierarchy. It allows going back to states higher up within the hierarchy. |
|||
|
|||
## When to use |
|||
|
|||
- When the system has more than two layers in a hierarchy. |
|||
- When you need to inform the user of where they are. |
|||
- When the user may need to navigate back to a higher level When the application has multi-layer architecture. |
|||
|
|||
## API |
|||
|
|||
```html |
|||
<Breadcrumb> |
|||
<Breadcrumb.Item>Home</Breadcrumb.Item> |
|||
<Breadcrumb.Item>Application Center</Breadcrumb.Item> |
|||
<Breadcrumb.Item>Application List</Breadcrumb.Item> |
|||
<Breadcrumb.Item>An Application</Breadcrumb.Item> |
|||
</Breadcrumb> |
|||
``` |
|||
|
|||
| Property | Description | Type | Optional | Default | |
|||
|-----------|-----------------------------------|-----------------|---------|--------| |
|||
| routes | The routing stack information of router | Array | | - | |
|||
| params | Routing parameter | Object | | - | |
|||
| separator | Custom separator | String or Element | | '/' | |
|||
| linkRender | Custom link function,and react-router configuration | Function(href, name) | | - | |
|||
| nameRender | Custom link function,and react-router configuration | Function(name) | | - | |
Loading…
Reference in new issue