mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
docs: steps translation (#2430)
This commit is contained in:
parent
b0bf2a5c0e
commit
2b20ac0456
@ -1,10 +1,18 @@
|
||||
---
|
||||
order: 6
|
||||
title: 步骤运行错误
|
||||
title:
|
||||
zh-CN: 步骤运行错误
|
||||
en-US: Error status
|
||||
---
|
||||
|
||||
## zh-CN
|
||||
|
||||
使用 Steps 的 `status` 属性来指定当前步骤的状态。
|
||||
|
||||
## en-US
|
||||
|
||||
By using `status` of `Steps`, you can specify the state for current step.
|
||||
|
||||
````jsx
|
||||
import { Steps } from 'antd';
|
||||
const Step = Steps.Step;
|
||||
|
@ -1,10 +1,18 @@
|
||||
---
|
||||
order: 2
|
||||
title: 带图标的步骤条
|
||||
title:
|
||||
zh-CN: 带图标的步骤条
|
||||
en-US: With icon
|
||||
---
|
||||
|
||||
## zh-CN
|
||||
|
||||
通过设置 `Steps.Step` 的 `icon` 属性,可以启用自定义图标。
|
||||
|
||||
## en-US
|
||||
|
||||
You can use your own custom icons by setting the property `icon` for `Steps.Step`.
|
||||
|
||||
````jsx
|
||||
import { Steps } from 'antd';
|
||||
const Step = Steps.Step;
|
||||
|
@ -1,10 +1,18 @@
|
||||
---
|
||||
order: 0
|
||||
title: 基本用法
|
||||
title:
|
||||
zh-CN: 基本用法
|
||||
en-US: Basic
|
||||
---
|
||||
|
||||
## zh-CN
|
||||
|
||||
简单的步骤条。
|
||||
|
||||
## en-US
|
||||
|
||||
The most basic step bar.
|
||||
|
||||
````jsx
|
||||
import { Steps } from 'antd';
|
||||
const Step = Steps.Step;
|
||||
|
@ -1,10 +1,18 @@
|
||||
---
|
||||
order: 1
|
||||
title: 迷你版
|
||||
title:
|
||||
zh-CN: 迷你版
|
||||
en-US: Mini version
|
||||
---
|
||||
|
||||
## zh-CN
|
||||
|
||||
迷你版的步骤条,通过设置 `<Steps size="small">` 启用.
|
||||
|
||||
## en-US
|
||||
|
||||
By setting like this: `<Steps size="small">`, you can get a mini version.
|
||||
|
||||
````jsx
|
||||
import { Steps } from 'antd';
|
||||
const Step = Steps.Step;
|
||||
|
@ -1,10 +1,18 @@
|
||||
---
|
||||
order: 3
|
||||
title: 切换到下一步
|
||||
title:
|
||||
zh-CN: 切换到下一步
|
||||
en-US: Switch to next
|
||||
---
|
||||
|
||||
## zh-CN
|
||||
|
||||
随机生成 3~6 个步骤,初始随机进行到其中一个步骤。
|
||||
|
||||
## en-US
|
||||
|
||||
Let's generate 3~6 steps randomly, and proceed to a random step.
|
||||
|
||||
````css
|
||||
#components-steps-demo-step-next > div > div {
|
||||
margin-bottom: 30px;
|
||||
|
@ -1,10 +1,18 @@
|
||||
---
|
||||
order: 5
|
||||
title: 竖直方向的小型步骤条
|
||||
title:
|
||||
zh-CN: 竖直方向的小型步骤条
|
||||
en-US: Vertical mini version
|
||||
---
|
||||
|
||||
## zh-CN
|
||||
|
||||
简单的竖直方向的小型步骤条。
|
||||
|
||||
## en-US
|
||||
|
||||
A simple mini version step bar in the vertical direction.
|
||||
|
||||
````jsx
|
||||
import { Steps } from 'antd';
|
||||
const Step = Steps.Step;
|
||||
|
@ -1,10 +1,18 @@
|
||||
---
|
||||
order: 4
|
||||
title: 竖直方向的步骤条
|
||||
title:
|
||||
zh-CN: 竖直方向的步骤条
|
||||
en-US: Vertical
|
||||
---
|
||||
|
||||
## zh-CN
|
||||
|
||||
简单的竖直方向的步骤条。
|
||||
|
||||
## en-US
|
||||
|
||||
A simple step bar in the vertical direction.
|
||||
|
||||
````jsx
|
||||
import { Steps } from 'antd';
|
||||
const Step = Steps.Step;
|
||||
|
44
components/steps/index.en-US.md
Normal file
44
components/steps/index.en-US.md
Normal file
@ -0,0 +1,44 @@
|
||||
---
|
||||
category: Components
|
||||
type: Navigation
|
||||
cols: 1
|
||||
title: Steps
|
||||
---
|
||||
|
||||
`Steps` is a navigation bar that guides users through the steps of a task.
|
||||
|
||||
## When to use
|
||||
|
||||
When the task is complicated or has a certain sequence in the series of subtasks, we can decompose it into several steps to make things easier.
|
||||
|
||||
## API
|
||||
|
||||
```jsx
|
||||
<Steps>
|
||||
<Step title="first step" />
|
||||
<Step title="second step" />
|
||||
<Step title="third step" />
|
||||
</Steps>
|
||||
```
|
||||
|
||||
### Steps
|
||||
|
||||
The whole of the step bar.
|
||||
|
||||
Property | Description | Type | Default
|
||||
-----|-----|-----|------
|
||||
current | to set the current step, counting from 0. You can overwrite this state by using `status` of `Step` | Number | 0
|
||||
status | to specify the status of current step, can be set to one of the following values: `wait` `process` `finish` `error` | String | `process`
|
||||
size | to specify the size of the step bar, `default` and `small` are currently supported | String | `default`
|
||||
direction | to specify the direction of the step bar, `horizontal` and `vertical` are currently supported | String | horizontal
|
||||
|
||||
### Steps.Step
|
||||
|
||||
A single step in the step bar.
|
||||
|
||||
Property | Description | Type | Default
|
||||
-----|-----|-----|------
|
||||
status | to specify the status. It will be automatically set by `current` of `Steps` if not configured. Optional values are: `wait` `process` `finish` `error` | String | wait
|
||||
title | title of the step | React.Element | -
|
||||
description | detail of the step, optional property | React.Element | -
|
||||
icon | icon of the step, optional property | React.Element | -
|
@ -28,10 +28,10 @@ english: Steps
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
|----------|------------------------------------------|-------------|-------|
|
||||
| current | 指定当前步骤,从 0 开始记数。在子 Step 元素中,可以通过 `status` 属性覆盖状态 | number | 0 |
|
||||
| status | 指定当前步骤的状态,可选 `wait` `process` `finish` `error` | string | `process` |
|
||||
| size | 指定大小,目前支持普通(`default`)和迷你(`small`)| string | default |
|
||||
| direction | 指定步骤条方向。目前支持水平和竖直(`vertical`)两种方向,默认水平方向) | string | - |
|
||||
| current | 指定当前步骤,从 0 开始记数。在子 Step 元素中,可以通过 `status` 属性覆盖状态 | Number | 0 |
|
||||
| status | 指定当前步骤的状态,可选 `wait` `process` `finish` `error` | String | process |
|
||||
| size | 指定大小,目前支持普通(`default`)和迷你(`small`)| String | default |
|
||||
| direction | 指定步骤条方向。目前支持水平(`horizontal`)和竖直(`vertical`)两种方向 | String | horizontal |
|
||||
|
||||
### Steps.Step
|
||||
|
||||
@ -39,7 +39,7 @@ english: Steps
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
|----------|-----------------------------------------|------------|-------|
|
||||
| status | 指定状态。当不配置该属性时,会使用 Steps 的 `current` 来自动指定状态。可选:`wait` `process` `finish` `error` | string | `wait` |
|
||||
| status | 指定状态。当不配置该属性时,会使用 Steps 的 `current` 来自动指定状态。可选:`wait` `process` `finish` `error` | String | wait |
|
||||
| title | 标题 | React.Element | - |
|
||||
| description | 步骤的详情描述,可选 | React.Element | - |
|
||||
| icon | 步骤图标,可选 | React.Element | - |
|
Loading…
Reference in New Issue
Block a user