autoPlay stop with warning
Closed this issue · 6 comments
When switching from the second image to the third one, the following error occurs:
TypeError: Cannot read property 'index' of undefined"
Images are imported using require from local.
Is something wrong with me?
(6.0.0)
vueFlux: {
options: {
allowFullscreen: false,
allowToSkipTransition: false,
autohideTime: 500,
autoplay: true,
bindKeys: false,
delay: 1000,
enableGestures: false,
infinite: false,
lazyLoad: true,
lazyLoadAfter: 3,
},
images: [],
},
load image as code
for (let cur = 1; cur <= $_count; cur++) {
this.vueFlux.images.push(require(`@/assets/images/${cur}.jpg`));
this.cntLoadImages += 1;
}
and watch on cntLoadImage, and turn show flag
On the demo page, I touched some of the options, and it seems that the problem occurs when autoPlay: true and infinity: false.
may I use this option always be used as true together?
Hello, and thanks for reporting.
About the required images, you are passing the blob images instead of the url string. Do not use required, just pass the string and update the path to the static image url.
There are not incompatible options, so you can use autoplay and inifity without a problem. I will review the options that you mention.
Thanks!
Did you get any warning using the options in your project?
I've been doing some tests and I don't get any warning.
I was able to reproduce it disabling Infinite and pressing play. I will review, fix and make a new release this week.
Thanks a lot for your help!
Hello, I fixed the infinite option in the new release 6.0.1
Thanks a lot for the help and have a nice weekend!