From 5df578ff69f6b02e821d59a8883bc75d78695a62 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 10 十一月 2020 11:07:31 +0800 Subject: [PATCH] 2020-11-10 --- src/menu/datasource/verifycard/columnform/index.jsx | 34 +++++++--------------------------- 1 files changed, 7 insertions(+), 27 deletions(-) diff --git a/src/menu/datasource/verifycard/columnform/index.jsx b/src/menu/datasource/verifycard/columnform/index.jsx index c8ef7bb..7e2a407 100644 --- a/src/menu/datasource/verifycard/columnform/index.jsx +++ b/src/menu/datasource/verifycard/columnform/index.jsx @@ -10,34 +10,13 @@ columnChange: PropTypes.func // 淇敼鍑芥暟 } - state = { - editItem: null // 缂栬緫鍏冪礌 - } - - edit = (record) => { - this.setState({ - editItem: record - }) - - this.props.form.setFieldsValue({ - label: record.label, - field: record.field, - datatype: record.datatype - }) - } - + state = {} handleConfirm = () => { // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭� this.props.form.validateFieldsAndScroll((err, values) => { if (!err) { - values.uuid = this.state.editItem ? this.state.editItem.uuid : '' - - this.setState({ - editItem: null - }, () => { - this.props.columnChange(values) - }) + this.props.columnChange(values) this.props.form.setFieldsValue({ label: '', field: '' @@ -47,6 +26,7 @@ } render() { + const { dict } = this.props const { getFieldDecorator } = this.props.form const formItemLayout = { labelCol: { @@ -69,7 +49,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + '鍚嶇О!' + message: dict['form.required.input'] + '鍚嶇О!' } ] })(<Input placeholder="" autoComplete="off" />)} @@ -82,7 +62,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.input'] + '瀛楁!' + message: dict['form.required.input'] + '瀛楁!' } ] })(<Input placeholder="" autoComplete="off" />)} @@ -95,7 +75,7 @@ rules: [ { required: true, - message: this.props.dict['form.required.select'] + '鏁版嵁绫诲瀷!' + message: dict['form.required.select'] + '鏁版嵁绫诲瀷!' } ] })( @@ -133,7 +113,7 @@ </Col> <Col span={3} className="add"> <Button onClick={this.handleConfirm} type="primary" className="mk-green"> - 淇濆瓨 + {dict['model.add']} </Button> </Col> </Row> -- Gitblit v1.8.0