when vue-awesome-swiper, turns the page, the animation written in the page does not execute
search from the Internet, people say that it is OK to add onInit
and onSlideChangeEnd
, but it is not useful for me to add it.
also says that adding observer:true;
has no effect.
related codes
<swiper :options="swiperOption">
<swiperSlide class="slide slide1">
<div class="slide1-word1 animated vanishIn"></div>
<div class="slide1-word2 animated pulse loop"></div>
<div class="slide1-title animated pulse loop"></div>
<div class="slide1-pic animated zoomIn"></div>
</swiperSlide>
<swiperSlide class="slide slide2">
<div class="slide2-title animated slideInDown"></div>
<div class="slide2-word1 animated ball"></div>
<div class="slide2-picts"></div>
<div class="slide2-start animated slowFlash"></div>
<div class="slide2-jt animated topGuide loop"></div>
</swiperSlide>
</swiper>
swiperOption: {
direction: "vertical",
slidesPerView: 1,
observer: true,
observeParents: true,
onInit: function(swiper) {
swiperAnimateCache(swiper);
swiperAnimate(swiper);
},
onSlideChangeEnd: function(swiper) {
swiperAnimate(swiper);
}
}