| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <template>
- <div class="stats">
- <div v-for="(item, index) in statsData" :key="index" class="col">
- <div class="num">
- {{ item.value }}
- <span class="unit"> {{ item.unit }}</span>
- </div>
- <div class="desc">{{ item.desc }}</div>
- </div>
- </div>
- </template>
- <script setup>
- defineProps({
- statsData: {
- type: Array,
- required: true,
- default: () => [],
- },
- });
- </script>
- <style scoped lang="scss">
- .stats {
- display: flex;
- align-items: stretch;
- justify-content: space-between;
- background: rgba(33, 153, 248, 0.1);
- border: 1px solid rgba(33, 153, 248, 0.2);
- border-radius: 10px;
- padding: 10px 8px;
- font-size: 14px;
- margin-top: 12px;
- .col {
- flex: 1;
- text-align: center;
- .num {
- color: #2199f8;
- font-weight: 600;
- font-size: 16px;
- display: flex;
- align-items: center;
- justify-content: center;
- .unit {
- margin-left: 4px;
- font-size: 13px;
- font-weight: 400;
- color: rgba(0, 0, 0, 0.5);
- }
- }
- .desc {
- color: #000;
- margin-top: 4px;
- }
- }
- .col + .col {
- border-left: 1px solid rgba(33, 153, 248, 0.4);
- }
- }
- </style>
|