HotContest.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <el-card class="popular-card">
  3. <div slot="header" class="popular-header">
  4. <img src="../../assets/img/crowd-contest.png" alt="hot-crowd" class="popular-header-img"/>
  5. <span class="popular-header-title">众测大赛</span>
  6. <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text">more>></el-button>
  7. </div>
  8. <div class="popular-list">
  9. <el-row class="popular-list-item" v-for="item in competitionList" :key="item.id">
  10. <el-col :span="23">
  11. <img src="../../assets/img/logo-project.png" alt="logo-project" class="pull-left project-logo-img">
  12. <div style="margin-left: 55px">
  13. <div class="list-item-title">
  14. {{item.name}}
  15. </div>
  16. <div class="list-item-info">
  17. {{item.startTime}}
  18. </div>
  19. </div>
  20. </el-col>
  21. <el-col :span="1">
  22. <div class="project-people-number">
  23. >
  24. </div>
  25. </el-col>
  26. </el-row>
  27. </div>
  28. </el-card>
  29. </template>
  30. <script>
  31. export default {
  32. name: 'HotContest',
  33. props:['competitionList']
  34. }
  35. </script>
  36. <style lang="less">
  37. .popular-card {
  38. margin-bottom: 15px;
  39. }
  40. .popular-header .el-card__header{
  41. border-bottom: 2px solid rgba(0,117,203,1) !important;
  42. }
  43. .popular-card .el-card__body{
  44. padding: 0 !important;
  45. }
  46. .popular-header {
  47. height: 25px;
  48. vertical-align:middle;
  49. }
  50. .popular-header-title {
  51. display: inline-block;
  52. line-height: 25px;
  53. vertical-align:middle;
  54. }
  55. .popular-header-img {
  56. height: 25px;
  57. width: 25px;
  58. vertical-align:middle;
  59. }
  60. .popular-list {
  61. .popular-list-item {
  62. padding: 5px 10px;
  63. border-bottom: 1px solid #ccc !important;
  64. .list-item-title {
  65. font-size: 14px;
  66. font-family: Source Han Sans CN;
  67. font-weight: 400;
  68. color: rgba(0, 0, 0, 1);
  69. overflow: hidden;
  70. text-overflow: ellipsis; //溢出用省略号显示
  71. white-space: nowrap; //溢出不换行
  72. }
  73. .list-item-info {
  74. font-size: 14px;
  75. font-family: Adobe Heiti Std;
  76. font-weight: normal;
  77. color: rgba(153, 153, 153, 1);
  78. overflow: hidden; //超出的文本隐藏
  79. text-overflow: ellipsis; //溢出用省略号显示
  80. white-space: nowrap; //溢出不换行
  81. }
  82. .project-logo-img {
  83. width: 44px;
  84. height: 44px;
  85. display: inline-block;
  86. margin: 2px 0;
  87. }
  88. .project-people-number {
  89. font-size: 16px;
  90. font-family: Roboto;
  91. font-weight: 400;
  92. color: rgba(0, 117, 203, 1);
  93. line-height: 48px;
  94. }
  95. }
  96. }
  97. </style>