<template>
  <swiper class="swiper simple-swiper" :options="swiperOption">
    <swiper-slide v-for="(item, index) in imageList" :key="index">
      <img :src="item" class="slide" />
    </swiper-slide>
    <div class="swiper-pagination" slot="pagination"></div>
  </swiper>
</template>

<script>
import { Swiper, SwiperSlide } from 'vue-awesome-swiper'

export default {
  name: 'simple-swiper',
  components: {
    Swiper,
    SwiperSlide,
  },
  props: {
    imageList: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {
      swiperOption: {
        pagination: {
          el: '.swiper-pagination',
          clickable: true,
        },
        autoplay: true,
      },
    }
  },
}
</script>

<style scoped lang="scss">
.simple-swiper {
  height: 100%;

  ::v-deep {
    .swiper-pagination-bullet-active {
      background: #535353 !important;
    }
  }

  .slide{
    display: block;
    width: 100%;
  }
}
</style>
