<template>
  <div ref="mySwiper" v-swiper:mySwiper="swiperOption" class="swiper-container relative overflow-hidden w-full h-auto pt-24px pb-44px">
    <div class="swiper-pagination absolute text-center z-2">
      <span class="swiper-pagination-bullet swiper-pagination-bullet-active"></span>
    </div>
    <div class="swiper-wrapper flex relative w-268px h-full z-1">
      <div class="swiper-slide container relative w-268px h-auto">
        <HomeBlock>
          <img src="/images/home/mature_technology.png" alt="成熟的研发技术">
          <template slot="title">成熟的研发技术</template>
          <template slot="desc">拥有多年的技术积累，建立了完善的产品研发和迭代机制，为产品竞争力提供坚实保障。</template>
        </HomeBlock>
      </div>
      <div class="swiper-slide container relative w-268px h-auto">
        <HomeBlock>
          <img src="/images/home/full_pdf_transform.png" alt="全面的PDF和格式转换功能">
          <template slot="title">全面的PDF和格式转换功能</template>
          <template slot="desc">支持全面的PDF和转换功能，满足多样化需求，简单易用，企业替换、迁移无培训成本。</template>
        </HomeBlock>
      </div>
      <div class="swiper-slide container relative w-268px h-auto">
        <HomeBlock>
          <img src="/images/home/service_aftermarket.png" alt="优质的服务和售后保障体系">
          <template slot="title">优质的服务和售后保障体系</template>
          <template slot="desc">提供7*24小时的专业服务保障及技术支持，多种方式快速响应用户反馈, 解答疑问。</template>
        </HomeBlock>
      </div>
      <div class="swiper-slide container relative w-full h-auto">
        <HomeBlock>
          <img src="/images/home/intellectual_property.png" alt="自主知识产权">
          <template slot="title">自主知识产权</template>
          <template slot="desc">技术独立自主，符合国际标准， 帮助企业对接国际业务的同时，无需考虑版权风险。</template>
        </HomeBlock>
      </div>
    </div>
  </div>
</template>

<script>
import { directive } from 'vue-awesome-swiper'
import Dot from '~/assets/images/home/comment_dot.svg?inline'
export default {
  directives: {
    swiper: directive
  },
  components: {
    Dot
  },
  props: ['comment'],
  data () {
    return {
      swiperOption: {
        slidesPerView: 'auto',
        centeredSlides: true,
        pagination: {
          el: '.swiper-pagination',
          clickable: true
        }
      }
    }
  }
}
</script>

<style lang="scss" scoped>
  .swiper-container {
    .swiper-wrapper {
      -webkit-transition-property: -webkit-transform;
      transition-property: -webkit-transform;
      -o-transition-property: transform;
      transition-property: transform;
      transition-property: transform, -webkit-transform;
      -webkit-box-sizing: content-box;
      box-sizing: content-box;
    }
    .swiper-container-android .swiper-slide,
    .swiper-wrapper {
      -webkit-transform: translate3d(0px, 0, 0);
      transform: translate3d(0px, 0, 0);
    }
    .swiper-slide {
      -webkit-flex-shrink: 0;
      -ms-flex-negative: 0;
      flex-shrink: 0;
      -webkit-transition-property: -webkit-transform;
      transition-property: -webkit-transform;
      -o-transition-property: transform;
      transition-property: transform;
      transition-property: transform, -webkit-transform;
      margin-right: 16px;
    }
  }
  .swiper-container-horizontal > .swiper-pagination-bullets {
    bottom: 24px;
    left: 0;
    width: 100%;
    font-size: 0;
    ::v-deep .swiper-pagination-bullet {
      width: 8px;
      height: 4px;
      display: inline-block;
      margin: 0 2px;
      border-radius: 4px;
      background-color: #D8D8D8;;
      cursor: pointer;
      transition: width 0.3s;
      &.swiper-pagination-bullet-active {
        width: 27px;
        background: #1460F3;
      }
    }
  }
  .comment-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 20px 20px 30px;
    background-color: #FFFFFF;
    box-shadow: 0px 0px 31px rgba(0, 0, 0, 0.104048);
    border-radius: 10px;
  }
  @media screen and (max-width: 929px) {
    .container {
      max-width: 575px;
      padding: 0;
    }
  }
  @media screen and (max-width: 575px) {
    .container {
      max-width: 320px;
      padding: 0;
    }
  }
</style>
