docs: collapse-translation (#2216)

This commit is contained in:
ddcat1115 2016-07-04 10:51:50 +08:00 committed by Benjy Cui
parent cdcc10f93d
commit 6f526036ed
5 changed files with 59 additions and 5 deletions

View File

@ -1,10 +1,18 @@
---
order: 1
title: 手风琴
title:
zh-CN: 手风琴
en-US: Accordion
---
## zh-CN
手风琴每次只打开一个tab。默认打开第一个。
## en-US
Accordion mode, only one panel can be expanded at a time. The first panel will be expanded by default.
````jsx
import { Collapse } from 'antd';
const Panel = Collapse.Panel;

View File

@ -1,10 +1,18 @@
---
order: 0
title: 折叠面板
title:
zh-CN: 折叠面板
en-US: Collapse
---
## zh-CN
可以同时展开多个面板,这个例子默认展开了第一个。
## en-US
More than one panel can be expanded at a time, the first panel is initialized to be active in this case.
````jsx
import { Collapse } from 'antd';
const Panel = Collapse.Panel;

View File

@ -1,10 +1,18 @@
---
order: 2
title: 面板嵌套
title:
zh-CN: 面板嵌套
en-US: Nested panel
---
## zh-CN
手风琴嵌套折叠面板。
## en-US
`Collapse` is nested inside the `Accordion`.
````jsx
import { Collapse } from 'antd';
const Panel = Collapse.Panel;

View File

@ -0,0 +1,30 @@
---
category: Components
type: Views
title: Collapse
---
A content area which can be collapsed and expanded.
## When to use
- Can be used to group or hide complex regions to keep the page clean.
- `Accordion` is a special kind of `Collapse`, which allows only one panel to be expanded at a time.
## API
### Collapse
| Property | Description | Type | Default |
|----------|----------------|----------|--------------|
| activeKey | key of the active panel | Array or String | No default value. In `accordion` mode, it's the key of the first panel. |
| defaultActiveKey | key of the initialized active panel | String | - |
| onChange | a callback function, which can be executed when you switch the panels | Function | - |
### Collapse.Panel
| Property | Description | Type | Default |
|----------|----------------|----------|--------------|
| key | corresponds to the `activeKey` | String | - |
| header | title of the panel | React.Element or String | - |

View File

@ -1,8 +1,8 @@
---
category: Components
chinese: 折叠面板
type: Views
english: Collapse
title: Collapse
subtitle: 折叠面板
---
可以折叠/展开的内容区域。