Browse Source

docs: collapse-translation (#2216)

pull/2274/merge
ddcat1115 9 years ago
committed by Benjy Cui
parent
commit
6f526036ed
  1. 10
      components/collapse/demo/accordion.md
  2. 10
      components/collapse/demo/basic.md
  3. 10
      components/collapse/demo/mix.md
  4. 30
      components/collapse/index.en-US.md
  5. 4
      components/collapse/index.zh-CN.md

10
components/collapse/demo/accordion.md

@ -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;

10
components/collapse/demo/basic.md

@ -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;

10
components/collapse/demo/mix.md

@ -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;

30
components/collapse/index.en-US.md

@ -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 | - |

4
components/collapse/index.md → components/collapse/index.zh-CN.md

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