|
同一页面,多个组件中都使用了swiper组件,但是当改变swiper左右前进按钮的时候,会引发多个swiper互串,一个按钮控制多个swiper组件内块的滑动
- <swiper :options="swiperOption">
- <swiper-slide>
-
- </swiper-slide>
- <div class="swiper-pagination" slot="pagination"></div>
- <div class="swiper-button-prev" slot="button-prev">
- <i class="ivu-icon ivu-icon-ios-arrow-back"></i>
- </div>
- <div class="swiper-button-next" slot="button-next">
- <i class="ivu-icon ivu-icon-ios-arrow-forward"></i>
- </div>
复制代码- <div class="swiper-wrap">
- <swiper :options="swiperOption" ref="mySwiper">
- <swiper-slide >
-
- </swiper-slide>
- <div class="swiper-pagination" slot="pagination"></div>
- </swiper>
- <div class="swiper-button-prev" slot="button-prev">
- <i class="ivu-icon ivu-icon-ios-arrow-back"></i>
- </div>
- <div class="swiper-button-next" slot="button-next">
- <i class="ivu-icon ivu-icon-ios-arrow-forward"></i>
- </div>
- </div>
复制代码 第一个和第二个swiper的 swiper-button-next和swiper-button-prev会相互控制
|
|