forked from Gitlink/forgeplus-react
80 lines
2.0 KiB
JavaScript
80 lines
2.0 KiB
JavaScript
import React, {Component} from 'react';
|
|
import {
|
|
Button,
|
|
} from 'antd';
|
|
|
|
class Bottomsubmit extends Component {
|
|
constructor(props) {
|
|
super(props)
|
|
|
|
this.state = {}
|
|
}
|
|
|
|
cannelfun = () => {
|
|
// window.location.href=
|
|
try {
|
|
if(this.props.Cohetepaperbool===true){
|
|
this.props.setCohetepaperbool(false);
|
|
}else {
|
|
this.props.history.replace(this.props.url);
|
|
}
|
|
}catch (e) {
|
|
this.props.history.replace(this.props.url);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
<div>
|
|
<style>
|
|
{
|
|
`
|
|
.newshixunbottombtn {
|
|
position: fixed;
|
|
z-index: 1000;
|
|
bottom: 0;
|
|
width: 100%;
|
|
height: 63px;
|
|
background: #fff;
|
|
box-shadow: 0 -4px 4px 0 rgba(0,0,0,.05);
|
|
}
|
|
.padding13-30 {
|
|
padding: 13px 30px;
|
|
-webkit-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
.newshixunmode {
|
|
width: 100px;
|
|
height: 38px;
|
|
border-radius: 3px;
|
|
}
|
|
`
|
|
}
|
|
</style>
|
|
<div className="clearfix bor-bottom-greyE edu-back-white orderingbox newshixunbottombtn">
|
|
<div className=" edu-txt-center padding13-30">
|
|
<button type="button" className="ant-btn mr20 newshixunmode backgroundFFF" onClick={() => this.cannelfun()}>
|
|
<span>取 消</span></button>
|
|
<Button type="button" className="ant-btn newshixunmode mr40 ant-btn-primary" type="primary"
|
|
htmlType="submit" onClick={this.props.onSubmits?() => this.props.onSubmits():() => this.cannelfun()}
|
|
loading={this.props.loadings}><span>{this.props.bottomvalue===undefined?"保存":this.props.bottomvalue}</span></Button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
export default Bottomsubmit;
|
|
|
|
|
|
|
|
|
|
|
|
|