Ben Lin
2024-08-05 16257dd099d9811fb5caf78047ffc2425c401e0e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<template>
  <List :class="prefixCls">
    <Row :gutter="16">
      <template v-for="item in applicationList" :key="item.title">
        <Col :span="6">
          <ListItem>
            <Card :hoverable="true" :class="`${prefixCls}__card`">
              <div :class="`${prefixCls}__card-title`">
                <Icon class="icon" v-if="item.icon" :icon="item.icon" :color="item.color" />
                {{ item.title }}
              </div>
              <div :class="`${prefixCls}__card-num`">
                活跃用户:<span>{{ item.active }}</span> 万
              </div>
              <div :class="`${prefixCls}__card-num`">
                新增用户:<span>{{ item.new }}</span>
              </div>
              <Icon
                :class="`${prefixCls}__card-download`"
                v-if="item.download"
                :icon="item.download"
              />
            </Card>
          </ListItem>
        </Col>
      </template>
    </Row>
  </List>
</template>
<script lang="ts" setup>
  import { List, Card, Row, Col } from 'ant-design-vue';
  import Icon from '@/components/Icon/Icon.vue';
  import { applicationList } from './data';
 
  const ListItem = List.Item;
 
  const prefixCls = 'account-center-application';
</script>
<style lang="less">
  .account-center-application {
    &__card {
      width: 100%;
      margin-bottom: -12px;
 
      .ant-card-body {
        padding: 16px;
      }
 
      &-title {
        margin-bottom: 5px;
        font-size: 16px;
        font-weight: 500;
 
        .icon {
          margin-top: -5px;
          font-size: 22px;
        }
      }
 
      &-num {
        margin-left: 24px;
        color: @text-color-secondary;
        line-height: 36px;
 
        span {
          margin-left: 5px;
          font-size: 18px;
        }
      }
 
      &-download {
        float: right;
        color: @primary-color;
        font-size: 20px !important;
      }
    }
  }
</style>