2017-01-23 14:37:40 +08:00
|
|
|
---
|
|
|
|
order: 9
|
|
|
|
title:
|
|
|
|
zh-CN: 自定义点状步骤条
|
|
|
|
en-US: Customized Dot Style
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
为点状步骤条增加自定义展示。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
You can customize the display for Steps with progress dot style.
|
|
|
|
|
2017-02-13 10:55:53 +08:00
|
|
|
````jsx
|
2017-01-23 14:37:40 +08:00
|
|
|
import { Steps, Popover } from 'antd';
|
2018-06-27 15:55:04 +08:00
|
|
|
|
2017-01-23 14:37:40 +08:00
|
|
|
const Step = Steps.Step;
|
|
|
|
|
2017-01-23 16:09:34 +08:00
|
|
|
const customDot = (dot, { status, index }) => (
|
|
|
|
<Popover content={<span>step {index} status: {status}</span>}>
|
|
|
|
{dot}
|
|
|
|
</Popover>
|
|
|
|
);
|
2017-01-23 14:37:40 +08:00
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<Steps current={1} progressDot={customDot}>
|
|
|
|
<Step title="Finished" description="You can hover on the dot." />
|
|
|
|
<Step title="In Progress" description="You can hover on the dot." />
|
|
|
|
<Step title="Waiting" description="You can hover on the dot." />
|
|
|
|
<Step title="Waiting" description="You can hover on the dot." />
|
2018-06-27 15:55:04 +08:00
|
|
|
</Steps>,
|
2018-11-28 15:00:03 +08:00
|
|
|
mountNode
|
|
|
|
);
|
2017-01-23 14:37:40 +08:00
|
|
|
````
|