mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs: fix image demo
This commit is contained in:
parent
4d49183230
commit
dedfe88ff8
@ -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"
|
||||
/>
|
||||
|
@ -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"
|
||||
/>
|
||||
|
@ -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"
|
||||
/>
|
||||
|
@ -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"
|
||||
/>
|
||||
|
@ -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">
|
||||
|
@ -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'"
|
||||
/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user