docs: fix field value #7817

This commit is contained in:
chenjiahan 2020-12-27 16:57:17 +08:00
parent a524b5284f
commit 4d49183230
7 changed files with 29 additions and 17 deletions

View File

@ -296,10 +296,10 @@ export default {
```html
<van-field
v-model="state.value"
readonly
clickable
name="picker"
:value="state.value"
label="Picker"
placeholder="Select city"
@click="state.showPicker = true"
@ -342,10 +342,10 @@ export default {
```html
<van-field
v-model="state.value"
readonly
clickable
name="datetimePicker"
:value="state.value"
label="Datetime Picker"
placeholder="Select time"
@click="state.showPicker = true"
@ -385,10 +385,10 @@ export default {
```html
<van-field
v-model="state.value"
readonly
clickable
name="area"
:value="state.value"
label="Area Picker"
placeholder="Select area"
@click="state.showArea = true"
@ -432,10 +432,10 @@ export default {
```html
<van-field
v-model="state.value"
readonly
clickable
name="calendar"
:value="state.value"
label="Calendar"
placeholder="Select date"
@click="state.showCalendar = true"

View File

@ -323,10 +323,10 @@ export default {
```html
<van-field
v-model="state.value"
readonly
clickable
name="picker"
:value="state.value"
label="选择器"
placeholder="点击选择城市"
@click="state.showPicker = true"
@ -371,10 +371,10 @@ export default {
```html
<van-field
v-model="state.value"
readonly
clickable
name="datetimePicker"
:value="state.value"
label="时间选择"
placeholder="点击选择时间"
@click="state.showPicker = true"
@ -416,10 +416,10 @@ export default {
```html
<van-field
v-model="state.value"
readonly
clickable
name="area"
:value="state.value"
label="地区选择"
placeholder="点击选择省市区"
@click="state.showArea = true"
@ -465,10 +465,10 @@ export default {
```html
<van-field
v-model="state.value"
readonly
clickable
name="calendar"
:value="state.value"
label="日历"
placeholder="点击选择日期"
@click="state.showCalendar = true"

View File

@ -1,9 +1,21 @@
<template>
<demo-block :title="t('basicUsage')">
<van-row>
<van-image width="100" height="100" :src="image" />
</van-row>
</demo-block>
<img
v-if="lazyLoad"
v-lazy="src"
ref="imageRef"
:alt="alt"
:class="bem('image')"
:style="{ objectFit: fit }"
/>;
<img
v-else
:src="src"
:alt="alt"
:class="bem('image')"
:style="{ objectFit: fit }"
@load="onLoad"
@error="onError"
/>
<demo-block :title="t('fitMode')">
<van-row gutter="20">

View File

@ -118,7 +118,7 @@ Use `title` prop to set keyboard title.
### Bind Value
```html
<van-field readonly clickable :value="value" @touchstart.stop="show = true" />
<van-field v-model="value" readonly clickable @touchstart.stop="show = true" />
<van-number-keyboard
v-model="value"
:show="show"

View File

@ -131,7 +131,7 @@ export default {
可以通过 `v-model` 绑定键盘当前输入值。
```html
<van-field readonly clickable :value="value" @touchstart.stop="show = true" />
<van-field v-model="value" readonly clickable @touchstart.stop="show = true" />
<van-number-keyboard
v-model="value"
:show="show"

View File

@ -216,10 +216,10 @@ export default {
```html
<van-field
v-model="value"
readonly
clickable
label="City"
:value="value"
placeholder="Choose City"
@click="showPicker = true"
/>

View File

@ -240,10 +240,10 @@ export default {
```html
<van-field
v-model="value"
readonly
clickable
label="城市"
:value="value"
placeholder="选择城市"
@click="showPicker = true"
/>