Jerry-Tom 发表于 2018-11-16 15:50:22

swiperOption设置属性没用

我在组件里设置的属性统统没用data() {
return {
    swiperOption: {
      // some swiper options/callbacks
      // 所有的参数同 swiper 官方 api 参数
      // ...
      freeMode: true,
      freeModeMomentumRatio: 0.5,
      slidesPerView: 'auto',
    }
}
},在main.js的属性才有反应
Vue.use(VueAwesomeSwiper,{   
freeMode: true,
freeModeMomentumRatio: 0.5,
slidesPerView: 'auto',})这是为什么呢????文档上写的可以啊?有遇到过得小伙伴么??????

Jerry-Tom 发表于 2018-11-16 16:53:13

我来回答我提出的问题吧
<swiper :options="swiperOption" ref="mySwiper" @someSwiperEvent="callback">
官方给的文档:options改成:option就好了,没有s
页: [1]
查看完整版本: swiperOption设置属性没用