mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 07:09:55 +08:00
6776bb8916
* docs: update demo * chore: add script * test: fix demo test * docs: convert demos * chore: move script * test: remove react-dom import * chore: update deps * docs: update riddle js * test: fix image test * docs: fix riddle demo
42 lines
834 B
Markdown
42 lines
834 B
Markdown
---
|
|
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.
|
|
|
|
```jsx
|
|
import { Steps, Popover } from 'antd';
|
|
|
|
const { Step } = Steps;
|
|
|
|
const customDot = (dot, { status, index }) => (
|
|
<Popover
|
|
content={
|
|
<span>
|
|
step {index} status: {status}
|
|
</span>
|
|
}
|
|
>
|
|
{dot}
|
|
</Popover>
|
|
);
|
|
|
|
export default () => (
|
|
<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." />
|
|
</Steps>
|
|
);
|
|
```
|