with-images.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <el-row>
  3. <el-col
  4. v-for="(o, index) in 2"
  5. :key="o"
  6. :span="8"
  7. :offset="index > 0 ? 2 : 0"
  8. >
  9. <el-card :body-style="{ padding: '0px' }">
  10. <img
  11. src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png"
  12. class="image"
  13. />
  14. <div style="padding: 14px">
  15. <span>Yummy hamburger</span>
  16. <div class="bottom">
  17. <time class="time">{{ currentDate }}</time>
  18. <el-button text class="button">Operating</el-button>
  19. </div>
  20. </div>
  21. </el-card>
  22. </el-col>
  23. </el-row>
  24. </template>
  25. <script lang="ts" setup>
  26. import { ref } from 'vue'
  27. const currentDate = ref(new Date())
  28. </script>
  29. <style>
  30. .time {
  31. font-size: 12px;
  32. color: #999;
  33. }
  34. .bottom {
  35. margin-top: 13px;
  36. line-height: 12px;
  37. display: flex;
  38. justify-content: space-between;
  39. align-items: center;
  40. }
  41. .button {
  42. padding: 0;
  43. min-height: auto;
  44. }
  45. .image {
  46. width: 100%;
  47. display: block;
  48. }
  49. </style>