Disables skeleton when using autoPlay or loopSlides.

This commit is contained in:
Mateus Machado Luna 2019-10-29 13:20:46 -03:00
parent 0a742974ff
commit 6b40540a12
3 changed files with 6 additions and 5 deletions

View File

@ -121,7 +121,7 @@
</div> </div>
<!-- Swiper buttons are hidden as they actually swipe from slide to slide --> <!-- Swiper buttons are hidden as they actually swipe from slide to slide -->
</div> </div>
<div v-else-if="isLoading && !autoPlay"> <div v-else-if="isLoading && !autoPlay && !loopSlides">
<div :class="'tainacan-carousel has-arrows-' + arrowsPosition"> <div :class="'tainacan-carousel has-arrows-' + arrowsPosition">
<swiper <swiper
role="list" role="list"

View File

@ -59,6 +59,7 @@
}"> }">
<swiper-slide <swiper-slide
role="listitem" role="listitem"
ref="myItemSwiperSlide"
:key="index" :key="index"
v-for="(item, index) of items" v-for="(item, index) of items"
class="item-list-item"> class="item-list-item">
@ -121,7 +122,7 @@
</div> </div>
<!-- Swiper buttons are hidden as they actually swipe from slide to slide --> <!-- Swiper buttons are hidden as they actually swipe from slide to slide -->
</div> </div>
<div v-else-if="isLoading && !autoPlay"> <div v-else-if="isLoading && !autoPlay && !loopSlides">
<div :class="'tainacan-carousel has-arrows-' + arrowsPosition"> <div :class="'tainacan-carousel has-arrows-' + arrowsPosition">
<swiper <swiper
role="list" role="list"
@ -133,7 +134,7 @@
<swiper-slide <swiper-slide
role="listitem" role="listitem"
:key="index" :key="index"
ref="myItemSwiper" ref="myItemSwiperSlideSkeleton"
v-for="(item, index) of 18" v-for="(item, index) of 18"
class="item-list-item skeleton"> class="item-list-item skeleton">
<a> <a>
@ -219,7 +220,7 @@ export default {
1600: { slidesPerView: 6 }, 1600: { slidesPerView: 6 },
}, },
autoplay: this.autoPlay ? { delay: this.autoPlaySpeed*1000 } : false, autoplay: this.autoPlay ? { delay: this.autoPlaySpeed*1000 } : false,
loop: this.loopSlides loop: this.loopSlides ? this.loopSlides : false
}, },
errorMessage: 'No items found.' errorMessage: 'No items found.'
} }

View File

@ -111,7 +111,7 @@
</div> </div>
<!-- Swiper buttons are hidden as they actually swipe from slide to slide --> <!-- Swiper buttons are hidden as they actually swipe from slide to slide -->
</div> </div>
<div v-else-if="isLoading && !autoPlay"> <div v-else-if="isLoading && !autoPlay && !loopSlides">
<div :class="'tainacan-carousel has-arrows-' + arrowsPosition"> <div :class="'tainacan-carousel has-arrows-' + arrowsPosition">
<swiper <swiper
role="list" role="list"