vue-awesome-swiper autoplay 작동안할 때 > IT 기술백서

IT 기술백서

직접 알아내거나 검색하기 귀찮아서 모아 둔 것

JavaScript | vue-awesome-swiper autoplay 작동안할 때

본문

v4.1.1 에서 autoplay 가 제대로 작동안하는것 같다.

아래와 같이 해 주면 작동한다.

 

[code]

 

 

import Vue from 'vue'

import {

  Swiper as SwiperClass,

  Pagination,

  Mousewheel,

  Autoplay,

} from 'swiper/swiper.esm'

import getAwesomeSwiper from 'vue-awesome-swiper/dist/exporter'

import 'swiper/swiper-bundle.css'


SwiperClass.use([Pagination, Mousewheel, Autoplay])

Vue.use(getAwesomeSwiper(SwiperClass))

const { Swiper, SwiperSlide } = getAwesomeSwiper(SwiperClass)

 

export default {

  components: {

    Swiper,

    SwiperSlide,

  },

  data() {

    return swiperOption: {

      autoplay: {

        delay:2500,

      }

    }

  }

  ...

}

[/code]

 

- 옵션개체들 -

 

Swiper - core library

Virtual - Virtual Slides module

Keyboard - Keyboard Control module

Mousewheel - Mousewheel Control module

Navigation - Navigation module

Pagination - Pagination module

Scrollbar - Scrollbar module

Parallax - Parallax module

Zoom - Zoom module

Lazy - Lazy module

Controller - Controller module

A11y - Accessibility module

History - History Navigation module

HashNavigation - Hash Navigation module

Autoplay - Autoplay module

EffectFade - Fade Effect module

EffectCube - Cube Effect module

EffectFlip - Flip Effect module

EffectCoverflow - Coverflow Effect module

댓글 0개

등록된 댓글이 없습니다.

Menu