<template>
  <div>
    <div class="row header">
      <span class="type">序号</span>
      <span class="count">区域</span>
      <span class="time">总数(栋)</span>
      <span class="unit">有物联网(栋)</span>
      <span class="is_notice">占比%</span>
    </div>
    <VueSeamlessScroll :data="list" :class-option="classOption" class="warp">
      <ul class="item">
        <li class="row" v-for="(item, index) in list" :key="index">
          <span class="type">{{ index + 1 }}</span>
          <span class="count">{{ item[0] }}</span>
          <span class="time">{{ item[1] }}</span>
          <span class="unit">{{ item[2] }}</span>
          <span class="is_notice">{{ item[3] }}</span>
        </li>
      </ul>
    </VueSeamlessScroll>
  </div>
</template>

<script>
import VueSeamlessScroll from "vue-seamless-scroll";
export default {
  name: "RegionalComp",
  components: {
    VueSeamlessScroll,
  },
  data() {
    return {
      list: [
        ["万州区", "1200", "123", "23%"],
        ["九龙坡起", "1598", "47", "35%"],
        ["南川区", "1290", "38", "12%"],
        ["璧山区", "1198", "200", "8%"],
        ["渝北区", "6573", "89", "48%"],
        ["渝北区", "6573", "120", "48%"],
        ["渝北区", "6573", "134", "48%"],
        ["渝北区", "6573", "145", "48%"],
        ["渝北区", "6573", "190", "48%"],
      ],
    };
  },
  computed: {
    classOption() {
      return {
        singleHeight: 51,
      };
    },
  },
};
</script>
<style scoped lang="less">
.warp {
  height: 521px;
  margin: 0 auto;
  overflow: hidden;
  .item {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    cursor: pointer;
  }
}

.header {
  color: #61DBFF !important;
  height: 38px !important;
  background-color: rgba(0, 163, 255, 0.3) !important;
  margin-top: 2px;
  letter-spacing: 1px;
  .is_notice {
    line-height: 19px;
    font-size: 10px;
  }
}

li.row > span {
  text-align: center;
  font-size: 14x;
  position: relative;
  display: inline-block;
}

li.row {
  //   border-bottom: 1px dotted #1d525f;
  box-sizing: border-box;
}

.row,
li,
a {
  display: block;
  height: 46px;
  line-height: 46px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  background-color: rgba(0, 0, 0, 0.2);
  color: #fff;
  margin-top: 5px;
  .time,
  .type,
  .count,
  .unit,
  .is_notice {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .time {
    flex: 0.2;
  }
  .type {
    flex: 0.12;
  }
  .count {
    flex: 0.2;
  }
  .unit {
    color: #61DBFF;
    flex: 0.35;
  }
  .is_notice {
    flex: 0.15;
  }
}
</style>
