import React, { PureComponent } from 'react'; import { connect } from 'dva'; import { formatMessage, FormattedMessage } from 'umi/locale'; import { Form, Input, DatePicker, Select, Button, Card, InputNumber, Radio, Icon, Tooltip, } from 'antd'; import PageHeaderWrapper from './components/PageHeaderWrapper'; import styles from './style.less'; const FormItem = Form.Item; const { Option } = Select; const { RangePicker } = DatePicker; const { TextArea } = Input; @connect(({ loading }) => ({ submitting: loading.effects['BLOCK_NAME_CAMEL_CASE/submitRegularForm'], })) @Form.create() class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent { handleSubmit = e => { const { dispatch, form } = this.props; e.preventDefault(); form.validateFieldsAndScroll((err, values) => { if (!err) { dispatch({ type: 'BLOCK_NAME_CAMEL_CASE/submitRegularForm', payload: values, }); } }); }; render() { const { submitting } = this.props; const { form: { getFieldDecorator, getFieldValue }, } = this.props; const formItemLayout = { labelCol: { xs: { span: 24 }, sm: { span: 7 }, }, wrapperCol: { xs: { span: 24 }, sm: { span: 12 }, md: { span: 10 }, }, }; const submitFormLayout = { wrapperCol: { xs: { span: 24, offset: 0 }, sm: { span: 10, offset: 7 }, }, }; return ( } content={} > }> {getFieldDecorator('title', { rules: [ { required: true, message: formatMessage({ id: 'BLOCK_NAME.title.required' }), }, ], })()} }> {getFieldDecorator('date', { rules: [ { required: true, message: formatMessage({ id: 'BLOCK_NAME.date.required' }), }, ], })( )} }> {getFieldDecorator('goal', { rules: [ { required: true, message: formatMessage({ id: 'BLOCK_NAME.goal.required' }), }, ], })( )} } > {getFieldDecorator('standard', { rules: [ { required: true, message: formatMessage({ id: 'BLOCK_NAME.standard.required' }), }, ], })( )} }> } > {getFieldDecorator('client')( )} } > {getFieldDecorator('invites')( )} } > {getFieldDecorator('weight')( )} % } help={} > {getFieldDecorator('public', { initialValue: '1', })( )} {getFieldDecorator('publicUsers')( )} ); } } export default PAGE_NAME_UPPER_CAMEL_CASE;