CrowdTool.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <div class="technology-card">
  3. <div class="card-wrapper" v-if="toolList&&toolList.length">
  4. <el-card v-for="item in toolList" :key="item.id" style="margin-bottom: 15px">
  5. <el-row>
  6. <el-col :span="4">
  7. <img :src="item.photoUrl" alt="tool-img" class="pull-left technology-img">
  8. </el-col>
  9. <el-col :span="17" class="technology-detail">
  10. <div class="technology-title">
  11. {{item.name}}
  12. </div>
  13. <div>简介:{{item.description}}</div>
  14. <div class="technology-info">
  15. <div>开发:{{item.owner}}</div>
  16. </div>
  17. </el-col>
  18. <el-col :span="3">
  19. <div @click="gotoDetail(item)">
  20. <span style="font-size: 14px">查看详情</span>
  21. <i class="el-icon-arrow-right get-info-btn"></i>
  22. </div>
  23. </el-col>
  24. </el-row>
  25. </el-card>
  26. </div>
  27. <div v-else>
  28. 暂无内容
  29. </div>
  30. </div>
  31. </template>
  32. <script>
  33. import Http from '@/js/http.js'
  34. export default {
  35. name: 'CrowdTool',
  36. props: ['toolList'],
  37. methods: {
  38. gotoDetail(item) {
  39. window.open(item.linkUrl);
  40. }
  41. }
  42. }
  43. </script>
  44. <style scoped lang="less">
  45. .technology-card {
  46. .card-wrapper {
  47. .technology-img {
  48. width: 100%;
  49. height: 130px;
  50. }
  51. .technology-detail {
  52. padding-left: 15px;
  53. height: 130px;
  54. display: flex;
  55. flex-direction: column;
  56. justify-content: space-between;
  57. .technology-title {
  58. cursor: pointer;
  59. font-size: 22px;
  60. font-family: Source Han Sans CN;
  61. font-weight: 500;
  62. color: rgba(0, 0, 0, 1);
  63. }
  64. .technology-info {
  65. font-size: 16px;
  66. font-family: Source Han Sans CN;
  67. font-weight: 400;
  68. color: rgba(0, 0, 0, 1);
  69. div {
  70. white-space: nowrap;
  71. overflow: hidden;
  72. text-overflow: ellipsis;
  73. }
  74. }
  75. }
  76. .get-info-btn {
  77. display: inline-block;
  78. color: white;
  79. background-color: #0076cb;
  80. border-radius: 50%;
  81. width: 18px;
  82. height: 18px;
  83. margin-left: 5px;
  84. font-size: 16px;
  85. i {
  86. margin: 1px;
  87. }
  88. }
  89. }
  90. }
  91. </style>