How does vue-awesome-swiper initialize the options property in mounted?

< 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?

Mar.23,2021

need to re-init after rewriting


does swiper have the API init


refer to http://www.swiper.com.cn/api/.
in which the Basic option init

Menu