dcb737c926db7d90a080a1a219f8feaebc706f6e.svn-base 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <div class="app-list">
  3. <a-list
  4. :grid="{ gutter: 24, lg: 3, md: 2, sm: 1, xs: 1 }"
  5. :dataSource="dataSource">
  6. <a-list-item slot="renderItem" slot-scope="item, index">
  7. <a-card :hoverable="true">
  8. <a-card-meta>
  9. <div style="margin-bottom: 3px" slot="title">{{ item.title }}</div>
  10. <a-avatar class="card-avatar" slot="avatar" :src="item.avatar" size="small"/>
  11. <div class="meta-cardInfo" slot="description">
  12. <div>
  13. <p>活跃用户</p>
  14. <p>
  15. <span>{{ item.activeUser }}<span>万</span></span>
  16. </p>
  17. </div>
  18. <div>
  19. <p>新增用户</p>
  20. <p>{{ item.newUser | NumberFormat }}</p>
  21. </div>
  22. </div>
  23. </a-card-meta>
  24. <template class="ant-card-actions" slot="actions">
  25. <a>
  26. <a-icon type="download"/>
  27. </a>
  28. <a>
  29. <a-icon type="edit"/>
  30. </a>
  31. <a>
  32. <a-icon type="share-alt"/>
  33. </a>
  34. <a>
  35. <a-dropdown>
  36. <a class="ant-dropdown-link" href="javascript:;">
  37. <a-icon type="ellipsis"/>
  38. </a>
  39. <a-menu slot="overlay">
  40. <a-menu-item>
  41. <a href="javascript:;">1st menu item</a>
  42. </a-menu-item>
  43. <a-menu-item>
  44. <a href="javascript:;">2nd menu item</a>
  45. </a-menu-item>
  46. <a-menu-item>
  47. <a href="javascript:;">3rd menu item</a>
  48. </a-menu-item>
  49. </a-menu>
  50. </a-dropdown>
  51. </a>
  52. </template>
  53. </a-card>
  54. </a-list-item>
  55. </a-list>
  56. </div>
  57. </template>
  58. <script>
  59. const dataSource = []
  60. for (let i = 0; i < 11; i++) {
  61. dataSource.push({
  62. title: 'Alipay',
  63. avatar: 'https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png',
  64. activeUser: 17,
  65. newUser: 1700
  66. })
  67. }
  68. export default {
  69. name: "Article",
  70. components: {},
  71. data() {
  72. return {
  73. dataSource,
  74. }
  75. }
  76. }
  77. </script>
  78. <style lang="less" scoped>
  79. .app-list {
  80. .meta-cardInfo {
  81. zoom: 1;
  82. margin-top: 16px;
  83. > div {
  84. position: relative;
  85. text-align: left;
  86. float: left;
  87. width: 50%;
  88. p {
  89. line-height: 32px;
  90. font-size: 24px;
  91. margin: 0;
  92. &:first-child {
  93. color: rgba(0, 0, 0, .45);
  94. font-size: 12px;
  95. line-height: 20px;
  96. margin-bottom: 4px;
  97. }
  98. }
  99. }
  100. }
  101. }
  102. </style>