< swiper class= "swiperctn": options= "mySwiperOption" ref= "mySwiper" >
<!-- slides -->
<swiper-slide>
1
</swiper-slide>
<swiper-slide>
2
</swiper-slide>
<swiper-slide>
3
</swiper-slide>
<div class="swiper-pagination" slot="pagination"></div>
<div class="swiper-button-prev" slot="button-prev"></div>
<div class="swiper-button-next" slot="button-next"></div>
</swiper>
data data is:
mySwiperOption:{}
then rewrite the value to mySwiperOption in the mounted () hook:
mountend(){
this.swiper.mySwiperOption = {
notNextTick:true,
centeredSlides: true,
slidesPerView: 1.5,
spaceBetween: 15,
// initialSlide:1,
loop: true,
}
}
but the swiper component hasn"t changed at all. Why?