vue-swiper

引入

import VueAwesomeSwiper from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
Vue.use(VueAwesomeSwiper)

使用

数据

 data() {
        return {
          arr: [
            {url: 'static/1.png'},
            {url: 'static/2.png'},
            {url: 'static/3.png'},
            {url: 'static/4.png'},
            {url: 'static/5.png'},
          ],
          swiperOption: {
            pagination: {
              el: '.swiper-pagination'
            },
            autoplay: {
              delay: 1500,
              disableOnInteraction: false
            },
            spaceBetween: 30,
            loop: true
          },

 

你可能感兴趣的:(Vu)