美文网首页
vue.js 中swiper 配置

vue.js 中swiper 配置

作者: 南台观芸秀 | 来源:发表于2020-01-27 15:10 被阅读0次
swiperOption: {
        //以下配置不懂的,可以去swiper官网看api,链接http://www.swiper.com.cn/api/
        // notNextTick是一个组件自有属性,如果notNextTick设置为true,组件则不会通过NextTick来实例化swiper,也就意味着你可以在第一时间获取到swiper对象,<br data-filtered="filtered">        假如你需要刚加载遍使用获取swiper对象来做什么事,那么这个属性一定要是true
        notNextTick: true,
        // swiper configs 所有的配置同swiper官方api配置
        autoplay: true,
        speed:1000,
        setWrapperSize: true,
        autoHeight: true,
        pagination: ".swiper-pagination",
        paginationClickable: true,
        mousewheelControl: true,
        observeParents: true,
        // 如果自行设计了插件,那么插件的一些配置相关参数,也应该出现在这个对象中,如下debugger
        debugger: true,
        loop : true,
        navigation: {
          nextEl: ".swiper-button-next",
          prevEl: ".swiper-button-prev"
        },
        pagination: {
          el: ".swiper-pagination",
          clickable: true
        }
      }```

相关文章

网友评论

      本文标题:vue.js 中swiper 配置

      本文链接:https://www.haomeiwen.com/subject/cikethtx.html