docs(Form): add basic API description

This commit is contained in:
陈嘉涵
2020-02-13 11:16:21 +08:00
parent 2af35bfdbc
commit 1095e36bc3
2 changed files with 42 additions and 20 deletions
+15 -3
View File
@@ -404,15 +404,27 @@ export default {
### Props
| Attribute | Description | Type | Default |
| --------- | ----------- | ---- | ------- |
|------|------|------|------|
| validate-first | Whether to stop the validation when a rule fails | *boolean* | `false` |
### Events
| Event | Description | Arguments |
|------|------|------|
| submit | Triggered after submitting the form and validation passed | *values: object* |
| failed | Triggered after submitting the form and validation failed | *errorInfo: { values: object, errors: object[] }* |
### Methods
Use [ref](https://vuejs.org/v2/api/#ref) to get Form instance and call instance methods
| Name | Description | Attribute | Return value |
|------|------|------|------|
| validate | Trigger validation | - | *Promise\<void\>* |
| resetValidation | Reset all validation | - | - |
### Slots
| Name | Description |
| ---- | ----------- |
| default | Form content |