Blame view

ant-design-vue-jeecg/src/views/account/center/page/App.vue 2.64 KB
肖超群 authored
1
2
3
4
5
<template>
  <div class="app-list">
    <a-list
      :grid="{ gutter: 24, lg: 3, md: 2, sm: 1, xs: 1 }"
      :dataSource="dataSource">
谭毅彬 authored
6
      <a-list-item slot="renderItem" slot-scope="item">
肖超群 authored
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
        <a-card :hoverable="true">
          <a-card-meta>
            <div style="margin-bottom: 3px" slot="title">{{ item.title }}</div>
            <a-avatar class="card-avatar" slot="avatar" :src="item.avatar" size="small"/>
            <div class="meta-cardInfo" slot="description">
              <div>
                <p>活跃用户</p>
                <p>
                  <span>{{ item.activeUser }}<span>万</span></span>
                </p>
              </div>
              <div>
                <p>新增用户</p>
                <p>{{ item.newUser | NumberFormat }}</p>
              </div>
            </div>
          </a-card-meta>
          <template class="ant-card-actions" slot="actions">
            <a>
              <a-icon type="download"/>
            </a>
            <a>
              <a-icon type="edit"/>
            </a>
            <a>
              <a-icon type="share-alt"/>
            </a>
            <a>
              <a-dropdown>
                <a class="ant-dropdown-link" href="javascript:;">
                  <a-icon type="ellipsis"/>
                </a>
                <a-menu slot="overlay">
                  <a-menu-item>
                    <a href="javascript:;">1st menu item</a>
                  </a-menu-item>
                  <a-menu-item>
                    <a href="javascript:;">2nd menu item</a>
                  </a-menu-item>
                  <a-menu-item>
                    <a href="javascript:;">3rd menu item</a>
                  </a-menu-item>
                </a-menu>
              </a-dropdown>
            </a>
          </template>
        </a-card>
      </a-list-item>
    </a-list>

  </div>
</template>

<script>
肖超群 authored
61
62
63
64
65
66
67
68
69
const dataSource = []
for (let i = 0; i < 11; i++) {
  dataSource.push({
    title: 'Alipay',
    avatar: 'https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png',
    activeUser: 17,
    newUser: 1700
  })
}
肖超群 authored
70
肖超群 authored
71
72
73
74
75
76
export default {
  name: "Article",
  components: {},
  data() {
    return {
      dataSource,
肖超群 authored
77
78
    }
  }
肖超群 authored
79
}
肖超群 authored
80
81
82
83
</script>

<style lang="less" scoped>
肖超群 authored
84
.app-list {
肖超群 authored
85
肖超群 authored
86
87
88
  .meta-cardInfo {
    zoom: 1;
    margin-top: 16px;
肖超群 authored
89
肖超群 authored
90
91
92
93
94
    > div {
      position: relative;
      text-align: left;
      float: left;
      width: 50%;
肖超群 authored
95
肖超群 authored
96
97
98
99
      p {
        line-height: 32px;
        font-size: 24px;
        margin: 0;
肖超群 authored
100
肖超群 authored
101
102
103
104
105
        &:first-child {
          color: rgba(0, 0, 0, .45);
          font-size: 12px;
          line-height: 20px;
          margin-bottom: 4px;
肖超群 authored
106
107
        }
      }
肖超群 authored
108
肖超群 authored
109
110
    }
  }
肖超群 authored
111
}
肖超群 authored
112
113

</style>