<template>
  <div class="order-stats">
    <el-row :gutter="20">
      <el-col v-for="item in state.list" :key="item.label" :span="12">
        <div class="order-stats-item flex-column">
          <div class="order-stats-value">
            {{ item.value }}<span>{{ item.unit }}</span>
          </div>
          <div class="order-stats-label">{{ item.label }}</div>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script setup>
import { reactive } from 'vue';

const state = reactive({
  list: [
    {
      label: '订单金额',
      value: '548.86',
      unit: '万元',
    },
    {
      label: '订单数量',
      value: '110554',
      unit: '笔',
    },
  ],
});
</script>

<style lang="scss" scoped>
.order-stats {
  padding: 20px;

  &-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
  }

  &-value {
    width: 160px;
    height: 160px;
    line-height: 100px;
    text-align: center;
    margin: 0 auto;
    background-image: url('@/assets/images/inputs/order.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-size: 24px;
    font-weight: 400;
    color: #fff;
    position: relative;
    border-radius: 8px;
    overflow: hidden;

    span {
      font-size: 16px;
    }
  }

  &-label {
    width: 120px;
    height: 24px;
    line-height: 24px;
    margin: 10px auto 0;
    font-size: 16px;
    color: #fff;
    text-align: center;
    background: url('@/assets/images/inputs/bg_label.png') center center no-repeat;
    text-shadow:
      0 0 10px #01eeff,
      0 0 20px #01eeff,
      0 0 30px #01eeff;
  }
}
</style>
