<template>
  <el-card class="expert-card">
    <el-row style="border-bottom: 1px solid #ccc">
      <el-col :span="6">
        <div class="card-img"><img :src="card.photo" style="height: 50px; width: 50px;"/></div>
      </el-col>
      <el-col :span="18">
        <div class="card-title">
          {{card.name}}
        </div>
        <div class="card-content">
          {{card.title}}
        </div>
      </el-col>
    </el-row>
    <div class="card-detail">
      {{card.introduction}}
    </div>
    <div class="card-action">
      <div class="btn btn-small btn-info pull-right" @click="goToDetail(card.id)">查看详情</div>
      <div class="participate-num">
        <!-- <span v-bind:class="['badge',{ 'ios-platform': item.toLowerCase()=='ios','android-platform': item.toLowerCase()=='android','web-platform': item.toLowerCase()=='web'}]" v-for="item in platformType">{{item}}</span> -->
      </div>
    </div>
  </el-card>
</template>

<script>
  export default {
    name: 'AgencyLine',
    props: ['card'],
    methods: {
      goToDetail(id) {
        this.$router.push({
          name: 'ExpertDetail',
          params: {id: id}
        })
      },
      showLoading() {
        this.loading = true
      },
      hideLoading() {
        this.loading = false
      },
    },
    mounted() {

    }
  }
</script>

<style lang="less">
  .expert-card .el-card__body {
    padding: 0 !important;
  }

  .el-divider--horizontal {
    margin-bottom: 5px !important;
  }
  .expert-card {
    padding: 10px;

    .card-img {
      margin: 10px;
      position: relative;
      float: left;
    }

    .card-title {
      margin-top: 5px;
      font-size: 24px;
      font-family: Source Han Sans CN;
      font-weight: 500;
      color: rgba(0, 0, 0, 1);
      line-height: 30px;
      overflow: hidden; //超出的文本隐藏
      text-overflow: ellipsis; //溢出用省略号显示
      white-space: nowrap; //溢出不换行
    }

    .card-content {
      font-size: 14px;
      font-family: Source Han Sans CN;
      font-weight: 400;
      color: rgba(0, 0, 0, 1);
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box; //作为弹性伸缩盒子模型显示。
      -webkit-box-orient: vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
      -webkit-line-clamp: 1; //显示的行
    }

    .card-detail {
      width: 100%;
      height: 72px;
      margin-bottom: 5px;
      font-size: 14px;
      font-family: Source Han Sans CN;
      font-weight: 400;
      color: rgba(0, 0, 0, 1);
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box; //作为弹性伸缩盒子模型显示。
      -webkit-box-orient: vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
      -webkit-line-clamp: 3; //显示的行
    }

  }

</style>
