2019-08-14 11:18:36 +08:00
|
|
|
---
|
|
|
|
order: 11
|
|
|
|
title:
|
|
|
|
zh-CN: 导航步骤
|
2019-08-20 04:29:03 +08:00
|
|
|
en-US: Navigation Steps
|
2019-08-14 11:18:36 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
导航类型的步骤条。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
2019-08-20 04:29:03 +08:00
|
|
|
Navigation steps.
|
2019-08-14 11:18:36 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
```tsx
|
2019-08-14 11:18:36 +08:00
|
|
|
import { Steps } from 'antd';
|
2022-05-23 14:37:16 +08:00
|
|
|
import React, { useState } from 'react';
|
2019-08-14 11:18:36 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => {
|
|
|
|
const [current, setCurrent] = useState(0);
|
2019-08-14 11:18:36 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const onChange = (value: number) => {
|
|
|
|
console.log('onChange:', value);
|
|
|
|
setCurrent(value);
|
2019-08-14 11:18:36 +08:00
|
|
|
};
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<Steps
|
|
|
|
type="navigation"
|
|
|
|
size="small"
|
|
|
|
current={current}
|
|
|
|
onChange={onChange}
|
|
|
|
className="site-navigation-steps"
|
2022-09-16 15:52:14 +08:00
|
|
|
items={[
|
|
|
|
{
|
|
|
|
title: 'Step 1',
|
|
|
|
subTitle: '00:00:05',
|
|
|
|
status: 'finish',
|
|
|
|
description: 'This is a description.',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: 'Step 2',
|
|
|
|
subTitle: '00:01:02',
|
|
|
|
status: 'process',
|
|
|
|
description: 'This is a description.',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: 'Step 3',
|
|
|
|
subTitle: 'waiting for longlong time',
|
|
|
|
status: 'wait',
|
|
|
|
description: 'This is a description.',
|
|
|
|
},
|
|
|
|
]}
|
|
|
|
/>
|
2022-05-19 09:46:26 +08:00
|
|
|
<Steps
|
|
|
|
type="navigation"
|
|
|
|
current={current}
|
|
|
|
onChange={onChange}
|
|
|
|
className="site-navigation-steps"
|
2022-09-16 15:52:14 +08:00
|
|
|
items={[
|
|
|
|
{
|
|
|
|
status: 'finish',
|
|
|
|
title: 'Step 1',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
status: 'process',
|
|
|
|
title: 'Step 2',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
status: 'wait',
|
|
|
|
title: 'Step 3',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
status: 'wait',
|
|
|
|
title: 'Step 4',
|
|
|
|
},
|
|
|
|
]}
|
|
|
|
/>
|
2022-05-19 09:46:26 +08:00
|
|
|
<Steps
|
|
|
|
type="navigation"
|
|
|
|
size="small"
|
|
|
|
current={current}
|
|
|
|
onChange={onChange}
|
|
|
|
className="site-navigation-steps"
|
2022-09-16 15:52:14 +08:00
|
|
|
items={[
|
|
|
|
{
|
|
|
|
status: 'finish',
|
|
|
|
title: 'finish 1',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
status: 'finish',
|
|
|
|
title: 'finish 2',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
status: 'process',
|
|
|
|
title: 'current process',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
status: 'wait',
|
|
|
|
title: 'wait',
|
|
|
|
disabled: true,
|
|
|
|
},
|
|
|
|
]}
|
|
|
|
/>
|
2022-05-19 09:46:26 +08:00
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
2019-08-14 11:18:36 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
export default App;
|
2019-08-14 11:18:36 +08:00
|
|
|
```
|
2019-12-23 20:07:56 +08:00
|
|
|
|
|
|
|
```css
|
2020-03-29 10:39:46 +08:00
|
|
|
[data-theme='compact'] .site-navigation-steps,
|
2019-12-23 20:07:56 +08:00
|
|
|
.site-navigation-steps {
|
|
|
|
margin-bottom: 60px;
|
|
|
|
box-shadow: 0px -1px 0 0 #e8e8e8 inset;
|
|
|
|
}
|
|
|
|
```
|
2019-12-25 22:13:04 +08:00
|
|
|
|
|
|
|
<style>
|
|
|
|
[data-theme="dark"] .site-navigation-steps {
|
|
|
|
border-bottom: 1px solid #303030;
|
|
|
|
margin-bottom: 60px;
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
</style>
|