From 2cb65d99c9aebf8293cb2838fcfe3e09fb2739ce Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 06 十二月 2019 00:15:12 +0800 Subject: [PATCH] 2019-12-06 --- src/templates/modalconfig/settingform/index.jsx | 48 +++++++++++++++++++++++++----------------------- 1 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/templates/modalconfig/settingform/index.jsx b/src/templates/modalconfig/settingform/index.jsx index 80780e0..af9244d 100644 --- a/src/templates/modalconfig/settingform/index.jsx +++ b/src/templates/modalconfig/settingform/index.jsx @@ -1,15 +1,14 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Form, Row, Col, Input, Radio } from 'antd' +import { Form, Row, Col, Input, Radio, InputNumber } from 'antd' import './index.scss' -const { TextArea } = Input +// const { TextArea } = Input class SettingForm extends Component { static propTpyes = { dict: PropTypes.object, // 瀛楀吀椤� - formlist: PropTypes.any, - card: PropTypes.object + data: PropTypes.object } state = { @@ -30,9 +29,9 @@ } render() { - const { data, dict } = this.props + const { data } = this.props const { getFieldDecorator } = this.props.form - + console.log(data) const formItemLayout = { labelCol: { xs: { span: 24 }, @@ -44,33 +43,36 @@ } } return ( - <Form {...formItemLayout} className="ant-advanced-search-form commontable-setting-form"> + <Form {...formItemLayout} className="ant-advanced-search-form modal-setting-form"> <Row gutter={24}> <Col span={12}> - <Form.Item label="鍥哄畾鎸夐挳"> - {getFieldDecorator('actionfixed', { - initialValue: data.actionfixed + <Form.Item label="鏍囬"> + {getFieldDecorator('title', { + initialValue: data.title + })(<Input placeholder="" autoComplete="off"/>)} + </Form.Item> + </Col> + <Col span={12}> + <Form.Item label="鍒楁暟"> + {getFieldDecorator('cols', { + initialValue: data.cols })( <Radio.Group> - <Radio value={true}>鏄�</Radio> - <Radio value={false}>鍚�</Radio> + <Radio value="1">1鍒�</Radio> + <Radio value="2">2鍒�</Radio> + <Radio value="3">3鍒�</Radio> </Radio.Group> )} </Form.Item> </Col> <Col span={12}> - <Form.Item label="鍥哄畾鍒�"> - {getFieldDecorator('columnfixed', { - initialValue: data.columnfixed - })( - <Radio.Group> - <Radio value={true}>鏄�</Radio> - <Radio value={false}>鍚�</Radio> - </Radio.Group> - )} + <Form.Item label="瀹藉害"> + {getFieldDecorator('width', { + initialValue: data.width + })(<InputNumber min={30} max={90} precision={0} />)} </Form.Item> </Col> - <Col span={24}> + {/* <Col span={24}> <Form.Item label="鏁版嵁婧�" className="textarea"> {getFieldDecorator('dataresource', { initialValue: data.dataresource, @@ -82,7 +84,7 @@ ] })(<TextArea rows={4} />)} </Form.Item> - </Col> + </Col> */} </Row> </Form> ) -- Gitblit v1.8.0