mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-05 01:19:45 +08:00
65f067eb13
* feat: support items * feat: update demo * test: update package * test: update use type * test: update for test * test: update for lint * feat: update doc * test: update for lint * test: update for lint * test: update for lint * test: add deprecated dome * test: add deprecated dome * doc: update doc * feat: update package * test: add test case
50 lines
911 B
Markdown
50 lines
911 B
Markdown
---
|
|
order: 2
|
|
title:
|
|
zh-CN: 带图标的步骤条
|
|
en-US: With icon
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
通过设置 `items` 的 `icon` 属性,可以启用自定义图标。
|
|
|
|
## en-US
|
|
|
|
You can use your own custom icons by setting the property `icon` for `items`.
|
|
|
|
```tsx
|
|
import { LoadingOutlined, SmileOutlined, SolutionOutlined, UserOutlined } from '@ant-design/icons';
|
|
import { Steps } from 'antd';
|
|
import React from 'react';
|
|
|
|
const App: React.FC = () => (
|
|
<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 />,
|
|
},
|
|
]}
|
|
/>
|
|
);
|
|
|
|
export default App;
|
|
```
|