swiper.vue 1.88 KB
<template>
  <div class="swiper" v-if="list && list.length > 0">
    <div class="swiper-item swiper-item-left">
      <LayoutLink :href="list[0].url" class="img-link" :report="{PAGE_URL, ...list[0].reportParams}" reportEvent="XY_UFO_MAIN_EVENT">
        <ImageFormat :lazy="false" class="item-imge" :src="list[0].src" :width="310" :height="402"></ImageFormat>
      </LayoutLink>
    </div>
    <div class="swiper-item swiper-item-right">
      <LayoutLink :href="list[1].url" class="img-link" :report="{PAGE_URL, ...list[1].reportParams}" reportEvent="XY_UFO_MAIN_EVENT">
        <ImageFormat :lazy="false" class="item-imge" :src="list[1].src" :width="380" :height="196"></ImageFormat>
      </LayoutLink>
      <LayoutLink :href="list[2].url" class="img-link img-link2" :report="{PAGE_URL, ...list[2].reportParams}" reportEvent="XY_UFO_MAIN_EVENT">
        <ImageFormat :lazy="false" class="item-imge" :src="list[2].src" :width="380" :height="196"></ImageFormat>
      </LayoutLink>
    </div>
  </div>
</template>

<script>
import VideoPlayer from "@/components/video-player";

export default {
  name: 'swiper',
  props: {
    list: {
      type: Array,
    },
    PAGE_URL: {
      type: String,
    }
  },
  data() {
    return {
      params: {},
    }
  },
  mounted() {
    console.log(this.list)
  },
  methods: {

  },
};
</script>

<style lang="scss" scoped>
.swiper {
  display: flex;
  align-content: stretch;
  justify-content: space-between;
  height: 402px;
  margin-left: 8px;
  margin-right: 8px;

  .swiper-item-left {
    width: 44%;
  }

  .swiper-item-right {
    width: 54.5%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    .img-link {
      height: 196px;
    }
  }

  .img-link {
    max-height: 100%;
    display: block;
    border-radius: 8px;
    overflow: hidden;

    img {
      width: 100%;
      height: 100%;
      display: block;
    }
  }
}
</style>