mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Calendar) should not submit form
This commit is contained in:
parent
200da364ff
commit
e93fcb0603
@ -323,6 +323,7 @@ export default createComponent({
|
|||||||
color={this.color}
|
color={this.color}
|
||||||
class={bem('confirm')}
|
class={bem('confirm')}
|
||||||
disabled={this.buttonDisabled}
|
disabled={this.buttonDisabled}
|
||||||
|
nativeType="text"
|
||||||
onClick={this.onConfirm}
|
onClick={this.onConfirm}
|
||||||
>
|
>
|
||||||
{text || t('confirm')}
|
{text || t('confirm')}
|
||||||
|
@ -181,7 +181,7 @@ export default {
|
|||||||
|
|
||||||
```html
|
```html
|
||||||
<van-field name="uploader" label="Uploader">
|
<van-field name="uploader" label="Uploader">
|
||||||
<van-uploader v-model="uploader" slot="input" multiple max-count="2" />
|
<van-uploader v-model="uploader" slot="input" />
|
||||||
</van-field>
|
</van-field>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -63,6 +63,8 @@ export default {
|
|||||||
|
|
||||||
### 表单项类型 - 开关
|
### 表单项类型 - 开关
|
||||||
|
|
||||||
|
在表单中使用 [Switch](#/zh-CN/switch) 组件
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<van-field name="switch" label="开关">
|
<van-field name="switch" label="开关">
|
||||||
<van-switch v-model="switchChecked" slot="input" size="20" />
|
<van-switch v-model="switchChecked" slot="input" size="20" />
|
||||||
@ -81,6 +83,8 @@ export default {
|
|||||||
|
|
||||||
### 表单项类型 - 复选框
|
### 表单项类型 - 复选框
|
||||||
|
|
||||||
|
在表单中使用 [Checkbox](#/zh-CN/checkbox) 组件
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<van-field name="checkbox" label="复选框">
|
<van-field name="checkbox" label="复选框">
|
||||||
<van-checkbox v-model="checkbox" slot="input" shape="square" />
|
<van-checkbox v-model="checkbox" slot="input" shape="square" />
|
||||||
@ -110,6 +114,8 @@ export default {
|
|||||||
|
|
||||||
### 表单项类型 - 单选框
|
### 表单项类型 - 单选框
|
||||||
|
|
||||||
|
在表单中使用 [Radio](#/zh-CN/radio) 组件
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<van-field name="radio" label="单选框">
|
<van-field name="radio" label="单选框">
|
||||||
<van-radio-group v-model="radio" direction="horizontal" slot="input">
|
<van-radio-group v-model="radio" direction="horizontal" slot="input">
|
||||||
@ -131,6 +137,8 @@ export default {
|
|||||||
|
|
||||||
### 表单项类型 - 步进器
|
### 表单项类型 - 步进器
|
||||||
|
|
||||||
|
在表单中使用 [Stepper](#/zh-CN/stepper) 组件
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<van-field name="stepper" label="步进器">
|
<van-field name="stepper" label="步进器">
|
||||||
<van-stepper v-model="stepper" slot="input" />
|
<van-stepper v-model="stepper" slot="input" />
|
||||||
@ -149,6 +157,8 @@ export default {
|
|||||||
|
|
||||||
### 表单项类型 - 评分
|
### 表单项类型 - 评分
|
||||||
|
|
||||||
|
在表单中使用 [Rate](#/zh-CN/rate) 组件
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<van-field name="rate" label="评分">
|
<van-field name="rate" label="评分">
|
||||||
<van-rate v-model="rate" slot="input" />
|
<van-rate v-model="rate" slot="input" />
|
||||||
@ -167,6 +177,8 @@ export default {
|
|||||||
|
|
||||||
### 表单项类型 - 滑块
|
### 表单项类型 - 滑块
|
||||||
|
|
||||||
|
在表单中使用 [Slider](#/zh-CN/slider) 组件
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<van-field name="slider" label="滑块">
|
<van-field name="slider" label="滑块">
|
||||||
<van-slider v-model="slider" slot="input" />
|
<van-slider v-model="slider" slot="input" />
|
||||||
@ -185,9 +197,11 @@ export default {
|
|||||||
|
|
||||||
### 表单项类型 - 文件上传
|
### 表单项类型 - 文件上传
|
||||||
|
|
||||||
|
在表单中使用 [Uploader](#/zh-CN/uploader) 组件
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<van-field name="uploader" label="文件上传">
|
<van-field name="uploader" label="文件上传">
|
||||||
<van-uploader v-model="uploader" slot="input" multiple max-count="2" />
|
<van-uploader v-model="uploader" slot="input" />
|
||||||
</van-field>
|
</van-field>
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -203,6 +217,8 @@ export default {
|
|||||||
|
|
||||||
### 表单项类型 - 选择器
|
### 表单项类型 - 选择器
|
||||||
|
|
||||||
|
在表单中使用 [Picker](#/zh-CN/picker) 组件
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<van-field
|
<van-field
|
||||||
readonly
|
readonly
|
||||||
@ -243,6 +259,8 @@ export default {
|
|||||||
|
|
||||||
### 表单项类型 - 时间选择器
|
### 表单项类型 - 时间选择器
|
||||||
|
|
||||||
|
在表单中使用 [DatetimePicker](#/zh-CN/datetime-picker) 组件
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<van-field
|
<van-field
|
||||||
readonly
|
readonly
|
||||||
@ -281,6 +299,8 @@ export default {
|
|||||||
|
|
||||||
### 表单项类型 - 省市区选择器
|
### 表单项类型 - 省市区选择器
|
||||||
|
|
||||||
|
在表单中使用 [Area](#/zh-CN/area) 组件
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<van-field
|
<van-field
|
||||||
readonly
|
readonly
|
||||||
@ -320,6 +340,8 @@ export default {
|
|||||||
|
|
||||||
### 表单项类型 - 日历
|
### 表单项类型 - 日历
|
||||||
|
|
||||||
|
在表单中使用 [Calendar](#/zh-CN/calendar) 组件
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<van-field
|
<van-field
|
||||||
readonly
|
readonly
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
</van-field>
|
</van-field>
|
||||||
|
|
||||||
<van-field name="uploader" :label="$t('uploader')">
|
<van-field name="uploader" :label="$t('uploader')">
|
||||||
<van-uploader v-model="uploader" slot="input" multiple max-count="2" />
|
<van-uploader v-model="uploader" slot="input" max-count="2" />
|
||||||
</van-field>
|
</van-field>
|
||||||
|
|
||||||
<field-type-picker />
|
<field-type-picker />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user