mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 11:08:45 +08:00
docs: add translation for timeline (#2190)
This commit is contained in:
parent
1cec962d74
commit
6a616de767
@ -1,10 +1,18 @@
|
||||
---
|
||||
order: 0
|
||||
title: 基本用法
|
||||
title:
|
||||
zh-CN: 基本用法
|
||||
en-US: Basic
|
||||
---
|
||||
|
||||
## zh-CN
|
||||
|
||||
基本的时间轴。
|
||||
|
||||
## en-US
|
||||
|
||||
Basic timeline.
|
||||
|
||||
````jsx
|
||||
import { Timeline } from 'antd';
|
||||
|
||||
|
@ -1,10 +1,18 @@
|
||||
---
|
||||
order: 1
|
||||
title: 圆圈颜色
|
||||
title:
|
||||
zh-CN: 圆圈颜色
|
||||
en-US: Color
|
||||
---
|
||||
|
||||
## zh-CN
|
||||
|
||||
圆圈颜色,绿色用于已完成、成功状态,红色表示告警或错误状态,蓝色可表示正在进行或其他默认状态。
|
||||
|
||||
## en-US
|
||||
|
||||
Set the color of circles. `green` means completed or success status, `red` means warning or error, and `blue` means ongoing or other default status.
|
||||
|
||||
````jsx
|
||||
import { Timeline } from 'antd';
|
||||
|
||||
|
@ -1,10 +1,18 @@
|
||||
---
|
||||
order: 4
|
||||
title: 自定义时间轴点
|
||||
title:
|
||||
zh-CN: 自定义时间轴点
|
||||
en-US: Custom
|
||||
---
|
||||
|
||||
## zh-CN
|
||||
|
||||
可以设置为图标或其他自定义元素。
|
||||
|
||||
## en-US
|
||||
|
||||
Set a node as an icon or other custom element.
|
||||
|
||||
````jsx
|
||||
import { Timeline, Icon } from 'antd';
|
||||
|
||||
|
@ -1,10 +1,18 @@
|
||||
---
|
||||
order: 2
|
||||
title: 最后一个
|
||||
title:
|
||||
zh-CN: 最后一个
|
||||
en-US: Last node
|
||||
---
|
||||
|
||||
## zh-CN
|
||||
|
||||
在最后位置添加一个幽灵节点,表示时间轴未完成,还在记录过程中。可以指定 `pending={true}` 或者 `pending={一个 React 元素}`。
|
||||
|
||||
## en-US
|
||||
|
||||
When the timeline is incomplete and ongoing, put a ghost node at last. set `pending={true}` or `pending={a React Element}`。
|
||||
|
||||
````jsx
|
||||
import { Timeline } from 'antd';
|
||||
|
||||
|
40
components/timeline/index.en-US.md
Normal file
40
components/timeline/index.en-US.md
Normal file
@ -0,0 +1,40 @@
|
||||
---
|
||||
category: Components
|
||||
type: Views
|
||||
title: Timeline
|
||||
---
|
||||
|
||||
Vertical display timeline.
|
||||
|
||||
## When To Use
|
||||
|
||||
- When a series of information need to be lined from top to bottom by time.
|
||||
- When need a timeline to make a visual connection.
|
||||
|
||||
## API
|
||||
|
||||
```jsx
|
||||
<Timeline>
|
||||
<Timeline.Item>step1 2015-09-01</Timeline.Item>
|
||||
<Timeline.Item>step2 2015-09-01</Timeline.Item>
|
||||
<Timeline.Item>step3 2015-09-01</Timeline.Item>
|
||||
<Timeline.Item>step4 2015-09-01</Timeline.Item>
|
||||
</Timeline>
|
||||
```
|
||||
|
||||
### Timeline
|
||||
|
||||
Timeline
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
|----------|----------------------------------------|------------|-------|
|
||||
| pending | to set the last ghost node's existence or its content | boolean or React.Element | false |
|
||||
|
||||
### Timeline.Item
|
||||
|
||||
Node of timeline
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
|----------|------------------------------------------|------------|-------|
|
||||
| color | to set the circle's color to `blue, red, green` or other custom colors | string | blue |
|
||||
| dot | custom timeline dot | React.Element | - |
|
Loading…
Reference in New Issue
Block a user