文本框 Text
1.状态属性
| 属性名称 | 数据类型 | 是否必填 | 默认值 | 回传参数 | 说明 |
|---|---|---|---|---|---|
| type | enum | 是 | text | 空 | 文本框类型(text,textarea,password,email,url,mobile,idcard[身份证],alpha[英文字母],alphanum[英文字母与数字],integer[整型],number[数字]) |
| name | string | 是 | null | 空 | 表单字段名称 |
| label | string | 否 | null | 空 | 表单字段描述 |
| width | number | 否 | null | 空 | 宽度 |
| height | number | 否 | null | 空 | 高度 |
| value | number,string | 否 | "" | 空 | 默认值 |
| text | number,string | 否 | "" | 空 | 默认文本值 |
| placeholder | string | 否 | null | 空 | 文本框内部预留文字 |
| readonly | bool | 否 | false | 空 | 是否只读 |
| required | bool | 否 | false | 空 | 是否必填 |
| onlyline | bool | 否 | false | 空 | 是否只占一行 |
| hide | bool | 否 | false | 空 | 是否隐藏 |
| style | Object | 否 | null | 空 | 自定义style |
| className | string | 否 | null | 空 | 自定义class |
| regexp | bool | 否 | null | 空 | 自定义正则表达式 |
| invalidTip | bool | 否 | null | 空 | 自定义的错误提示信息 |
| size | enum | 否 | default | 空 | 组件大小,default(只占一列),large(两列),onlyline(一行) |
| position | enum | 否 | default | 空 | 组件位置,default(默认),left(靠左),right(靠右),方便错误提示信息的位置 |
| rows | number | 否 | 5 | 空 | textarea的行数 |
| min | number | 否 | null | 空 | 最小值或最小长度 |
| max | number | 否 | null | 空 | 最大值或最大长度 |
| onClick | string | 否 | null | name,value,model(所有属性) | 单击事件 |
| onChange | string | 否 | null | value | 值改变事件 |
2.只读属性
| 方法名 | 参数名 | 参数说明 | 返回值类型 | 说明 |
|---|---|---|---|---|
| validate | 空 | 空 | null | 验证有效性 |