Application.vue 2.1 KB
Newer Older
C
chen-xt 已提交
1 2
<template>
  <List :class="prefixCls">
V
vben 已提交
3
    <a-row :gutter="16">
V
Vben 已提交
4
      <template v-for="item in list" :key="item.title">
V
vben 已提交
5
        <a-col :span="6">
C
chen-xt 已提交
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
          <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>
V
vben 已提交
25
        </a-col>
C
chen-xt 已提交
26
      </template>
V
vben 已提交
27
    </a-row>
C
chen-xt 已提交
28 29 30 31
  </List>
</template>
<script lang="ts">
  import { defineComponent } from 'vue';
V
vben 已提交
32
  import { List, Card, Row, Col } from 'ant-design-vue';
33
  import { Icon } from '/@/components/Icon';
C
chen-xt 已提交
34 35 36 37 38 39 40 41
  import { applicationList } from './data';

  export default defineComponent({
    components: {
      List,
      ListItem: List.Item,
      Card,
      Icon,
V
vben 已提交
42 43
      [Row.name]: Row,
      [Col.name]: Col,
C
chen-xt 已提交
44 45 46 47 48 49 50 51 52
    },
    setup() {
      return {
        prefixCls: 'account-center-application',
        list: applicationList,
      };
    },
  });
</script>
陈小婷 已提交
53
<style lang="less">
C
chen-xt 已提交
54 55 56
  .account-center-application {
    &__card {
      width: 100%;
陈小婷 已提交
57
      margin-bottom: -12px;
C
chen-xt 已提交
58

陈小婷 已提交
59
      .ant-card-body {
C
chen-xt 已提交
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
        padding: 16px;
      }

      &-title {
        margin-bottom: 5px;
        font-size: 16px;
        font-weight: 500;

        .icon {
          margin-top: -5px;
          font-size: 22px;
        }
      }

      &-num {
        margin-left: 24px;
V
Vben 已提交
76
        color: @text-color-secondary;
V
vben 已提交
77
        line-height: 36px;
C
chen-xt 已提交
78 79 80 81 82 83 84 85 86

        span {
          margin-left: 5px;
          font-size: 18px;
        }
      }

      &-download {
        float: right;
V
Vben 已提交
87
        color: @primary-color;
V
vben 已提交
88
        font-size: 20px !important;
C
chen-xt 已提交
89 90 91 92
      }
    }
  }
</style>