mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-04 04:58:55 +08:00
update steps API
This commit is contained in:
parent
179f030d45
commit
eb2a02618f
@ -17,10 +17,11 @@ You can customize the display for Steps with progress dot style.
|
||||
import { Steps, Popover } from 'antd';
|
||||
const Step = Steps.Step;
|
||||
|
||||
const customDot = (dot, stepObj) => {
|
||||
const content = <span>status: {stepObj.status}</span>;
|
||||
return <Popover content={content}>{dot}</Popover>;
|
||||
};
|
||||
const customDot = (dot, { status, index }) => (
|
||||
<Popover content={<span>step {index} status: {status}</span>}>
|
||||
{dot}
|
||||
</Popover>
|
||||
);
|
||||
|
||||
ReactDOM.render(
|
||||
<Steps current={1} progressDot={customDot}>
|
||||
|
@ -31,7 +31,7 @@ current | to set the current step, counting from 0. You can overwrite this state
|
||||
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
|
||||
progressDot | Steps with progress dot style | Boolean or Function(iconDot, {index, status, title, description}), by setting to a Function, you can customize the progress dot | false
|
||||
progressDot | Steps with progress dot style, customize the progress dot by setting it to a function | Boolean or (iconDot, {index, status, title, description}) => ReactNode | false
|
||||
|
||||
### Steps.Step
|
||||
|
||||
|
@ -32,7 +32,7 @@ title: Steps
|
||||
| status | 指定当前步骤的状态,可选 `wait` `process` `finish` `error` | String | process |
|
||||
| size | 指定大小,目前支持普通(`default`)和迷你(`small`)| String | default |
|
||||
| direction | 指定步骤条方向。目前支持水平(`horizontal`)和竖直(`vertical`)两种方向 | String | horizontal |
|
||||
| progressDot | 点状步骤条 | Boolean or Function(iconDot, {index, status, title, description}), 配置为 Function 时可自定义步骤点 | false |
|
||||
| progressDot | 点状步骤条,可以设置为一个 function | Boolean or (iconDot, {index, status, title, description}) => ReactNode | false |
|
||||
|
||||
### Steps.Step
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user