Closed christian-nils closed 4 years ago
If we have slide number in slide, it will just be a pass-down property from slideshow. It will be more or less the same to access this.$parent. currentSlideIndex
.
I would say given the complexity of your slide component, you might want to use mixin for you slide, in this way you can store the slide number as data
in your slide.
Alright! Thanks for the tips @yaodingyd! Have a great day
Hi!
I was wondering, is it possible to access the slide number in the slide component? According to https://github.com/Zulko/eagle.js/issues/29, you can use the variable
currentSlideIndex
in theSlideshow
component. However, my slides have different background and it may be easier to access the variable within the slides.What do you think would be the easiest way? I am modifying the Slide component right now to get the variable. But maybe there is a better way.
Thanks!
/CN
Edit: I have added two
slots
to the original slide template, I have now "header", "content", "footer" (instead of only "content"). If someone is interested -> https://github.com/christian-nils/eagle.js Then it is just sufficient to create your header or footer in your Slideshow component. For instance, below I have implemented my footer, it includes three parts (left, center, right).