<template>
  <div>
    <ul>
      <template v-if="data.length">
        <template v-for="(item, index) in data">
          <li :key="index">
            <img v-if="type === 1" :src="item.photo_uri" alt="">
            <div class="info">
              <div class="name">{{ item.title }}</div>
              <div class="p">{{ item.summary }}</div>
            </div>
          </li>
        </template>
      </template>
      <template v-else>
        <div class="no-data">暂无数据</div>
      </template>
    </ul>
  </div>
</template>

<script>
  export default {
    data() {
      return {}
    },
    props: {
      data: {
        type: Array,
        default: {}
      },
      type: {
        type: Number,
        default: 0
      }
    }
  }
</script>
<style lang="scss" scoped>
ul{
  width: 100%;
  .no-data{
    width: 100%;
    text-align: center;
    color: #999;
    font-size: 26px;
  }
  li{
    cursor: pointer;
    display: flex;
    border-bottom: 1px solid #F5F6F7;
    padding: 30px 0;
    img{
      width: 120px;
      // height: 140px;
    }
    .info{
      margin-left: 20px;
    }
    .name{
      font-size: 16px;
      font-weight: bold;
      color: #222222;
      line-height: 22px;
      margin-bottom: 10px;
    }
    .p{
      font-size: 14px;
      color: #222222;
      line-height: 20px;
      margin-bottom: 5px;
    }
  }
}
</style>
