|
|
@ -1,6 +1,6 @@
|
|
|
|
import React from "react";
|
|
|
|
import React from "react";
|
|
|
|
import "antd/dist/antd.css";
|
|
|
|
import "antd/dist/antd.css";
|
|
|
|
import {PageHeader, Breadcrumb, Typography} from "antd";
|
|
|
|
import {PageHeader, Typography, Card, Steps, Button, message} from "antd";
|
|
|
|
|
|
|
|
|
|
|
|
const Paragraph = Typography;
|
|
|
|
const Paragraph = Typography;
|
|
|
|
|
|
|
|
|
|
|
@ -19,17 +19,42 @@ const routes = [
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Step = Steps.Step;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const steps = [{
|
|
|
|
|
|
|
|
title: 'First',
|
|
|
|
|
|
|
|
content: 'First-content',
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
title: 'Second',
|
|
|
|
|
|
|
|
content: 'Second-content',
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
title: 'Last',
|
|
|
|
|
|
|
|
content: 'Last-content',
|
|
|
|
|
|
|
|
}];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class AddNewApp extends React.Component {
|
|
|
|
class AddNewApp extends React.Component {
|
|
|
|
routes;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constructor(props) {
|
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
super(props);
|
|
|
|
this.routes = props.routes;
|
|
|
|
this.state = {
|
|
|
|
|
|
|
|
current: 0,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
next() {
|
|
|
|
|
|
|
|
const current = this.state.current + 1;
|
|
|
|
|
|
|
|
this.setState({current});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
prev() {
|
|
|
|
|
|
|
|
const current = this.state.current - 1;
|
|
|
|
|
|
|
|
this.setState({current});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
|
|
|
|
const { current } = this.state;
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<PageHeader
|
|
|
|
<PageHeader
|
|
|
@ -44,8 +69,34 @@ class AddNewApp extends React.Component {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</PageHeader>
|
|
|
|
</PageHeader>
|
|
|
|
<div style={{ background: '#f0f2f5', padding: 24, minHeight: 280 }}>
|
|
|
|
<div style={{background: '#f0f2f5', padding: 24, minHeight: 720}}>
|
|
|
|
|
|
|
|
<Card>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<Steps current={current}>
|
|
|
|
|
|
|
|
{steps.map(item => <Step key={item.title} title={item.title}/>)}
|
|
|
|
|
|
|
|
</Steps>
|
|
|
|
|
|
|
|
<div className="steps-content">{steps[current].content}</div>
|
|
|
|
|
|
|
|
<div className="steps-action">
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
current < steps.length - 1
|
|
|
|
|
|
|
|
&& <Button type="primary" onClick={() => this.next()}>Next</Button>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
current === steps.length - 1
|
|
|
|
|
|
|
|
&& <Button type="primary"
|
|
|
|
|
|
|
|
onClick={() => message.success('Processing complete!')}>Done</Button>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
current > 0
|
|
|
|
|
|
|
|
&& (
|
|
|
|
|
|
|
|
<Button style={{marginLeft: 8}} onClick={() => this.prev()}>
|
|
|
|
|
|
|
|
Previous
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</Card>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|