<template>
  <div class="body">
    <vTitle>园区概况</vTitle>
    <ul class="con">
      <li v-for="(item, i) in data" :key="i">
        <div class="img">
          <img :src="require(`@/assets/images/nenghao/${item.img}`)" alt="" />
          <img :src="require(`@/assets/images/nenghao/w${item.img}`)" alt="" />
        </div>
        <span>{{ item.num }}</span>
        <span v-html="item.danwei"></span>
        <span>{{ item.name }}</span>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  components: {},
  data() {
    return {
      data: [
        {
          name: "用电总量",
          num: "12,376,23",
          danwei: "(kwh)",
          img: "1.png",
        },
        {
          name: "同比节能",
          num: "16%",
          danwei: "&nbsp;",
          img: "2.png",
        },
        {
          name: "今日用电量",
          num: "26.587",
          danwei: "(kwh)",
          img: "3.png",
        },
      ],
    };
  },
  mounted() {},
};
</script>

<style lang="less" scoped>
.con {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-top: 60px;
  li {
    width: 30%;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    > span {
      font-size: 16px;
      color: #66b0c9;
      display: inline-block;
      margin-bottom: 8px;
      &:first-of-type {
        font-size: 24px;
      }
      &:last-of-type {
        color: #fff;
      }
    }
    .img {
      width: 90%;
      position: relative;
      > img {
        margin: 10px 0;
        width: 100%;
        &:last-of-type {
          position: absolute;
          top: -40%;
          left: 50%;
          transform: translateX(-50%);
          width: 48%;
          z-index: 9;
        }
      }
    }
  }
}
</style>
