Image.vue 1014 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <Panel title="图片">
  3. <ul class="image">
  4. <li v-for="(item, index) in VIDEOS" :key="index" class="image-item">
  5. <el-image :src="item.thumb" />
  6. <p class="limit-line">{{ item.label }}</p>
  7. </li>
  8. </ul>
  9. </Panel>
  10. </template>
  11. <script setup>
  12. import Panel from "./Panel.vue";
  13. import { VIDEOS } from "@guyuan/base";
  14. </script>
  15. <style lang="scss" scoped>
  16. @use "@/assets/utils.scss";
  17. .image {
  18. display: grid;
  19. grid-template-columns: repeat(4, 1fr);
  20. gap: utils.vw-calc(45) utils.vw-calc(27);
  21. &-item {
  22. position: relative;
  23. height: utils.vw-calc(231);
  24. cursor: pointer;
  25. .el-image {
  26. height: 100%;
  27. }
  28. p {
  29. position: absolute;
  30. left: 0;
  31. right: 0;
  32. bottom: 0;
  33. padding: 0 utils.vw-calc(20);
  34. color: white;
  35. font-weight: bold;
  36. line-height: utils.vw-calc(31);
  37. font-size: utils.vw-calc(18);
  38. background: rgba(97, 4, 21, 0.8);
  39. }
  40. }
  41. }
  42. </style>