- npm install
npm install vue-awesome-swiper@2.6.7 --save
// 或者
npm install vue-awesome-swiper --save
- 引入
import VueAwesomeSwiper from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
Vue.use(VueAwesomeSwiper)
- 代码部分
<swiper :options="swiperOption" >
<swiper-slide><img src="https://ke-xxx.oss-cn-hangzhou.aliyuncs.com/profilePhoto/em1.png"></swiper-slide>
<swiper-slide><img src="https://ke-xxx.oss-cn-hangzhou.aliyuncs.com/profilePhoto/em2.png"></swiper-slide>
<swiper-slide><img src="https://ke-xxx.oss-cn-hangzhou.aliyuncs.com/profilePhoto/em3.png"></swiper-slide>
<swiper-slide><img src="https://ke-xxx.oss-cn-hangzhou.aliyuncs.com/profilePhoto/em4.png"></swiper-slide>
<swip