mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs(Form): add with field tip (#8750)
This commit is contained in:
parent
e5a326ee5a
commit
642d9cca30
@ -1,12 +1,18 @@
|
|||||||
# Form
|
# Form
|
||||||
|
|
||||||
|
### Intro
|
||||||
|
|
||||||
|
Used for data entry and verification, and supports input boxes, radio buttons, check boxes, file uploads and other types. Should be used with [Field](#/en-US/field) component.
|
||||||
|
|
||||||
### Install
|
### Install
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { Form } from 'vant';
|
import { Form } from 'vant';
|
||||||
|
import { Field } from 'vant';
|
||||||
|
|
||||||
Vue.use(Form);
|
Vue.use(Form);
|
||||||
|
Vue.use(Field);
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@ -454,11 +460,11 @@ export default {
|
|||||||
|
|
||||||
### validate-trigger
|
### validate-trigger
|
||||||
|
|
||||||
| Value | Description |
|
| Value | Description |
|
||||||
| -------- | --------------------------------------------------------------- |
|
| -------- | ---------------------------------------------------------------- |
|
||||||
| onSubmit | Trigger validation after submiting form |
|
| onSubmit | Trigger validation after submitting form |
|
||||||
| onBlur | Trigger validation after submiting form or bluring input |
|
| onBlur | Trigger validation after submitting form or bluring input |
|
||||||
| onChange | Trigger validation after submiting form or changing input value |
|
| onChange | Trigger validation after submitting form or changing input value |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
|
@ -2,15 +2,17 @@
|
|||||||
|
|
||||||
### 介绍
|
### 介绍
|
||||||
|
|
||||||
用于数据录入、校验,支持输入框、单选框、复选框、文件上传等类型,2.5 版本开始支持此组件。
|
用于数据录入、校验,支持输入框、单选框、复选框、文件上传等类型,需要与 [Field 输入框](#/zh-CN/field) 组件搭配使用。2.5 版本开始支持此组件。
|
||||||
|
|
||||||
### 引入
|
### 引入
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { Form } from 'vant';
|
import { Form } from 'vant';
|
||||||
|
import { Field } from 'vant';
|
||||||
|
|
||||||
Vue.use(Form);
|
Vue.use(Form);
|
||||||
|
Vue.use(Field);
|
||||||
```
|
```
|
||||||
|
|
||||||
## 代码演示
|
## 代码演示
|
||||||
|
Loading…
x
Reference in New Issue
Block a user