structure.md 1.45 KB
Newer Older
1 2 3 4 5
---
order: 0
title: Structure
---

ddcat1115's avatar
ddcat1115 committed
6
基本结构,具备响应式布局功能,主要断点为 768px 和 576px,拖动窗口改变大小试试看。
7 8

````jsx
nikogu's avatar
nikogu committed
9
import PageHeader from 'ant-design-pro/lib/PageHeader';
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

const breadcrumbList = [{
  title: '面包屑',
}];

const tabList = [{
  key: '1',
  tab: '页签一',
}, {
  key: '2',
  tab: '页签二',
}, {
  key: '3',
  tab: '页签三',
}];

ReactDOM.render(
  <div>
    <PageHeader
      className="tabs"
      title={<div className="title">Title</div>}
      logo={<div className="logo">logo</div>}
      action={<div className="action">action</div>}
      content={<div className="content">content</div>}
      extraContent={<div className="extraContent">extraContent</div>}
      breadcrumbList={breadcrumbList}
      tabList={tabList}
    />
  </div>
, mountNode);
````

<style>
#scaffold-src-components-PageHeader-demo-structure .code-box-demo {
ddcat1115's avatar
ddcat1115 committed
44
  background: #f2f4f5;
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
}
#scaffold-src-components-PageHeader-demo-structure .logo {
  background: #3ba0e9;
  color: #fff;
  height: 100%;
}
#scaffold-src-components-PageHeader-demo-structure .title {
  background: rgba(16, 142, 233, 1);
  color: #fff;
}
#scaffold-src-components-PageHeader-demo-structure .action {
  background: #7dbcea;
  color: #fff;
}
#scaffold-src-components-PageHeader-demo-structure .content {
  background: #7dbcea;
  color: #fff;
}
#scaffold-src-components-PageHeader-demo-structure .extraContent {
  background: #7dbcea;
  color: #fff;
}
</style>