MobileField.js
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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;