FileOverview.vue 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. height: 100%;
  23. display: flex;
  24. flex-direction: row;
  25. align-items: center;
  26. .box {
  27. display: flex;
  28. flex: 1;
  29. flex-direction: column;
  30. justify-content: flex-start;
  31. align-items: center;
  32. &:first-child .img {
  33. position: relative;
  34. width: 72px;
  35. height: 78px;
  36. background: url(/@/assets/images/files/homes/file1.png) no-repeat center;
  37. img {
  38. position: absolute;
  39. left: 50%;
  40. top: 50%;
  41. transform: translate(-50%, -75%);
  42. }
  43. }
  44. &:last-child .img {
  45. position: relative;
  46. width: 72px;
  47. height: 78px;
  48. background: url(/@/assets/images/files/homes/sp.png) no-repeat center;
  49. img {
  50. position: absolute;
  51. left: 50%;
  52. top: 50%;
  53. transform: translate(-50%, -75%);
  54. }
  55. }
  56. .text {
  57. margin: 5px 0px;
  58. font-family: '思源黑体', 'Microsoft Yahei';
  59. color: #fff;
  60. font-size: 14px;
  61. }
  62. &:first-child .num {
  63. width: 120px;
  64. height: 30px;
  65. font-family: 'douyuFont';
  66. color: #fff;
  67. font-size: 20px;
  68. display: flex;
  69. justify-content: center;
  70. align-items: center;
  71. background: url(/@/assets/images/files/homes/file2.png) no-repeat center;
  72. }
  73. &:last-child .num {
  74. width: 120px;
  75. height: 30px;
  76. font-family: 'douyuFont';
  77. color: #fff;
  78. font-size: 20px;
  79. display: flex;
  80. justify-content: center;
  81. align-items: center;
  82. background: url(/@/assets/images/files/homes/sp2.png) no-repeat center;
  83. }
  84. }
  85. }
  86. </style>