From 7f704c4fbdb9f594984c308b97529d5653a189eb Mon Sep 17 00:00:00 2001 From: ddcat1115 Date: Tue, 10 Apr 2018 18:13:11 +0800 Subject: [PATCH] translation of DescriptionList --- src/components/DescriptionList/demo/basic.md | 10 +++++- .../DescriptionList/demo/vertical.md | 10 +++++- src/components/DescriptionList/index.en-US.md | 33 +++++++++++++++++++ .../{index.md => index.zh-CN.md} | 6 ++-- 4 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 src/components/DescriptionList/index.en-US.md rename src/components/DescriptionList/{index.md => index.zh-CN.md} (90%) diff --git a/src/components/DescriptionList/demo/basic.md b/src/components/DescriptionList/demo/basic.md index 8dd85347..87954551 100644 --- a/src/components/DescriptionList/demo/basic.md +++ b/src/components/DescriptionList/demo/basic.md @@ -1,10 +1,18 @@ --- order: 0 -title: Basic +title: + zh-CN: 基本 + en-US: Basic --- +## zh-CN + 基本描述列表。 +## en-US + +Basic DescriptionList. + ````jsx import DescriptionList from 'ant-design-pro/lib/DescriptionList'; diff --git a/src/components/DescriptionList/demo/vertical.md b/src/components/DescriptionList/demo/vertical.md index a304f946..2742f7c9 100644 --- a/src/components/DescriptionList/demo/vertical.md +++ b/src/components/DescriptionList/demo/vertical.md @@ -1,10 +1,18 @@ --- order: 1 -title: Vertical +title: + zh-CN: 垂直型 + en-US: Vertical --- +## zh-CN + 垂直布局。 +## en-US + +Vertical layout. + ````jsx import DescriptionList from 'ant-design-pro/lib/DescriptionList'; diff --git a/src/components/DescriptionList/index.en-US.md b/src/components/DescriptionList/index.en-US.md new file mode 100644 index 00000000..089f30b1 --- /dev/null +++ b/src/components/DescriptionList/index.en-US.md @@ -0,0 +1,33 @@ +--- +title: DescriptionList +cols: 1 +order: 4 +--- + +Groups display multiple read-only fields, which are common to informational displays on detail pages. + +## API + +### DescriptionList + +| Property | Description | Type | Default | +|----------|------------------------------------------|-------------|---------| +| layout | type of layout | Enum{'horizontal', 'vertical'} | 'horizontal' | +| col | specify the maximum number of columns to display, the final columns number is determined by col setting combined with [Responsive Rules](/components/DescriptionList#Responsive-Rules) | number(0 < col <= 4) | 3 | +| title | title | ReactNode | - | +| gutter | specify the distance between two items, unit is `px` | number | 32 | +| size | size of list | Enum{'large', 'small'} | - | + +#### Responsive Rules + +| Window Width | Columns Number | +|---------------------|---------------------------------------------| +| `≥768px` | `col` | +| `≥576px` | `col < 2 ? col : 2` | +| `<576px` | `1` | + +### DescriptionList.Description + +| Property | Description | Type | Default | +|----------|------------------------------------------|-------------|-------| +| term | item title | ReactNode | - | diff --git a/src/components/DescriptionList/index.md b/src/components/DescriptionList/index.zh-CN.md similarity index 90% rename from src/components/DescriptionList/index.md rename to src/components/DescriptionList/index.zh-CN.md index bfa60cb8..b16a7fe7 100644 --- a/src/components/DescriptionList/index.md +++ b/src/components/DescriptionList/index.zh-CN.md @@ -1,7 +1,5 @@ --- -title: - en-US: DescriptionList - zh-CN: DescriptionList +title: DescriptionList subtitle: 描述列表 cols: 1 order: 4 @@ -19,7 +17,7 @@ order: 4 | col | 指定信息最多分几列展示,最终一行几列由 col 配置结合[响应式规则](/components/DescriptionList#响应式规则)决定 | number(0 < col <= 4) | 3 | | title | 列表标题 | ReactNode | - | | gutter | 列表项间距,单位为 `px` | number | 32 | -| size | 列表型号,可以设置为 `large` `small` | Enum{'large', 'small'} | - | +| size | 列表型号 | Enum{'large', 'small'} | - | #### 响应式规则 -- GitLab