docs(Swipe): update demo (#10061)

This commit is contained in:
neverland 2021-12-18 10:46:29 +08:00 committed by GitHub
parent 92fb70d6e8
commit 0002f1b1af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -120,8 +120,8 @@ export default {
<van-swipe-item>2</van-swipe-item>
<van-swipe-item>3</van-swipe-item>
<van-swipe-item>4</van-swipe-item>
<template #indicator="{ active }">
<div class="custom-indicator">{{ active + 1 }}/4</div>
<template #indicator="{ active, total }">
<div class="custom-indicator">{{ active + 1 }}/{{ total }}</div>
</template>
</van-swipe>

View File

@ -128,8 +128,8 @@ export default {
<van-swipe-item>2</van-swipe-item>
<van-swipe-item>3</van-swipe-item>
<van-swipe-item>4</van-swipe-item>
<template #indicator="{ active }">
<div class="custom-indicator">{{ active + 1 }}/4</div>
<template #indicator="{ active, total }">
<div class="custom-indicator">{{ active + 1 }}/{{ total }}</div>
</template>
</van-swipe>

View File

@ -90,8 +90,8 @@ const onChange = (index: number) => Toast(t('message') + index);
<van-swipe-item>2</van-swipe-item>
<van-swipe-item>3</van-swipe-item>
<van-swipe-item>4</van-swipe-item>
<template #indicator="{ active }">
<div class="custom-indicator">{{ active + 1 }}/4</div>
<template #indicator="{ active, total }">
<div class="custom-indicator">{{ active + 1 }}/{{ total }}</div>
</template>
</van-swipe>
</demo-block>