|
@@ -1726,18 +1726,18 @@ import { Form, Button } from '@douyinfe/semi-ui';
|
|
|
| labelAlign | Text-align of the label text of this field | string | |
|
|
| labelAlign | Text-align of the label text of this field | string | |
|
|
|
| labelWidth | The width of the label text of this field | string\|number | |
|
|
| labelWidth | The width of the label text of this field | string\|number | |
|
|
|
| noLabel | When you don't need to add label automatically, you can set this value to true | boolean | |
|
|
| noLabel | When you don't need to add label automatically, you can set this value to true | boolean | |
|
|
|
-| name | Field name. When passed in, the corresponding className will be automatically added to the corresponding field div, such as: money => '.semi-form-field-money' | string | |
|
|
|
|
|
|
|
+| name | Field name. When passed in, the corresponding className will be automatically added to the field wrapper div, such as: money => '.semi-form-field-money'. After v2.24, the name will also be transparently transmitted to the underlying component for consumption. For example, you can configure the name attribute of input | string | |
|
|
|
| fieldClassName | The className of the entire fieldWrapper is the same as the name parameter, except that the prefix is not automatically appended | string | |
|
|
| fieldClassName | The className of the entire fieldWrapper is the same as the name parameter, except that the prefix is not automatically appended | string | |
|
|
|
| fieldStyle | The inline style of the entire fieldWrapper <br/>**since v1.9.0** | object | |
|
|
| fieldStyle | The inline style of the entire fieldWrapper <br/>**since v1.9.0** | object | |
|
|
|
| initValue | The initial value of the field (consumed only once when Field mounted, subsequent updates are invalid), it has higher priority than the values in Form's initValues | any(type depends on current component) | |
|
|
| initValue | The initial value of the field (consumed only once when Field mounted, subsequent updates are invalid), it has higher priority than the values in Form's initValues | any(type depends on current component) | |
|
|
|
| validate | The custom validation function for this form control. Supports synchronous and asynchronous verification. <br/> Rules does not take effect when validate is set | function(fieldValue, values) | | (fieldValue) => fieldValue.length>5? 'error balabala': '' |
|
|
| validate | The custom validation function for this form control. Supports synchronous and asynchronous verification. <br/> Rules does not take effect when validate is set | function(fieldValue, values) | | (fieldValue) => fieldValue.length>5? 'error balabala': '' |
|
|
|
| rules | validation rules, validation library based on [async-validator](https://github.com/yiminghe/async-validator) | array | | const rules = \[{type:' string ', message:' invalidate string'} \] |
|
|
| rules | validation rules, validation library based on [async-validator](https://github.com/yiminghe/async-validator) | array | | const rules = \[{type:' string ', message:' invalidate string'} \] |
|
|
|
| validateStatus | The validation result status of this form control, optional: `success` / `error` / `warning` / `default` | string | 'default' |
|
|
| validateStatus | The validation result status of this form control, optional: `success` / `error` / `warning` / `default` | string | 'default' |
|
|
|
-| trigger | The timing of triggering the verification, optional: `blur` / `change` / `custom` / `mount` <br/> 1. When set to custom, only formApi will trigger the verification <br/> 2。mount (triggered once when mounting) | string | 'change' |
|
|
|
|
|
|
|
+| trigger | The timing of triggering the verification, optional: `blur` / `change` / `custom` / `mount` <br/> 1. When set to custom, only formApi will trigger the verification <br/> 2.mount (triggered once when mounting) | string | 'change' |
|
|
|
| onChange | Callback invoked when this field value changes |
|
|
| onChange | Callback invoked when this field value changes |
|
|
|
| transform | transform field values before validation | function(fieldValue) | | (value) => Number(value) |
|
|
| transform | transform field values before validation | function(fieldValue) | | (value) => Number(value) |
|
|
|
| allowEmptyString | Whether to allow values to be empty strings. <br/>When the value is '' by default, the key corresponding to this field will be removed from `values`. <br/>If you want to keep the key, you need to set allowEmptyString to true | boolean | | false |
|
|
| allowEmptyString | Whether to allow values to be empty strings. <br/>When the value is '' by default, the key corresponding to this field will be removed from `values`. <br/>If you want to keep the key, you need to set allowEmptyString to true | boolean | | false |
|
|
|
-| convert | After the field value changes, before rerender, update the value of filed | function(fieldValue) | | (value) => newValue(value) |
|
|
|
|
|
|
|
+| convert | After the field value changes, before rerender, update the value of filed | function(fieldValue) | | (value) => newValue |
|
|
|
| stopValidateWithError | When it is true, the rules check is used. After encountering the first rule that fails the check, it will no longer trigger the check of subsequent rules<br/>**since v0.35.0** | boolean | | false |
|
|
| stopValidateWithError | When it is true, the rules check is used. After encountering the first rule that fails the check, it will no longer trigger the check of subsequent rules<br/>**since v0.35.0** | boolean | | false |
|
|
|
| helpText | Custom prompt information, which is displayed in the same block as the verification information. When both have values, the verification information is displayed first<br/>**since v1.0.0** | ReactNode | | |
|
|
| helpText | Custom prompt information, which is displayed in the same block as the verification information. When both have values, the verification information is displayed first<br/>**since v1.0.0** | ReactNode | | |
|
|
|
| extraText | Additional prompt information, you can use this when both error information and prompt copy are required, after helpText/errorMessage<br/>**since v1.0.0** | ReactNode | | |
|
|
| extraText | Additional prompt information, you can use this when both error information and prompt copy are required, after helpText/errorMessage<br/>**since v1.0.0** | ReactNode | | |
|