Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {Form, Select, Input, Button, Row, Col, DatePicker } from 'antd'
import React from 'react'
const Option = Select.Option
const FormItem = Form.Item
const { RangePicker } = DatePicker
class CollectRentHead extends React.Component {
constructor (props) {
super(props)
this.state = {
open: '展开',
none: 'none',
openState: false
}
}
// 清除
handleReset = () => {
this.props.form.resetFields()
}
import React, { PureComponent } from 'react';
import { connect } from 'dva';
import { Row, Col, Card, Form, Input, Icon, Button, Dropdown, Menu, Modal, Table, Divider, Popconfirm } from 'antd';
// import StandardTable from '../../components/StandardTable';
import PageHeaderLayout from './../../layouts/pageHeaderLayout';
import styles from './../../utils/utils.less';
const FormItem = Form.Item;
const getValue = obj => Object.keys(obj).map(key => obj[key]).join(',');
// 重置密码弹框
const ResetPwdModal = Form.create()((props) => {
const { visible, form, onCancel, onOk } = props;
return (
{
e.preventDefault();
form.validateFields((err, fieldsValue) => {
if (err) return;
onOk(fieldsValue);
import React from 'react';
import { Select, Button, Input, Form, Upload, Icon, Progress, Tooltip, message } from 'antd';
import { FormattedMessage } from 'react-intl';
import styles from './Submit.less';
const FormItem = Form.Item;
const { Dragger } = Upload;
function Submit({ repo, dispatch, form, loading, intl }) {
if (!repo) {
return null;
}
const { getFieldDecorator, validateFields, getFieldValue, setFieldsValue } = form;
const coverPicture = getFieldValue('coverPicture');
const coverPictureUploading = (coverPicture && !coverPicture.response);
const coverPictureUploaded = (
coverPicture && coverPicture.response && coverPicture.response.file
);
return (
<form>
<h3>
</h3></form>
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { Form, Input, Radio, Modal, Select } from 'antd'
import { withI18n } from '@lingui/react'
import md5 from 'md5'
import { find } from 'lodash'
import { getRandomColor } from 'utils'
const { Option } = Select
const FormItem = Form.Item
const formItemLayout = {
labelCol: {
span: 6,
},
wrapperCol: {
span: 14,
},
}
@withI18n()
@Form.create()
class UserModal extends PureComponent {
state = {
roleSelectPermission: [],
}
handleOk = () => {
import React from 'react';
import PropTypes from 'prop-types';
import { Form } from 'antd';
import Select from './Select';
const FormItem = Form.Item;
const RenderSelect = props => {
const {
input,
label,
type,
children,
meta: { touched, error }
} = props;
let validateStatus = '';
if (touched && error) {
validateStatus = 'error';
}
const onChange = value => {
const { formik, name } = props;
import { FormProps } from 'antd/lib/form';
import _ from 'lodash';
import ModalControl from '@cpts/ModalControl';
import { FormattedMessage } from 'react-intl';
interface Props {
field: string,
batch: string,
title: string,
visible: boolean,
onOk: (field: string, batch: string) => void,
onCancel: () => void,
destroy: () => void,
}
const FormItem = Form.Item;
const RadioGroup = Radio.Group;
class BatchSearch extends Component {
static defaultProps: any = {
field: 'ident',
batch: '',
title: '',
visible: true,
onOk: _.noop,
onCancel: _.noop,
destroy: _.noop,
};
handleOk = () => {
this.props.form!.validateFields((err, values) => {
if (!err) {
import React from 'react'
import PropTypes from 'prop-types'
import { Form, Input, Button, Row, Col, Icon, message } from 'antd'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom';
import { login } from '../../actions/auth'
const FormItem = Form.Item
import './index.less'
const propTypes = {
user: PropTypes.object,
loggingIn: PropTypes.bool,
loginErrors: PropTypes.string
};
class Login extends React.Component {
constructor (props) {
super(props);
this.state = {
loading: false
}