<template>
  <div>
    <div class="row header">
      <span class="time">起火时间</span>
      <span class="person">人员伤亡数量</span>
      <span class="money">财产损失</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="time">{{ item[0] }}</span>
          <span class="person">{{ item[1] }}</span>
          <span class="money">{{ item[2] }}</span>
        </li>
      </ul>
    </VueSeamlessScroll>
  </div>
</template>

<script>
import VueSeamlessScroll from "vue-seamless-scroll";

export default {
  name: "HistoricalFire",
  data() {
    return {
      list: [
        ["09:23 05-14", "25", "9万元"],
        ["09:23 05-14", "12", "5万元"],
        ["09:23 05-14", "20", "8万元"],
        ["09:23 05-14", "9", "2万元"],
        ["09:23 05-14", "2", "2万元"],
        ["09:23 05-14", "4", "5万元"],
        ["09:23 05-14", "6", "8万元"],
      ],
    };
  },
  components: {
    VueSeamlessScroll,
  },
  computed: {
    classOption() {
      return {
        singleHeight: 46,
      };
    },
  },
};
</script>

<style scoped lang="less">
.warp {
  height: 258px;
  margin: 0 auto;
  overflow: hidden;
  .item {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    cursor: pointer;
  }
}

.header {
  color: #fff !important;
  height: 38px !important;
  line-height: 38px !important;
  background-color: rgba(0, 163, 255, 0.3) !important;
  margin-top: 2px;
  font-size: 10px !important;
}

li.row > span {
  text-align: center;
  font-size: 14px;
  position: relative;
  display: inline-block;
  &::before {
    position: absolute;
    content: "";
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: #1d525f;
    height: 14px;
    width: 1px;
  }
  &:nth-child(1) {
    &::before {
      height: 0px;
      width: 0px;
    }
  }
}

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: #44f1ff;
  .time,
  .person,
  .money {
    flex: 0.33;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}
</style>
