swiper5.4版本配合vue-awesome-swiper4.1版本使用。
swiper自带的方法需4.0以上版本才能启用 。(此处悲痛踩坑...)
引入方法
import VueAwesomeSwiper from 'vue-awesome-swiper'
// import style (<= Swiper 5.x)
import 'swiper/css/swiper.css'
Vue.use(VueAwesomeSwiper, /* { default options with global component } */ )
tab区
<ul>
<li @click="tabClick(0)" :class="{ active: nowIndex === 0 }">
tab1
</li>
<li @click="tabClick(1)" :class="{ active: nowIndex === 1 }">
tab2
</li>
<li @click="tabClick(2)" :class="{ active: nowIndex === 2 }">
tab3
</li>
</ul>
swiper区
<