<template>
  <div class="cardItem" @click="goDetial">
    <img class="img" src="http://121.5.58.50:8088/sport.png" alt="">
    <div class="right">
      <span class="title">{{ params.title }}</span>
      <span class="des">{{ params.secondTitle }}</span>
      <span class="time">发布时间：{{params.publishTime }}</span>
    </div>
  </div>
</template>

<script>
export default {
  name: "cardItem",
  props:{
    params:{
      default:()=>{}
    }
  },
  methods:{
    goDetial(){
      this.$router.push({name:'newsPage',query:{id:this.params.id}})
    },
  }
}
</script>

<style scoped lang="less">
.cardItem{
  width: 327px;
  height: 95px;
  background: #FFFFFF;
  box-shadow: 0px 13px 40px 0px rgba(27,25,86,0.06);
  border-radius: 10px;
  display: flex;
  align-items: center;
  .img{
    width: 60px;
    height: 60px;
    padding: 15px;
    border-radius: 20px;
  }
  .right{
    display: flex;
    flex-direction: column;
    text-align: left;
    .title{
      font-size: 18px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #01040D;
      white-space: nowrap;

      word-break: break-all;
      width: 200px;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .des{
      margin-top: 5px;
      display: inline-block;
      white-space: nowrap;

      //display: -webkit-box;
      //　 overflow: hidden;
      //　　text-overflow:ellipsis;
      //　　white-space: nowrap;

      word-break: break-all;
      width: 200px;
      overflow: hidden;
      text-overflow: ellipsis;
      font-size: 13px;
      font-weight: 400;
      color: #75818F;
      text-shadow: 0px 13px 40px rgba(27,25,86,0.06);

    }
    .time{
      font-size: 12px;
      display: inline-block;
      margin-top: 5px;
      text-align: right;
    }
  }

}
</style>