<template>
  <div class="career-course-card">
    <div class="career-course-card-img">
      <el-image :src="img || defaultImg"></el-image>
    </div>
    <div class="career-course-card-text">
      <div class="career-course-card-title">{{ title }}</div>
      <div class="career-course-card-num">
        <i class="el-icon-view"></i>
        {{ count }}人
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    img: {
      type: String,
      default: "",
    },
    title: {
      type: String,
      default: "",
    },
    count: {
      type: Number | String,
      default: "",
    },
  },
  data() {
    return {
      defaultImg: "",
    };
  },
};
</script>
<style lang="scss" scoped>
.career-course-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.career-course-card-img {
  display: flex;
  justify-content: center;
  align-items: center;
}
.career-course-card-text {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 5px;
  white-space: nowrap;
}
.career-course-card-title {
  font-size: 14px;
  font-weight: 400;
  color: #585858;
  padding-right: 20px;
  overflow: hidden; //禁止内容溢出
  text-overflow: ellipsis; //省略号
}
.career-course-card-num {
  font-size: 12px;
  font-weight: 400;
  color: #7a7a7a;
}
</style>