<template>
    <div class="carousel">
        <swiper :options="swiperOption">

            <swiper-slide></swiper-slide>
<!--            <swiper-slide></swiper-slide>-->
<!--            <swiper-slide></swiper-slide>-->
<!--            <swiper-slide></swiper-slide>-->
            <div class="swiper-pagination" slot="pagination"></div>
        </swiper>
    </div>
</template>

<script>

  export default {
    name: 'carousel',
    data() {
      return {
        swiperOption: {
          pagination: {
            el: '.swiper-pagination',
            clickable : true,
            bulletClass: 'my-bullet',
            bulletActiveClass: 'my-bullet-active'
          },
          effect:'fade',
          autoplay: {
            delay: 10000,
            disableOnInteraction: true
          },
        }
      }
    }
  }
</script>

<style lang="less" scoped>
    .carousel {
        width: 100%;
        height: 100%;
        position: relative;
        .swiper-container {
            height: 100%;
            .swiper-slide {
                background-position: center;
                background-repeat: no-repeat;
                background-size: cover;
                background-attachment: scroll;
                height: 100%;
                text-align: center;
                font-size: 18px;
                //&:nth-of-type(1) {
                //    background: url('https://file.funcheergame.com/office/image/index/carousel_04.png') center top / cover no-repeat;
                //}
                //&:nth-of-type(2) {
                //    background: url('https://file.funcheergame.com/office/image/index/carousel_03.png') center top / cover no-repeat;
                //}
                &:nth-of-type(1) {
                    background: url('https://file.funcheergame.com/office/image/index/carousel_01.png') center top / cover no-repeat;
                }
                //&:nth-of-type(4) {
                //    background: url('https://file.funcheergame.com/office/image/index/carousel_02.png') center top / cover no-repeat;
                //}
            }
        }

    }


</style>
