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
Define the inputs wrapping class. Leave `undefined` to disable input wrapping.
33
31
34
32
### events
35
-
-`input`undefined
33
+
-`input`Fired synchronously when the value of an element is changed.
36
34
37
-
-`change` Fired when an form input value is changed.
35
+
-`change` Fired when a change to the element's value is committed by the user.
38
36
39
-
-`invalid` Fired when a submittable element has been checked and doesn't satisfy its constraints. The validity of submittable elements is checked before submitting their owner form.
37
+
-`invalid` Fired when a submittable element has been checked and doesn't satisfy its constraints. The validity of submittable elements is checked before submitting their owner form, or after the `checkValidity()` of the element or its owner form is called.
40
38
41
39
-`submit` Fired when a form is submitted
42
40
43
41
### methods
44
42
-`input(name)`
45
-
Get a form input component
43
+
Get a form input reference
44
+
45
+
-`form()`
46
+
Get the form reference
47
+
48
+
-`checkValidity()`
49
+
Checks whether the form has any constraints and whether it satisfies them. If the form fails its constraints, the browser fires a cancelable `invalid` event at the element, and then returns false.
46
50
47
51
-`reset()`
48
52
Reset the value of all elements of the parent form.
49
53
50
-
-`submit(e)`
54
+
-`submit(event)`
51
55
Send the content of the form to the server
52
56
53
57
-`setErrorMessage(message)`
@@ -119,11 +123,8 @@ In your Vue file:
119
123
```
120
124
121
125
## Use custom form elements
122
-
123
126
Use `FormSchema.setComponent(type, component[, props = {}])` to define custom element to use for rendering.
124
-
125
127
See [vue-json-schema-demo-elementui](https://github.com/demsking/vue-json-schema-demo-elementui) for a complete example.
To group radio elements, use the [JSON Schema keyword `enum`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.23) and `attrs.type === 'radio'`:
0 commit comments