<template>
  <!-- 图片视频轮播 -->
  <div style="width: 100%;height: 100%;">
    <slideshow v-if="moldType == 1" :contentList="contentList" :sleepTime="sleepTime" :ifShow="ifShow" />
    <jssorSlider v-else-if="moldType == 3" :contentList="contentList" :sleepTime="sleepTime" :ifShow="ifShow"
      :swiperOptions="swiperOptions" />
    <SwiperCarousel v-else :contentList="contentList" :sleepTime="sleepTime" :ifShow="ifShow"
      :swiperOptions="swiperOptions" />

  </div>
</template>
<script>
import slideshow from "./slideshow.vue";
import SwiperCarousel from "./SwiperCarousel.vue";
import jssorSlider from "./jssorSlider.vue";
export default {
  name: "index",
  props: {
    //播放内容
    contentList: {
      type: Array,
      default: []
    },
    // 停留时间秒
    sleepTime: {
      type: Number,
      default: 3
    },
    ifShow: {
      type: Boolean,
      default: false
    },
    moldType: {
      type: Number,
      default: 1 //轮播模式  1 k字轮播滚动，2 使用 swiper 第三方组件进行轮播滚动 , 3 jssor-slider 第三方组件进行轮播滚动
    },
    swiperOptions: {
      type: Object,
      default: () => {
        return {};
      }
    }
  },
  components: {
    slideshow,
    SwiperCarousel,
    jssorSlider
  }
};
</script>
<style scoped></style>