<template>
  <div class="body">
    <vTitle
      ><span>视频监控</span><span class="time">2021 / 11 / 25</span></vTitle
    >
    <div class="con">
      <img :src="require(`@/assets/images/jiankong/thumb.png`)" alt="" />
      <p>鹏城云脑主干道</p>
      <swiper
        :slides-per-view="3"
        :space-between="16"
        :centered-slides-bounds="true"
        :centered-slides="true"
        :initial-slide="1"
        navigation
        @swiper="onSwiper"
        @slideChange="onSlideChange"
        class="ul"
      >
        <swiper-slide class="li" v-for="(item, i) in 10" :key="i">
          <img :src="require(`@/assets/images/jiankong/thumb.png`)" alt="" />
        </swiper-slide>
      </swiper>
    </div>
  </div>
</template>

<script>
import { Navigation, Swiper, SwiperSlide } from "swiper/vue/swiper-vue.js";
// Import Swiper styles
import "swiper/swiper.min.css";
export default {
  data() {
    return {
      data: [
        {
          name: "综合大楼",
          num: "376,23",
          img: "1.png",
          color: "#0ad5ff",
        },
        {
          name: "学术交流中心",
          num: "276,23",
          img: "2.png",
          color: "#66B0C9",
        },
        {
          name: "公寓楼",
          num: "453",
          img: "3.png",
          color: "#E0B822",
        },
      ],
    };
  },
  components: {
    Swiper,
    SwiperSlide,
  },
  setup() {
    const onSwiper = (swiper) => {
      console.log(swiper);
    };
    const onSlideChange = () => {
      console.log("slide change");
    };
    return {
      onSwiper,
      onSlideChange,
      modules: [Navigation],
    };
  },
  mounted() {},
};
</script>

<style lang="less" scoped>
.con {
  text-align: center;
  > p {
    font-size: 20px;
    text-align: left;
    margin: 4px 0;
  }
  > img {
    width: 98%;
  }
  > ul {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;

    li {
      width: 30%;
      margin: 10px 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      > span {
        font-size: 16px;
        &:first-of-type {
          font-size: 24px;
        }
      }
      > img {
        width: 90%;
        margin: 10px 0;
      }
    }
  }
  .ul {
    padding: 20px 6px;
    .li {
      > img {
        width: 100%;
      }
    }
  }
}
</style>

<style lang="less">
.swiper-slide {
  opacity: 0.6;
}
.swiper-slide-active {
  opacity: 1;
  box-shadow: 0 3px 20px #00f5e7;
}
</style>
