CrowdTool.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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="scss">
  45. @import "../../style/main";
  46. .technology-card {
  47. .card-wrapper {
  48. .technology-img {
  49. width: 100%;
  50. height: 130px;
  51. }
  52. .technology-detail {
  53. padding-left: 15px;
  54. height: 130px;
  55. display: flex;
  56. flex-direction: column;
  57. justify-content: space-between;
  58. .technology-title {
  59. cursor: pointer;
  60. font-size: 22px;
  61. font-family: Source Han Sans CN;
  62. font-weight: 500;
  63. color: rgba(0, 0, 0, 1);
  64. }
  65. .technology-info {
  66. font-size: 16px;
  67. font-family: Source Han Sans CN;
  68. font-weight: 400;
  69. color: rgba(0, 0, 0, 1);
  70. div {
  71. white-space: nowrap;
  72. overflow: hidden;
  73. text-overflow: ellipsis;
  74. }
  75. }
  76. }
  77. .get-info-btn {
  78. display: inline-block;
  79. color: white;
  80. background-color: $--color-primary;
  81. border-radius: 50%;
  82. width: 18px;
  83. height: 18px;
  84. margin-left: 5px;
  85. font-size: 16px;
  86. i {
  87. margin: 1px;
  88. }
  89. }
  90. }
  91. }
  92. </style>