Zulko / eagle.js

A hackable slideshow framework built with Vue.js
https://zulko.github.io/eaglejs-demo/
ISC License
4.08k stars 223 forks source link

Jump back to first slide after last #57

Closed Allanon29 closed 6 years ago

Allanon29 commented 6 years ago

Is there a recommended way to jump back to the first slide after reaching the last?

Allanon29 commented 6 years ago

Solved it:

mounted(){
            setInterval(() => {
                this.nextSlide()
            }, 4000);
            this.onEndExit = function(){
                this.currentSlideIndex = 1
            }
        }
ruudboon commented 5 years ago

When using this method vue generates a warning. What is a better way to attach the event?

vue.common.js?e881:593 [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "onEndExit"