mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
[new feature] ImagePreview: add swipe-duration prop (#3963)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user