Commit a830f6b8 authored by ddcat1115's avatar ddcat1115

update docs

parent 36bad2b6
...@@ -15,10 +15,18 @@ cols: 1 ...@@ -15,10 +15,18 @@ cols: 1
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 |
|----------|------------------------------------------|-------------|-------| |----------|------------------------------------------|-------------|-------|
| layout | 布局方式 | Enum{'horizontal', 'vertical'} | 'horizontal' | | layout | 布局方式 | Enum{'horizontal', 'vertical'} | 'horizontal' |
| col | 指定信息分几列展示 | number(0 < col <= 4) | 3 | | col | 指定信息最多分几列展示,最终一行几列由 col 配置结合[响应式规则](/components/DescriptionList#响应式规则)决定 | number(0 < col <= 4) | 3 |
| title | 列表标题 | ReactNode | - | | title | 列表标题 | ReactNode | - |
| gutter | 列表项间距,单位为 `px` | number | 32 | | gutter | 列表项间距,单位为 `px` | number | 32 |
#### 响应式规则
| 窗口宽度 | 展示列数 |
|---------------------|---------------------------------------------|
| `≥768px` | `col` |
| `≥576px` | `col < 2 ? col : 2` |
| `<576px` | `1` |
### DescriptionList.Description ### DescriptionList.Description
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 |
......
...@@ -7,8 +7,20 @@ title: Standard ...@@ -7,8 +7,20 @@ title: Standard
````jsx ````jsx
import PageHeader from 'ant-design-pro/lib/PageHeader'; import PageHeader from 'ant-design-pro/lib/PageHeader';
import DescriptionList from 'ant-design-pro/lib/DescriptionList';
import { Button, Menu, Dropdown, Icon, Row, Col } from 'antd'; import { Button, Menu, Dropdown, Icon, Row, Col } from 'antd';
const { Description } = DescriptionList;
const description = (
<DescriptionList col="2">
<Description term="创建人">曲丽丽</Description>
<Description term="订购产品">XX 服务</Description>
<Description term="创建时间">2017-07-07</Description>
<Description term="关联单据"><a href="">12421</a></Description>
</DescriptionList>
);
const menu = ( const menu = (
<Menu> <Menu>
<Menu.Item key="1">选项一</Menu.Item> <Menu.Item key="1">选项一</Menu.Item>
...@@ -71,7 +83,7 @@ ReactDOM.render( ...@@ -71,7 +83,7 @@ ReactDOM.render(
title="单号:234231029431" title="单号:234231029431"
logo={<img alt="" src="https://gw.alipayobjects.com/zos/rmsportal/JcBAEvlHGhVvBekIJCWT.svg" />} logo={<img alt="" src="https://gw.alipayobjects.com/zos/rmsportal/JcBAEvlHGhVvBekIJCWT.svg" />}
action={action} action={action}
content="DescriptionList 占位" content={description}
extraContent={extra} extraContent={extra}
breadcrumbList={breadcrumbList} breadcrumbList={breadcrumbList}
tabList={tabList} tabList={tabList}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment