docs: fix image demo

This commit is contained in:
chenjiahan 2020-12-27 17:00:30 +08:00
parent 4d49183230
commit dedfe88ff8
6 changed files with 10 additions and 22 deletions

View File

@ -1,10 +1,10 @@
<template>
<van-field
v-model="value"
readonly
clickable
name="area"
:label="t('picker')"
:model-value="value"
:placeholder="t('placeholder')"
@click="showArea = true"
/>

View File

@ -1,10 +1,10 @@
<template>
<van-field
v-model="value"
readonly
clickable
name="calendar"
:label="t('calendar')"
:model-value="value"
:placeholder="t('placeholder')"
@click="showCalendar = true"
/>

View File

@ -1,10 +1,10 @@
<template>
<van-field
v-model="value"
readonly
clickable
name="datetimePicker"
:label="t('label')"
:model-value="value"
:placeholder="t('placeholder')"
@click="showPicker = true"
/>

View File

@ -1,10 +1,10 @@
<template>
<van-field
v-model="value"
readonly
clickable
name="picker"
:label="t('picker')"
:model-value="value"
:placeholder="t('placeholder')"
@click="showPicker = true"
/>

View File

@ -1,21 +1,9 @@
<template>
<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('basicUsage')">
<van-row>
<van-image width="100" height="100" :src="image" />
</van-row>
</demo-block>
<demo-block :title="t('fitMode')">
<van-row gutter="20">

View File

@ -15,10 +15,10 @@
{{ t('button5') }}
</van-cell>
<van-field
v-model="value"
readonly
clickable
:label="t('bindValue')"
:model-value="value"
:placeholder="t('clickToInput')"
@touchstart.stop="keyboard = 'bindValue'"
/>