提交 32701bfc authored 作者: chscls@163.com's avatar chscls@163.com

弹出框属性设置

上级 ea471e45
...@@ -15,6 +15,8 @@ export default class FormModal extends React.Component { ...@@ -15,6 +15,8 @@ export default class FormModal extends React.Component {
destroyOnClose destroyOnClose
title={this.props.title} title={this.props.title}
maskClosable={false} maskClosable={false}
width={this.props.width}
height={this.props.height}
visible={this.props.visible} visible={this.props.visible}
footer={null} footer={null}
onCancel={this.props.handleCancel} onCancel={this.props.handleCancel}
......
...@@ -137,7 +137,7 @@ export default class tableCom extends Component { ...@@ -137,7 +137,7 @@ export default class tableCom extends Component {
sqlModel: {}, sqlModel: {},
columns: [], columns: [],
sqlContent: null, sqlContent: null,
modalProps:{},
modalTitle: '', modalTitle: '',
modalInit: {}, modalInit: {},
modalCode: null, modalCode: null,
...@@ -156,14 +156,14 @@ export default class tableCom extends Component { ...@@ -156,14 +156,14 @@ export default class tableCom extends Component {
callback: callback, callback: callback,
}); });
}; };
showModal = (fk, title, data) => { showModal = (fk, title, data,modalProps) => {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({
type: 'DataColumn/showModal', type: 'DataColumn/showModal',
payload: { isShowModal: true }, payload: { isShowModal: true },
callback: () => { callback: () => {
this.setState({ modalInit: data, modalTitle: title, modalCode: fk }); this.setState({ modalInit: data, modalTitle: title, modalCode: fk,modalProps:modalProps });
}, },
}); });
}; };
...@@ -1432,7 +1432,7 @@ export default class tableCom extends Component { ...@@ -1432,7 +1432,7 @@ export default class tableCom extends Component {
isEdit, isEdit,
datas, datas,
} = this.props; } = this.props;
const { options, labels, selectDis, modalCode, modalTitle, modalInit } = this.state; const { options, labels, selectDis, modalCode, modalTitle, modalInit,modalProps } = this.state;
const { getFieldDecorator, getFieldError, getFieldProps } = this.props.form; const { getFieldDecorator, getFieldError, getFieldProps } = this.props.form;
const disabled = json != null ? json.disabled : false; const disabled = json != null ? json.disabled : false;
if (json == null) { if (json == null) {
...@@ -2997,6 +2997,7 @@ export default class tableCom extends Component { ...@@ -2997,6 +2997,7 @@ export default class tableCom extends Component {
<Card style={{ margin: 5, border: '1px solid #ccc' }}> <Card style={{ margin: 5, border: '1px solid #ccc' }}>
{modalCode ? ( {modalCode ? (
<FormModal <FormModal
{...modalProps}
visible={this.props.DataColumn.isShowModal} visible={this.props.DataColumn.isShowModal}
handleCancel={this.closeModal} handleCancel={this.closeModal}
title={modalTitle} title={modalTitle}
...@@ -3078,6 +3079,7 @@ export default class tableCom extends Component { ...@@ -3078,6 +3079,7 @@ export default class tableCom extends Component {
</Col> </Col>
{modalCode ? ( {modalCode ? (
<FormModal <FormModal
{...modalProps}
visible={this.props.DataColumn.isShowModal} visible={this.props.DataColumn.isShowModal}
handleCancel={this.closeModal} handleCancel={this.closeModal}
title={modalTitle} title={modalTitle}
...@@ -3109,6 +3111,7 @@ export default class tableCom extends Component { ...@@ -3109,6 +3111,7 @@ export default class tableCom extends Component {
<> <>
{modalCode ? ( {modalCode ? (
<FormModal <FormModal
{...modalProps}
visible={this.props.DataColumn.isShowModal} visible={this.props.DataColumn.isShowModal}
handleCancel={this.closeModal} handleCancel={this.closeModal}
title={modalTitle} title={modalTitle}
...@@ -3148,6 +3151,7 @@ export default class tableCom extends Component { ...@@ -3148,6 +3151,7 @@ export default class tableCom extends Component {
<> <>
{modalCode ? ( {modalCode ? (
<FormModal <FormModal
{...modalProps}
visible={this.props.DataColumn.isShowModal} visible={this.props.DataColumn.isShowModal}
handleCancel={this.closeModal} handleCancel={this.closeModal}
title={modalTitle} title={modalTitle}
...@@ -3181,6 +3185,7 @@ export default class tableCom extends Component { ...@@ -3181,6 +3185,7 @@ export default class tableCom extends Component {
<> <>
{modalCode ? ( {modalCode ? (
<FormModal <FormModal
{...modalProps}
visible={this.props.DataColumn.isShowModal} visible={this.props.DataColumn.isShowModal}
handleCancel={this.closeModal} handleCancel={this.closeModal}
title={modalTitle} title={modalTitle}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论