docs(ImagePreview): fix missing parameters (#12955)

This commit is contained in:
Icey Wu 2024-06-22 19:20:04 +08:00 committed by GitHub
parent 8ca1d414c8
commit ad117d5ffd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -194,7 +194,7 @@ When you customize the image through the `image` slot, you can bind the `style`
:close-on-click-image="false" :close-on-click-image="false"
> >
<template #image="{ src, style, onLoad }"> <template #image="{ src, style, onLoad }">
<img :style="[{ width: '100%' }, style]" @load="onLoad" /> <img :src="src" :style="[{ width: '100%' }, style]" @load="onLoad" />
</template> </template>
</van-image-preview> </van-image-preview>
``` ```

View File

@ -195,7 +195,7 @@ export default {
:close-on-click-image="false" :close-on-click-image="false"
> >
<template #image="{ src, style, onLoad }"> <template #image="{ src, style, onLoad }">
<img :style="[{ width: '100%' }, style]" @load="onLoad" /> <img :src="src" :style="[{ width: '100%' }, style]" @load="onLoad" />
</template> </template>
</van-image-preview> </van-image-preview>
``` ```