Only load timeline in active slide
This commit is contained in:
parent
6383babe04
commit
30beffab78
2 changed files with 8 additions and 0 deletions
|
@ -44,6 +44,9 @@
|
||||||
"
|
"
|
||||||
@swiper="setSwiperRef"
|
@swiper="setSwiperRef"
|
||||||
@slide-change="onSlideChange"
|
@slide-change="onSlideChange"
|
||||||
|
:touch-angle="25"
|
||||||
|
:threshold="10"
|
||||||
|
:centeredSlides="true"
|
||||||
>
|
>
|
||||||
<swiper-slide
|
<swiper-slide
|
||||||
v-for="index in timelines"
|
v-for="index in timelines"
|
||||||
|
@ -51,6 +54,7 @@
|
||||||
:virtual-index="index"
|
:virtual-index="index"
|
||||||
>
|
>
|
||||||
<XTimeline
|
<XTimeline
|
||||||
|
v-if="index == timelines[swiperRef.activeIndex]"
|
||||||
ref="tl"
|
ref="tl"
|
||||||
:key="src"
|
:key="src"
|
||||||
class="tl"
|
class="tl"
|
||||||
|
|
|
@ -113,6 +113,10 @@ html, body {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.swiper-slide {
|
||||||
|
height: unset !important;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
Loading…
Reference in a new issue