1、轮播图在ios9以下都不能滑动
解决办法:
https://github.com/surmon-china/vue-awesome-swiper
npm install vue-awesome-swiper --save
全局引入
import Vue from 'vue'
import VueAwesomeSwiper from 'vue-awesome-swiper'
// require styles
import 'swiper/dist/css/swiper.css'
Vue.use(VueAwesomeSwiper, /* { default global options } */)
组件引入
import 'swiper/dist/css/swiper.css'
import { swiper, swiperSlide } from 'vue-awesome-swiper'
export default {
components: {
swiper,
swiperSlide
}
}
项目中的轮播图不需要自动轮播,但是点击需要查看图片大图的那种,也是可以左右滑动的,避免不了,初始下标的传递
<div class="swiper_pictures">
<swiper :options="swiperOption" ref="mySwiper">
<!-- slides -->
<swiper-sl