ant-design/components/steps/index.zh-CN.md

55 lines
2.2 KiB
Markdown
Raw Normal View History

2016-03-31 14:17:09 +08:00
---
category: Components
2016-09-21 11:28:38 +08:00
subtitle: 步骤条
type: 导航
2016-03-31 14:17:09 +08:00
cols: 1
2016-09-21 11:28:38 +08:00
title: Steps
cover: https://gw.alipayobjects.com/zos/antfincdn/UZYqMizXHaj/Steps.svg
2016-03-31 14:17:09 +08:00
---
2015-06-15 22:01:39 +08:00
2015-06-26 14:42:30 +08:00
引导用户按照流程完成任务的导航条。
2015-06-24 14:52:49 +08:00
## 何时使用
2015-06-26 14:42:30 +08:00
当任务复杂或者存在先后关系时,将其分解成一系列步骤,从而简化任务。
2015-06-24 14:52:49 +08:00
## API
2015-07-16 18:26:17 +08:00
```jsx
<Steps>
2016-03-04 11:46:24 +08:00
<Step title="第一步" />
<Step title="第二步" />
<Step title="第三步" />
2015-07-16 18:26:17 +08:00
</Steps>
```
2015-06-25 19:32:06 +08:00
### Steps
2015-07-17 09:42:09 +08:00
整体步骤条。
2015-06-25 19:32:06 +08:00
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| --- | --- | --- | --- | --- |
2019-11-22 10:33:34 +08:00
| className | 步骤条类名 | string | - | |
| type | 步骤条类型,有 `default``navigation` 两种 | string | `default` | |
| current | 指定当前步骤,从 0 开始记数。在子 Step 元素中,可以通过 `status` 属性覆盖状态 | number | 0 | |
| direction | 指定步骤条方向。目前支持水平(`horizontal`)和竖直(`vertical`)两种方向 | string | horizontal | |
2019-11-22 10:33:34 +08:00
| labelPlacement | 指定标签放置位置,默认水平放图标右侧,可选 `vertical` 放图标下方 | string | `horizontal` | |
| progressDot | 点状步骤条,可以设置为一个 functionlabelPlacement 将强制为 `vertical` | Boolean or (iconDot, {index, status, title, description}) => ReactNode | false | |
| size | 指定大小,目前支持普通(`default`)和迷你(`small` | string | default | |
| status | 指定当前步骤的状态,可选 `wait` `process` `finish` `error` | string | process | |
2019-11-22 10:33:34 +08:00
| initial | 起始序号,从 0 开始记数 | number | 0 | |
| onChange | 点击切换步骤时触发 | (current) => void | - | |
2015-06-25 19:32:06 +08:00
### Steps.Step
2016-04-06 16:16:36 +08:00
步骤条内的每一个步骤。
2015-06-25 19:32:06 +08:00
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| --- | --- | --- | --- | --- |
| description | 步骤的详情描述,可选 | string\|ReactNode | - | |
use ant design icons 4.0 (#18217) * feat: use @ant-design/icons@4.0 * feat: use createFromIconfontCN to make site works * feat: update doc for Icon * feat: use icon in component Alert * feat: use icon in component Avatar * feat: use icon in component Breadcrumb * feat: use icon in component Button * feat: use icon in component Cascader * feat: use icon in component Collapse * feat: use icon in component Datepicker * feat: use icon in component Dropdown * feat: use icon in component Form * feat: use icon in component Input * feat: use icon in component InputNumber * feat: use icon in component Layout * feat: use icon in component Mention * feat: use icon in component Message * feat: use icon in component Modal * feat: use icon in component Notification * feat: use icon in component PageHeader * feat: use icon in component Pagination * feat: use icon in component Popconfirm * feat: use icon in component Progress * feat: use icon in component Rate * feat: use icon in component Result * feat: use icon in component Select * feat: use icon in component Step * feat: use icon in component Switch * feat: use icon in component Table * feat: use icon in component Tab * feat: use icon in component Tag * feat: handle rest component which using Icon * fix: remove unused vars * feat: use latest alpha ant design icons * fix: failed test in uploadlist.test.js * test: update snapshot for icons * doc: add Icon for site * doc: use @ant-design/icons in site * chore: use latest icons * fix: tslint issue * fix: test cases * fix: types for react * fix: lint rules for import orders * fix: use @ant-design/icons@4.0.0-alpha.5 to avoid insert css in server render * fix: eslint error in demo/**.md * inject antd icons * update snapshot * fix site * doc: update docs * fix: code snippets icon in site * feat: use latest @ant-design/icons * fix: icon props in message
2019-08-13 14:07:17 +08:00
| icon | 步骤图标的类型,可选 | ReactNode | - | |
| status | 指定状态。当不配置该属性时,会使用 Steps 的 `current` 来自动指定状态。可选:`wait` `process` `finish` `error` | string | `wait` | |
| title | 标题 | string\|ReactNode | - | |
2019-11-22 10:33:34 +08:00
| subTitle | 子标题 | string\|ReactNode | - | |
| disabled | 禁用点击 | boolean | false | |