mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-26 04:00:13 +08:00
338018eba3
* pure page header style * add type props * add prue demo * add config provider doc * fix lint * fix lint error * change pure to ghost * fix test * default ghost is true * fix review style * fix review warning * use online style * remove defualt and remove comment * add test
46 lines
750 B
Markdown
46 lines
750 B
Markdown
---
|
|
order: 3
|
|
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
|
|
style={{
|
|
border: '1px solid rgb(235, 237, 240)',
|
|
}}
|
|
title="Title"
|
|
breadcrumb={{ routes }}
|
|
subTitle="This is a subtitle"
|
|
/>,
|
|
mountNode,
|
|
);
|
|
```
|