FileOverview.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <div class="card-b">
  3. <div class="box" v-for="item in tabs" :key="item.id" @click="$emit('click', item)">
  4. <div class="img"> <img :src="item.src" alt="" /> </div>
  5. <div class="text">{{ item.text }}</div>
  6. <div class="num">{{ item.num }}</div>
  7. </div>
  8. </div>
  9. </template>
  10. <script lang="ts" setup>
  11. import { ref } from 'vue';
  12. import { FILE_OVERVIEW_CONFIG } from '../billboard.data';
  13. defineEmits(['click']);
  14. let tabs = ref(FILE_OVERVIEW_CONFIG);
  15. </script>
  16. <style lang="less" scoped>
  17. @font-face {
  18. font-family: 'douyuFont';
  19. src: url(/@/assets/images/files/douyuFont.otf);
  20. }
  21. .card-b {
  22. display: flex;
  23. flex-direction: row;
  24. .box {
  25. display: flex;
  26. flex: 1;
  27. flex-direction: column;
  28. justify-content: flex-start;
  29. align-items: center;
  30. &:first-child .img {
  31. position: relative;
  32. width: 72px;
  33. height: 78px;
  34. background: url(/@/assets/images/files/homes/file1.png) no-repeat center;
  35. img {
  36. position: absolute;
  37. left: 50%;
  38. top: 50%;
  39. transform: translate(-50%, -75%);
  40. }
  41. }
  42. &:last-child .img {
  43. position: relative;
  44. width: 72px;
  45. height: 78px;
  46. background: url(/@/assets/images/files/homes/sp.png) no-repeat center;
  47. img {
  48. position: absolute;
  49. left: 50%;
  50. top: 50%;
  51. transform: translate(-50%, -75%);
  52. }
  53. }
  54. .text {
  55. margin: 5px 0px;
  56. font-family: '思源黑体', 'Microsoft Yahei';
  57. color: #fff;
  58. font-size: 14px;
  59. }
  60. &:first-child .num {
  61. width: 120px;
  62. height: 30px;
  63. font-family: 'douyuFont';
  64. color: #fff;
  65. font-size: 20px;
  66. display: flex;
  67. justify-content: center;
  68. align-items: center;
  69. background: url(/@/assets/images/files/homes/file2.png) no-repeat center;
  70. }
  71. &:last-child .num {
  72. width: 120px;
  73. height: 30px;
  74. font-family: 'douyuFont';
  75. color: #fff;
  76. font-size: 20px;
  77. display: flex;
  78. justify-content: center;
  79. align-items: center;
  80. background: url(/@/assets/images/files/homes/sp2.png) no-repeat center;
  81. }
  82. }
  83. }
  84. </style>