egjs-flicking
egjs-flicking copied to clipboard
Autoplay is not working for Child flicking [vue 2 ]
Description
Hi Guys, I tried to add Autoplay in the child fliking but the Autoplay doesn't work for child here is my code
Style
<Flicking
:options="{ align: 'prev', circular: false}"
@move-end="onMoveEnd"
:plugins="plugins"
>
<div
class="col-12 col-sm-6 col-md-4 col-lg-3"
v-for="event in eventList"
:key="event._id"
>
<b-card>
<template #header>
<div>
<h5>{{ truncate1(event.projectName, 25) }}</h5>
</div>
</template>
<b-img-lazy
:src="event.logoUrl"
alt="Image 1"
v-bind="mainProps"
></b-img-lazy>
<template #footer>
<div class="flicking-panel nested-wide">
<flicking :plugins="pluginsChild" :options="{ align: 'prev',nested: true, circular: false}">
<div class="flicking-panel">
{{ timeLeft(event) }} Days Left
</div>
<div class="flicking-panel">100 user participated</div>
<div class="flicking-panel">our rank is #100</div>
<div slot="viewport" class="flicking-pagination"></div>
</flicking>
</div>
<small @click="gotoUrl(event.slug)" class="text-muted"
>Participate Now →
</small>
</template>
</b-card>
</div>
<div slot="viewport" class="flicking-pagination"></div>
</Flicking>
Script
plugins: [new Pagination({ type: "scroll" })],
pluginsChild: [
new Pagination({ type: "scroll" }),new AutoPlay()
],
When I tried to use the AutoPlay in the Parent Component it worked fine
Hello @vikramIde.
We checked that your child Flickings are using a single AutoPlay instance that is in pluginsChild. All child Flickings must use separate AutoPlay instances for each AutoPlay to work. You can check the this demo that gives examples of AutoPlay working properly and examples which it doesn't.
In addition, when using the multiple pagination plugin, you may use a selector other than flicking-pagination.
I hope this can help you. Please let us know if you encounter further issues.
Since there is no further comment, we will close the issue.