with-images.vue 1.1 KB

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