2016-04-06 17:07:22 +08:00
|
|
|
---
|
|
|
|
order: 6
|
2016-07-21 10:07:30 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 步骤运行错误
|
|
|
|
en-US: Error status
|
2016-04-06 17:07:22 +08:00
|
|
|
---
|
|
|
|
|
2016-07-21 10:07:30 +08:00
|
|
|
## zh-CN
|
|
|
|
|
2016-04-06 17:07:22 +08:00
|
|
|
使用 Steps 的 `status` 属性来指定当前步骤的状态。
|
|
|
|
|
2016-07-21 10:07:30 +08:00
|
|
|
## en-US
|
|
|
|
|
|
|
|
By using `status` of `Steps`, you can specify the state for current step.
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
```tsx
|
2016-04-06 17:07:22 +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-09-16 15:52:14 +08:00
|
|
|
const description = 'This is a description';
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => (
|
2022-09-16 15:52:14 +08:00
|
|
|
<Steps
|
|
|
|
current={1}
|
|
|
|
status="error"
|
|
|
|
items={[
|
|
|
|
{
|
|
|
|
title: 'Finished',
|
|
|
|
description,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: 'In Process',
|
|
|
|
description,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: 'Waiting',
|
|
|
|
description,
|
|
|
|
},
|
|
|
|
]}
|
|
|
|
/>
|
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
|
|
|
```
|