<!--图片滚动-->
<template>
  <a-carousel arrows>
    <template #prevArrow>
      <div class="custom-slick-arrow" style="left: 10px; z-index: 1">
        <left-circle-outlined />
      </div>
    </template>
    <template #nextArrow>
      <div class="custom-slick-arrow" style="right: 10px">
        <right-circle-outlined />
      </div>
    </template>
    <div key="1">
      <img :src="banner01" />
    </div>
    <div key="2">
      <img :src="banner02" style="width: 100%;height:100%;object-fit: cover;"/>
    </div>
    <div key="3">
      <img :src="banner03" style="width: 100%;height:100%;object-fit: contain;"/>
    </div>
    <div key="4">
      <img :src="banner04" />
    </div>
    <div key="5">
      <img :src="banner05" />
    </div>
  </a-carousel>
</template>
<script>
    import {
    message
  } from '@hwork/ant-design-vue';

  import {
    defineComponent,
    onMounted,
    ref,
    watch,
    reactive,
    onUnmounted,
    computed
  } from "vue";

  // 导入图片
  import banner01 from '@/assets/image/banner/banner01.jpg';
  import banner02 from '@/assets/image/banner/banner02.jpg';
  import banner03 from '@/assets/image/banner/banner03.jpg';
  import banner04 from '@/assets/image/banner/banner04.jpg';
  import banner05 from '@/assets/image/banner/banner05.jpg';

  export default defineComponent({

    setup(props) {
      //当前仓库的信息汇总
      onMounted(() => {

      });
      onUnmounted(() => {

      });
      return {
        banner01,
        banner02,
        banner03,
        banner04,
        banner05
      };
    }
  });
</script>
<style scoped>
  /* For demo */
  :deep(.slick-slide) {
    text-align: center;
    height: 60%;
    max-height: 600px;
    line-height: 160px;
    /* background: #364d79; */
    background:#fff;
    overflow: hidden;
  }

  :deep(.slick-arrow.custom-slick-arrow) {
    width: 40px;
    height: 40px;
    font-size: 40px;
    color: #fff;
    background-color: rgba(5, 45, 61, 0.11);
    transition: ease all 0.3s;
    opacity: 0.3;
    z-index: 1;
  }

  :deep(.slick-arrow.custom-slick-arrow:before) {
    display: none;
  }

  :deep(.slick-arrow.custom-slick-arrow:hover) {
    color: #fff;
    opacity: 0.5;
  }

  :deep(.slick-slide h3) {
    color: #fff;
  }
  img {
      width: 100%; /* 设置图片宽度为100% */
      height: 100%; /* 设置图片高度为100% */
      /* objectfit: contain; */ /* 使图片保持宽高比并填满容器 contain */
       objectfit: cover; /* 使图片填充整个容器 */
  }
</style>
