mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-18 19:39:51 +08:00
43 lines
650 B
Markdown
43 lines
650 B
Markdown
|
---
|
||
|
order: 2
|
||
|
title:
|
||
|
zh-CN: 带面包屑页头
|
||
|
en-US: Use with breadcrumbs
|
||
|
---
|
||
|
|
||
|
## zh-CN
|
||
|
|
||
|
带面包屑页头,适合层级比较深的页面,让用户可以快速导航。
|
||
|
|
||
|
## en-US
|
||
|
|
||
|
With breadcrumbs, it is suitable for deeper pages, allowing users to navigate quickly.
|
||
|
|
||
|
```jsx
|
||
|
import { PageHeader } from 'antd';
|
||
|
|
||
|
const routes = [
|
||
|
{
|
||
|
path: 'index',
|
||
|
breadcrumbName: 'First-level Menu',
|
||
|
},
|
||
|
{
|
||
|
path: 'first',
|
||
|
breadcrumbName: 'Second-level Menu',
|
||
|
},
|
||
|
{
|
||
|
path: 'second',
|
||
|
breadcrumbName: 'Third-level Menu',
|
||
|
},
|
||
|
];
|
||
|
|
||
|
ReactDOM.render(
|
||
|
<PageHeader
|
||
|
title="Title"
|
||
|
breadcrumb={{ routes }}
|
||
|
/>,
|
||
|
mountNode
|
||
|
);
|
||
|
|
||
|
```
|