Commit 9dfdd9f0 authored by zhangwenshuai's avatar zhangwenshuai

Merge branch 'delDetail' into dev

parents ce05efcc 420d1a4a
......@@ -55,12 +55,11 @@
.buttonWrap {
position: absolute;
bottom: 16px;
left: 26px;
right: 45px;
.delBtnCls {
color: @errorColor;
position: relative;
left: -303px;
}
}
}
......@@ -32,9 +32,7 @@ class FormWrap extends Component {
handleSubmit = (e) => {
e.preventDefault();
e.stopPropagation();
const {
rowId, form, handleSubmit, data, rowData, detailType,
} = this.props;
const { rowId, form, handleSubmit, data, rowData, detailType } = this.props;
form.validateFieldsAndScroll((err, values) => {
if (!err) {
const newValues: any[] = [];
......@@ -183,9 +181,7 @@ class FormWrap extends Component {
};
render() {
const {
loading, isShowDelBtn, data, btnWrapStyle, name, colsNum, delLabel, hideOperateBtn,
} = this.props;
const { loading, isShowDelBtn, data, btnWrapStyle, name, colsNum, delLabel, hideOperateBtn } = this.props;
return (
<Provider value={{ locale: this.getContext() }}>
......@@ -216,15 +212,15 @@ class FormWrap extends Component {
})}
</Form>
</div>
{
hideOperateBtn ? null : (
<div className={styles.buttonWrap} style={btnWrapStyle}>
<div style={{ display: 'flex', justifyContent: 'center' }}>
{isShowDelBtn ? (
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
{isShowDelBtn && (
<Button onClick={this.handleDelete} type="link" className={styles.delBtnCls}>
{delLabel || '删除'}
</Button>
) : null}
)}
{!hideOperateBtn && (
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<Button onClick={this.handleCancel} className={styles.btnCls}>
取消
</Button>
......@@ -238,10 +234,9 @@ class FormWrap extends Component {
确定
</Button>
</div>
)}
</div>
</div>
)
}
</div>
</Provider>
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment