123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <template>
- <div class="card-b">
- <div class="box" v-for="item in tabs" :key="item.id" @click="$emit('click', item)">
- <div class="img"> <img :src="item.src" alt="" /> </div>
- <div class="text">{{ item.text }}</div>
- <div class="num">{{ item.num }}</div>
- </div>
- </div>
- </template>
- <script lang="ts" setup>
- import { ref } from 'vue';
- import { FILE_OVERVIEW_CONFIG } from '../billboard.data';
- defineEmits(['click']);
- let tabs = ref(FILE_OVERVIEW_CONFIG);
- </script>
- <style lang="less" scoped>
- @font-face {
- font-family: 'douyuFont';
- src: url(/@/assets/images/files/douyuFont.otf);
- }
- .card-b {
- display: flex;
- flex-direction: row;
- .box {
- display: flex;
- flex: 1;
- flex-direction: column;
- justify-content: flex-start;
- align-items: center;
- &:first-child .img {
- position: relative;
- width: 72px;
- height: 78px;
- background: url(/@/assets/images/files/homes/file1.png) no-repeat center;
- img {
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -75%);
- }
- }
- &:last-child .img {
- position: relative;
- width: 72px;
- height: 78px;
- background: url(/@/assets/images/files/homes/sp.png) no-repeat center;
- img {
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -75%);
- }
- }
- .text {
- margin: 5px 0px;
- font-family: '思源黑体', 'Microsoft Yahei';
- color: #fff;
- font-size: 14px;
- }
- &:first-child .num {
- width: 120px;
- height: 30px;
- font-family: 'douyuFont';
- color: #fff;
- font-size: 20px;
- display: flex;
- justify-content: center;
- align-items: center;
- background: url(/@/assets/images/files/homes/file2.png) no-repeat center;
- }
- &:last-child .num {
- width: 120px;
- height: 30px;
- font-family: 'douyuFont';
- color: #fff;
- font-size: 20px;
- display: flex;
- justify-content: center;
- align-items: center;
- background: url(/@/assets/images/files/homes/sp2.png) no-repeat center;
- }
- }
- }
- </style>
|