ImageTextSmallBlock.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <div class="ImageTextSmallBlock">
  3. <div>
  4. <img class="image" :src="image" alt="image" />
  5. <h3>{{ title }}</h3>
  6. </div>
  7. <div>
  8. <span v-if="date" class="time">{{ date }}</span>
  9. <img class="more" src="@/assets/images/IconArrowRight.png" alt="更多" />
  10. </div>
  11. </div>
  12. </template>
  13. <script setup lang="ts">
  14. defineProps({
  15. title : String,
  16. image: String,
  17. date: String,
  18. })
  19. </script>
  20. <style lang="scss">
  21. @use '@/assets/scss/colors.scss' as *;
  22. .ImageTextSmallBlock {
  23. display: flex;
  24. flex-direction: row;
  25. justify-content: space-between;
  26. align-items: center;
  27. padding: 24px;
  28. background-color: $box-color;
  29. border-radius: 5px;
  30. overflow: hidden;
  31. &:not(:last-child) {
  32. border-bottom: 1px solid $border-split-color;
  33. }
  34. > div {
  35. display: flex;
  36. flex-direction: row;
  37. align-items: center;
  38. }
  39. h3 {
  40. color: $text-content-color;
  41. font-size: 1.2rem;
  42. margin: 0;
  43. margin-bottom: 8px;
  44. }
  45. .image {
  46. width: 60px;
  47. margin-right: 15px;
  48. }
  49. .time {
  50. color: $text-content-second-color;
  51. font-size: 0.85rem;
  52. margin-right: 16px;
  53. }
  54. .more {
  55. width: 16px;
  56. height: 16px;
  57. }
  58. }
  59. </style>