From a830f6b8e1ec53696e01c9d0bf635be3345d46de Mon Sep 17 00:00:00 2001 From: ddcat1115 Date: Thu, 12 Oct 2017 17:00:06 +0800 Subject: [PATCH] update docs --- src/components/DescriptionList/index.md | 10 +++++++++- src/components/PageHeader/demo/standard.md | 14 +++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/components/DescriptionList/index.md b/src/components/DescriptionList/index.md index 7d63e2ad..90e916ac 100644 --- a/src/components/DescriptionList/index.md +++ b/src/components/DescriptionList/index.md @@ -15,10 +15,18 @@ cols: 1 | 参数 | 说明 | 类型 | 默认值 | |----------|------------------------------------------|-------------|-------| | layout | 布局方式 | Enum{'horizontal', 'vertical'} | 'horizontal' | -| col | 指定信息分几列展示 | number(0 < col <= 4) | 3 | +| col | 指定信息最多分几列展示,最终一行几列由 col 配置结合[响应式规则](/components/DescriptionList#响应式规则)决定 | number(0 < col <= 4) | 3 | | title | 列表标题 | ReactNode | - | | gutter | 列表项间距,单位为 `px` | number | 32 | +#### 响应式规则 + +| 窗口宽度 | 展示列数 | +|---------------------|---------------------------------------------| +| `≥768px` | `col` | +| `≥576px` | `col < 2 ? col : 2` | +| `<576px` | `1` | + ### DescriptionList.Description | 参数 | 说明 | 类型 | 默认值 | diff --git a/src/components/PageHeader/demo/standard.md b/src/components/PageHeader/demo/standard.md index 47818219..a10d2bcd 100644 --- a/src/components/PageHeader/demo/standard.md +++ b/src/components/PageHeader/demo/standard.md @@ -7,8 +7,20 @@ title: Standard ````jsx 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'; +const { Description } = DescriptionList; + +const description = ( + + 曲丽丽 + XX 服务 + 2017-07-07 + 12421 + +); + const menu = ( 选项一 @@ -71,7 +83,7 @@ ReactDOM.render( title="单号:234231029431" logo={} action={action} - content="DescriptionList 占位" + content={description} extraContent={extra} breadcrumbList={breadcrumbList} tabList={tabList} -- GitLab