Input
容器属性
所有组件配置的第一层均支持容器属性
特殊的容器属性 props
Input 支持在公用容器属性以外的其余容器属性
| Name | Type | Default | 是否支持 Variable Pattern | Description |
|---|---|---|---|---|
| validation | validation | ✔️ | 额外的数据验证 | |
| allowI18nValue | bool | 是否允许输入多种语言 |
组件属性 componentsProps
| Name | Type | Default | 是否支持 Variable Pattern | Description |
|---|---|---|---|---|
| className | string | ✔️ | 组件的 className | |
| style | object | 组件的 style | ||
| i18nInputLayout | 'collapsed' | 'flat' | 组件的 style |
所有其余 componentsProps 将会被传给组件根元素(Input)。
validation
| Name | Type | Default | Description |
|---|---|---|---|
| required | bool | false | 是否必填 |
| minLength | number | 最小长度 | |
| minLengthErrorMessage | string | 小于最小长度的错误提示信息 | |
| maxLength | number | 最大长度 | |
| maxLengthErrorMessage | string | 大于最大长度的错误提示信息 | |
| ootb | 'isIDNumber' | 'isEmail' | 'isMobilePhoneNum' | 系统提供的验证格式 | |
| regex | string | 正则验证 | |
| regexErrorMessage | string | 正则验证错误时候的提示信息 |
JS API
通过 formApi.getFieldApi() 获取的接口如下:
| Name | Type | Description |
|---|---|---|
| node | HTML Element | 组件的根 DOM 元素 |
| input | HTML Element | input 输入框 DOM 元素 |