mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs(ImagePreview): fix component call demo
This commit is contained in:
parent
476e16ff2d
commit
f0675d043a
@ -82,7 +82,7 @@ setTimeout(() => {
|
||||
### Component Call
|
||||
|
||||
```html
|
||||
<van-image-preview v-model="show" :images="images" @change="onChange">
|
||||
<van-image-preview v-model:show="show" :images="images" @change="onChange">
|
||||
<template v-slot:index>Page: {{ index }}</template>
|
||||
</van-image-preview>
|
||||
```
|
||||
|
@ -116,7 +116,7 @@ setTimeout(() => {
|
||||
如果需要在图片预览内嵌入组件或其他自定义内容,可以使用组件调用的方式,调用前需要通过 `app.use` 注册组件。
|
||||
|
||||
```html
|
||||
<van-image-preview v-model="show" :images="images" @change="onChange">
|
||||
<van-image-preview v-model:show="show" :images="images" @change="onChange">
|
||||
<template v-slot:index>第{{ index }}页</template>
|
||||
</van-image-preview>
|
||||
```
|
||||
|
@ -28,7 +28,11 @@
|
||||
<van-cell is-link @click="componentCall">
|
||||
{{ t('componentCall') }}
|
||||
</van-cell>
|
||||
<van-image-preview v-model="show" :images="images" @change="onChange">
|
||||
<van-image-preview
|
||||
v-model:show="show"
|
||||
:images="images"
|
||||
@change="onChange"
|
||||
>
|
||||
<template #index>{{ t('index', index) }}</template>
|
||||
</van-image-preview>
|
||||
</demo-block>
|
||||
|
Loading…
x
Reference in New Issue
Block a user