2016-03-31 09:40:55 +08:00
|
|
|
---
|
|
|
|
order: 2
|
2016-07-21 10:07:30 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 带图标的步骤条
|
|
|
|
en-US: With icon
|
2016-03-31 09:40:55 +08:00
|
|
|
---
|
2015-07-08 15:53:51 +08:00
|
|
|
|
2016-07-21 10:07:30 +08:00
|
|
|
## zh-CN
|
|
|
|
|
2022-09-16 15:52:14 +08:00
|
|
|
通过设置 `items` 的 `icon` 属性,可以启用自定义图标。
|
2015-07-08 15:53:51 +08:00
|
|
|
|
2016-07-21 10:07:30 +08:00
|
|
|
## en-US
|
|
|
|
|
2022-09-16 15:52:14 +08:00
|
|
|
You can use your own custom icons by setting the property `icon` for `items`.
|
2016-07-21 10:07:30 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
```tsx
|
2022-05-23 14:37:16 +08:00
|
|
|
import { LoadingOutlined, SmileOutlined, SolutionOutlined, UserOutlined } from '@ant-design/icons';
|
2019-08-13 14:07:17 +08:00
|
|
|
import { Steps } from 'antd';
|
2022-05-23 14:37:16 +08:00
|
|
|
import React from 'react';
|
2018-06-27 15:55:04 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => (
|
2022-09-16 15:52:14 +08:00
|
|
|
<Steps
|
|
|
|
items={[
|
|
|
|
{
|
|
|
|
title: 'Login',
|
|
|
|
status: 'finish',
|
|
|
|
icon: <UserOutlined />,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: 'Verification',
|
|
|
|
status: 'finish',
|
|
|
|
icon: <SolutionOutlined />,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: 'Pay',
|
|
|
|
status: 'process',
|
|
|
|
icon: <LoadingOutlined />,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: 'Done',
|
|
|
|
status: 'wait',
|
|
|
|
icon: <SmileOutlined />,
|
|
|
|
},
|
|
|
|
]}
|
|
|
|
/>
|
2018-11-28 15:00:03 +08:00
|
|
|
);
|
2022-05-19 09:46:26 +08:00
|
|
|
|
|
|
|
export default App;
|
2019-05-07 14:57:32 +08:00
|
|
|
```
|