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
|
|
|
|
|
|
|
```jsx
|
|
|
|
import { Steps } from 'antd';
|
|
|
|
|
|
|
|
const { Step } = Steps;
|
|
|
|
|
2019-08-17 23:35:49 +08:00
|
|
|
const stepStyle = {
|
|
|
|
marginBottom: 60,
|
2019-08-24 17:56:22 +08:00
|
|
|
boxShadow: '0px -1px 0 0 #e8e8e8 inset',
|
2019-08-17 23:35:49 +08:00
|
|
|
};
|
|
|
|
|
2019-08-14 11:18:36 +08:00
|
|
|
class Demo extends React.Component {
|
|
|
|
state = {
|
|
|
|
current: 0,
|
|
|
|
};
|
|
|
|
|
|
|
|
onChange = current => {
|
|
|
|
console.log('onChange:', current);
|
|
|
|
this.setState({ current });
|
|
|
|
};
|
|
|
|
|
|
|
|
render() {
|
|
|
|
const { current } = this.state;
|
|
|
|
return (
|
|
|
|
<div>
|
2019-08-17 23:35:49 +08:00
|
|
|
<Steps
|
|
|
|
type="navigation"
|
|
|
|
size="small"
|
|
|
|
current={current}
|
|
|
|
onChange={this.onChange}
|
|
|
|
style={stepStyle}
|
|
|
|
>
|
|
|
|
<Step
|
|
|
|
title="Step 1"
|
|
|
|
subTitle="00:00:05"
|
|
|
|
status="finish"
|
|
|
|
description="This is a description."
|
|
|
|
/>
|
|
|
|
<Step
|
|
|
|
title="Step 2"
|
|
|
|
subTitle="00:01:02"
|
|
|
|
status="process"
|
|
|
|
description="This is a description."
|
|
|
|
/>
|
|
|
|
<Step
|
|
|
|
title="Step 3"
|
|
|
|
subTitle="waiting for longlong time"
|
|
|
|
status="wait"
|
|
|
|
description="This is a description."
|
|
|
|
/>
|
|
|
|
</Steps>
|
|
|
|
<Steps type="navigation" current={current} onChange={this.onChange} style={stepStyle}>
|
|
|
|
<Step status="finish" title="Step 1" />
|
|
|
|
<Step status="process" title="Step 2" />
|
|
|
|
<Step status="wait" title="Step 3" />
|
|
|
|
<Step status="wait" title="Step 4" />
|
|
|
|
</Steps>
|
|
|
|
<Steps
|
|
|
|
type="navigation"
|
|
|
|
size="small"
|
|
|
|
current={current}
|
|
|
|
onChange={this.onChange}
|
|
|
|
style={stepStyle}
|
|
|
|
>
|
|
|
|
<Step status="finish" title="finish 1" />
|
|
|
|
<Step status="finish" title="finish 2" />
|
|
|
|
<Step status="process" title="current process" />
|
|
|
|
<Step status="wait" title="wait" disabled />
|
|
|
|
</Steps>
|
2019-08-14 11:18:36 +08:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ReactDOM.render(<Demo />, mountNode);
|
|
|
|
```
|