diff --git a/src/routes/Forms/BasicForm.js b/src/routes/Forms/BasicForm.js index 482f976d8b67303ee2d690e8defc8ee23e8a2bf7..baaf8cfc95e03d179f1d2b0abf9868054851736f 100644 --- a/src/routes/Forms/BasicForm.js +++ b/src/routes/Forms/BasicForm.js @@ -1,11 +1,15 @@ import React, { PureComponent } from 'react'; import { connect } from 'dva'; -import { Form, Input, DatePicker, Select, Button, Card } from 'antd'; +import { + Form, Input, DatePicker, Select, Button, Card, InputNumber, Radio, Icon, Tooltip, +} from 'antd'; import PageHeaderLayout from '../../layouts/PageHeaderLayout'; +import styles from './style.less'; const FormItem = Form.Item; const { Option } = Select; const { RangePicker } = DatePicker; +const { TextArea } = Input; @connect(state => ({ submitting: state.form.regularFormSubmitting, @@ -25,12 +29,12 @@ export default class BasicForms extends PureComponent { } render() { const { submitting } = this.props; - const { getFieldDecorator } = this.props.form; + const { getFieldDecorator, getFieldValue } = this.props.form; const formItemLayout = { labelCol: { xs: { span: 24 }, - sm: { span: 3 }, + sm: { span: 7 }, }, wrapperCol: { xs: { span: 24 }, @@ -42,100 +46,139 @@ export default class BasicForms extends PureComponent { const submitFormLayout = { wrapperCol: { xs: { span: 24, offset: 0 }, - sm: { span: 10, offset: 3 }, + sm: { span: 10, offset: 7 }, }, }; return ( -
+ - {getFieldDecorator('appType', { + {getFieldDecorator('title', { rules: [{ - required: true, message: '应用类型', + required: true, message: '请输入标题', }], })( - + )} - {getFieldDecorator('productName', { + {getFieldDecorator('date', { rules: [{ - required: true, message: '请输入产品名', + required: true, message: '请选择起止日期', }], })( - + )} - {getFieldDecorator('appName', { - rules: [ - { required: true, message: '请输入应用名' }, - { pattern: /^[a-zA-Z0-9-]+$/, message: '只能输入英文、数字、中划线' }, - ], + {getFieldDecorator('goal', { + rules: [{ + required: true, message: '请输入目标描述', + }], })( - +