Closed
Description
Version: 2.15.0
Looks like emitting pauseAutoplay
and resumeAutoplay
causes some kind of multiple timeout instances. Once I emit those two methods, autoplay functionality will trigger doAutoplay
method multiple times ( depending on how many times i called resumeAutoplay
method.
This can be reproduced in official demo page https://antoniandre.github.io/vueper-slides/
Steps to reproduce:
- Navigate to Basic with Autoplay & Infinite section
- Press Pause button
- Press Resume button
- Autoplay is now sliding two items instead of one
Here's my code snippet
<vueper-slides
ref="banners"
:autoplay
fixed-height="6.875rem"
:duration="5000"
:bullets="bullets"
@previous="slide()"
@next="slide()">
<template v-slot:arrow-left>
<i class="icon icon-arrow-left" />
</template>
<template v-slot:arrow-right>
<i class="icon icon-arrow-right" />
</template>
<vueper-slide
v-for="banner in bannerItems"
:key="banner.id">
<template v-slot:content>
<a
:href="banner.url"
:target="getTarget(banner)">
<div
:style="{ backgroundImage: `url(${banner.resource.url})` }"
class="banner-image">
</div>
</a>
</template>
</vueper-slide>
</vueper-slides>
....
methods: {
slide() {
this.$refs.banners.pauseAutoplay();
this.$refs.banners.resumeAutoplay();
}
}
Metadata
Metadata
Assignees
Labels
No labels