image-text-recommend-image-card.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <template>
  2. <div class="image-text-recommend-image-card">
  3. <div class="header">
  4. <div class="title">{{ info.title }}</div>
  5. <div class="info">
  6. <img class="app-logo" :src="info.app_logo" alt="" />
  7. <div class="app-name">{{ info.app_name }}</div>
  8. <div class="time">{{ info.release_time }}</div>
  9. <img class="vip" v-if="!!info.is_vip" src="@/assets/icon/vip.png" />
  10. </div>
  11. </div>
  12. <div
  13. class="cover-box"
  14. v-if="info.images_arr && !info.images_arr.length < 2"
  15. >
  16. <img
  17. v-for="item in info.images_arr.slice(0, 3)"
  18. class="cover"
  19. :src="item"
  20. alt=""
  21. />
  22. </div>
  23. </div>
  24. </template>
  25. <script>
  26. export default {
  27. name: "ImageTextRecommendImageCard",
  28. props: {
  29. info: {
  30. type: Object,
  31. },
  32. },
  33. };
  34. </script>
  35. <style lang="scss" scoped>
  36. .image-text-recommend-image-card {
  37. width: calc(100% - 40px);
  38. background-color: white;
  39. padding: 20px;
  40. box-sizing: border-box;
  41. cursor: default;
  42. .header {
  43. .title {
  44. font-size: 22px;
  45. font-weight: 400;
  46. color: #222222;
  47. text-overflow: ellipsis;
  48. white-space: nowrap;
  49. overflow: hidden;
  50. }
  51. .info {
  52. display: flex;
  53. align-items: center;
  54. margin: 10px 0;
  55. .app-logo {
  56. width: 40px;
  57. height: 40px;
  58. border-radius: 50%;
  59. }
  60. .app-name {
  61. font-size: 18px;
  62. font-weight: 500;
  63. color: #131415;
  64. margin-left: 10px;
  65. }
  66. .time {
  67. margin-left: 10px;
  68. font-size: 14px;
  69. font-weight: 400;
  70. color: #444444;
  71. }
  72. .vip {
  73. width: 30px;
  74. height: 15px;
  75. margin-left: 10px;
  76. }
  77. }
  78. }
  79. .cover-box {
  80. display: flex;
  81. height: 200px;
  82. .cover {
  83. flex: 1;
  84. height: 200px;
  85. object-fit: cover;
  86. }
  87. .cover:not(:last-child) {
  88. margin-right: 20px;
  89. }
  90. }
  91. }
  92. </style>