klren0312 / daliy_knowledge

知识积累,正确使用方式是watch
21 stars 4 forks source link

swiper使用loop时,activeIndex不可用 #847

Open klren0312 opened 4 weeks ago

klren0312 commented 4 weeks ago

改成realIndex即可

const slideChange = (swiper: SwiperClass) => {
  activeIndex.value = swiper.realIndex + 1
}