<template>
  <div>
    <div class="list" v-for="item in newsList" :key="item.id" @click="$router.push({path:'/text',query:{id:item.id,title:'新闻资讯'}})">
      <div class="img">
        <van-image fit="fill" :src="item.imgUrl?item.imgUrl:require('../assets/newsbg.png')" alt="" />
      </div>
      <div class="text">
        <p class="title">{{item.title}}</p>
        <p class="mes">发布单位：{{item.publish}}</p>
        <!-- <p class="mes">帮扶地址:滨州传媒网</p> -->
        <p class="date">发布日期：{{item.createdDate}}</p>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: ['newsList'],
  data() {
    return {}
  },
}
</script>

<style lang="scss" scoped>
.list {
  display: flex;
  align-items: center;
  margin-top: 16px;
  .img {
    .van-image {
      width: 260px;
      height: 160px;
    }
  }
  .text {
    text-align: left;
    margin-left: 26px;
    width: calc(100% - 286px);
    .title {
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      font-size: 30px;
    }
    .mes,
    .date {
      font-size: 26px;
    }
    p {
      margin: 0;
      margin-bottom: 16px;
    }
  }
}
</style>