ExpertCard.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <el-card class="expert-card">
  3. <el-row style="border-bottom: 1px solid #ccc">
  4. <el-col :span="6">
  5. <div class="card-img"><img :src="card.photo" style="height: 50px; width: 50px;"/></div>
  6. </el-col>
  7. <el-col :span="18">
  8. <div class="card-title">
  9. {{card.name}}
  10. </div>
  11. <div class="card-content">
  12. {{card.title}}
  13. </div>
  14. </el-col>
  15. </el-row>
  16. <div class="card-detail">
  17. {{card.introduction}}
  18. </div>
  19. <div class="card-action">
  20. <div class="btn btn-small btn-info pull-right" @click="goToDetail(card.id)">查看详情</div>
  21. <div class="participate-num">
  22. <!-- <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> -->
  23. </div>
  24. </div>
  25. </el-card>
  26. </template>
  27. <script>
  28. export default {
  29. name: 'AgencyLine',
  30. props: ['card'],
  31. methods: {
  32. goToDetail(id) {
  33. this.$router.push({
  34. name: 'ExpertDetail',
  35. params: {id: id}
  36. })
  37. },
  38. showLoading() {
  39. this.loading = true
  40. },
  41. hideLoading() {
  42. this.loading = false
  43. },
  44. },
  45. mounted() {
  46. }
  47. }
  48. </script>
  49. <style lang="less">
  50. .expert-card .el-card__body {
  51. padding: 0 !important;
  52. }
  53. .el-divider--horizontal {
  54. margin-bottom: 5px !important;
  55. }
  56. .expert-card {
  57. padding: 10px;
  58. .card-img {
  59. margin: 10px;
  60. position: relative;
  61. float: left;
  62. }
  63. .card-title {
  64. margin-top: 5px;
  65. font-size: 24px;
  66. font-family: Source Han Sans CN;
  67. font-weight: 500;
  68. color: rgba(0, 0, 0, 1);
  69. line-height: 30px;
  70. overflow: hidden; //超出的文本隐藏
  71. text-overflow: ellipsis; //溢出用省略号显示
  72. white-space: nowrap; //溢出不换行
  73. }
  74. .card-content {
  75. font-size: 14px;
  76. font-family: Source Han Sans CN;
  77. font-weight: 400;
  78. color: rgba(0, 0, 0, 1);
  79. overflow: hidden;
  80. text-overflow: ellipsis;
  81. display: -webkit-box; //作为弹性伸缩盒子模型显示。
  82. -webkit-box-orient: vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
  83. -webkit-line-clamp: 1; //显示的行
  84. }
  85. .card-detail {
  86. width: 100%;
  87. height: 72px;
  88. margin-bottom: 5px;
  89. font-size: 14px;
  90. font-family: Source Han Sans CN;
  91. font-weight: 400;
  92. color: rgba(0, 0, 0, 1);
  93. overflow: hidden;
  94. text-overflow: ellipsis;
  95. display: -webkit-box; //作为弹性伸缩盒子模型显示。
  96. -webkit-box-orient: vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
  97. -webkit-line-clamp: 3; //显示的行
  98. }
  99. }
  100. </style>