<template>
  <div>
    <div
      class="TapItemMesssage"
      v-for="(item, index) in RiskArealist"
      :key="index"
    >
      <!-- <div v-if="isLoad">
        <van-skeleton
          title
          :row="2"
          style="padding-top: 5vw; padding-bottom: 5vw"
        >
        </van-skeleton>
      </div> -->

      <div>
        <div class="title">
          <span>{{ item.area_name }}</span>
        </div>
        <div class="area" v-for="(item, index) in item.communitys" :key="index">
          <span>{{ item }}</span>
          <span class="sicklevel" :style="showriskcolor">{{
            showsicklevel
          }}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
// import Vue from "vue";
// import { Skeleton } from "vant";
// Vue.use(Skeleton);

export default {
  name: "TapItemMesssage",
  props: {
    RiskArealist: {
      type: Array,
      default() {
        return [];
      },
    },
    // 颜色
    riskcolor: {
      type: String,
      default() {
        return "#800000";
      },
    },
    // 中风险|高风险
    sicklevel: {
      type: String,
      default() {
        return "风险确认中";
      },
    },
  },
  data() {
    return {};
  },
  computed: {
    // 展示颜色
    showriskcolor() {
      return { color: this.riskcolor };
    },
    // 展示风险
    showsicklevel() {
      return this.sicklevel;
    },
  },
};
</script>

<style scoped>
.TapItemMesssage {
  background-color: #fff;
  padding-left: 5vw;
  padding-right: 5vw;
  /* border-top: 1px solid rgb(151, 151, 151); */
  margin-bottom: 4vw;
  border-radius: 2vw;
  padding-bottom: 8vw;
}
.title {
  line-height: 7vw;
  height: auto;
  border-bottom: 0.1vw solid rgb(151, 151, 151);
  font-size: 4.5vw;
  font-weight: bold;
      padding-top: 4vw;
    padding-bottom: 4vw;
}
.area {
  /* display: flex;
  justify-content: space-between; */
  line-height: 8vw;
  height: auto;
  padding-bottom: 4vw;
  padding-top: 4vw;
}
.sicklevel {
  float: right;
  color: red;
}
</style>