[new feature] ImagePreview: add swipe-duration prop (#3963)

This commit is contained in:
drafish
2019-07-25 19:01:01 +08:00
committed by neverland
parent dc0e71556b
commit f52890cfd6
5 changed files with 12 additions and 0 deletions

View File

@@ -37,6 +37,7 @@
<van-image-preview
v-model="show"
:images="images"
:swipe-duration="300"
@change="onChange"
>
<template #index>{{ $t('index', index) }}</template>
@@ -93,6 +94,7 @@ export default {
showImagePreview(position, timer) {
const instance = ImagePreview({
images,
swipeDuration: 300,
asyncClose: !!timer,
closeOnPopstate: true,
startPosition: typeof position === 'number' ? position : 0