MobileField.js 1.1 KB
import React,{PropTypes} from 'react';
import ReactDOM from 'react-dom';  
import cx from 'classnames';
import s from './form.scss';
import {Form,Input} from 'antd';
import {emailProps} from './validates';
const FormItem = Form.Item;

class MobileField extends React.Component {
    constructor(props) {
        super(props);    
    }
    static propTypes = {  
        label:PropTypes.string,
        options:PropTypes.object
    } 
    static defaultProps={ 
    }
    render(){    
        const {label,options,name,field={}}=this.props;
        // console.log('电话号码',field)
        return( 
           <FormItem
              label={label}
              labelCol={{ span: 6 }}
              wrapperCol={{ span: 14 }}
              required={options.is_required} 
              validateStatus={null}
              help=""
            >
              <Input name={name} value={field.value} onChange={field.onChange} style={{display:'inline-block'}} placeholder={options.tooltip} type="text" />
            </FormItem>
        )
    }
}



export default MobileField;