You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/packages/form/doc.en-US.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,7 @@ import { Form } from '@nutui/nutui-react'
80
80
| name | form name |`any`|`-`|
81
81
| labelPosition | The position of the form item label |`top`\|`left`\|`right`|`right`|
82
82
| starPosition | The red star position of the required form item label |`left`\|`right`|`left`|
83
+
| validateTrigger | uniformly set the timing for fields to trigger validation |`string`\|`string[]`|`onChange`|
83
84
| onFinish | Triggered after verification is successful |`(values: any) => void`|`-`|
84
85
| onFinishFailed | Triggered when any form item fails validation |`(values: any, errorFields: any) => void`|`-`|
85
86
@@ -125,7 +126,8 @@ Form.useForm() creates a Form instance, which is used to manage all data states.
125
126
| --- | --- | --- |
126
127
| getFieldValue | Get the value of the corresponding field name |`(name: NamePath) => any`|
127
128
| getFieldsValue | Get values by a set of field names. Return according to the corresponding structure. Default return mounted field value, but you can use getFieldsValue(true) to get all values |`(name: NamePath \| boolean) => any`|
128
-
| setFieldsValue | set field values |`(values) => void`|
129
+
| setFieldsValue | Set the value of the form (the value will be passed directly to the form store. If you do not want the object passed in to be modified, please copy it and pass it in) |`(values) => void`|
130
+
| setFieldValue | Set the value of the corresponding field name |`<T>(name: NamePath, value: T) => void`|
129
131
| resetFields | Reset form prompt state |`() => void`|
130
132
| submit | method to submit a form for validation |`Promise`|
0 commit comments