Skip to content

Commit

Permalink
fix(Calendar) should not submit form
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Feb 11, 2020
1 parent 200da36 commit e93fcb0
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/calendar/index.js
Expand Up @@ -323,6 +323,7 @@ export default createComponent({
color={this.color}
class={bem('confirm')}
disabled={this.buttonDisabled}
nativeType="text"
onClick={this.onConfirm}
>
{text || t('confirm')}
Expand Down
2 changes: 1 addition & 1 deletion src/form/README.md
Expand Up @@ -181,7 +181,7 @@ export default {

```html
<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>
```

Expand Down
24 changes: 23 additions & 1 deletion src/form/README.zh-CN.md
Expand Up @@ -63,6 +63,8 @@ export default {

### 表单项类型 - 开关

在表单中使用 [Switch](#/zh-CN/switch) 组件

```html
<van-field name="switch" label="开关">
<van-switch v-model="switchChecked" slot="input" size="20" />
Expand All @@ -81,6 +83,8 @@ export default {

### 表单项类型 - 复选框

在表单中使用 [Checkbox](#/zh-CN/checkbox) 组件

```html
<van-field name="checkbox" label="复选框">
<van-checkbox v-model="checkbox" slot="input" shape="square" />
Expand Down Expand Up @@ -110,6 +114,8 @@ export default {

### 表单项类型 - 单选框

在表单中使用 [Radio](#/zh-CN/radio) 组件

```html
<van-field name="radio" label="单选框">
<van-radio-group v-model="radio" direction="horizontal" slot="input">
Expand All @@ -131,6 +137,8 @@ export default {

### 表单项类型 - 步进器

在表单中使用 [Stepper](#/zh-CN/stepper) 组件

```html
<van-field name="stepper" label="步进器">
<van-stepper v-model="stepper" slot="input" />
Expand All @@ -149,6 +157,8 @@ export default {

### 表单项类型 - 评分

在表单中使用 [Rate](#/zh-CN/rate) 组件

```html
<van-field name="rate" label="评分">
<van-rate v-model="rate" slot="input" />
Expand All @@ -167,6 +177,8 @@ export default {

### 表单项类型 - 滑块

在表单中使用 [Slider](#/zh-CN/slider) 组件

```html
<van-field name="slider" label="滑块">
<van-slider v-model="slider" slot="input" />
Expand All @@ -185,9 +197,11 @@ export default {

### 表单项类型 - 文件上传

在表单中使用 [Uploader](#/zh-CN/uploader) 组件

```html
<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>
```

Expand All @@ -203,6 +217,8 @@ export default {

### 表单项类型 - 选择器

在表单中使用 [Picker](#/zh-CN/picker) 组件

```html
<van-field
readonly
Expand Down Expand Up @@ -243,6 +259,8 @@ export default {

### 表单项类型 - 时间选择器

在表单中使用 [DatetimePicker](#/zh-CN/datetime-picker) 组件

```html
<van-field
readonly
Expand Down Expand Up @@ -281,6 +299,8 @@ export default {

### 表单项类型 - 省市区选择器

在表单中使用 [Area](#/zh-CN/area) 组件

```html
<van-field
readonly
Expand Down Expand Up @@ -320,6 +340,8 @@ export default {

### 表单项类型 - 日历

在表单中使用 [Calendar](#/zh-CN/calendar) 组件

```html
<van-field
readonly
Expand Down
2 changes: 1 addition & 1 deletion src/form/demo/FieldType.vue
Expand Up @@ -44,7 +44,7 @@
</van-field>

<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>

<field-type-picker />
Expand Down

0 comments on commit e93fcb0

Please sign in to comment.