cards.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <div>
  3. <!--v-if="item.count && item.count!='0.00'"-->
  4. <Row type="flex" align="middle" :gutter="10" class="ivu-mt">
  5. <Col
  6. :xl="item.col"
  7. :lg="6"
  8. :md="12"
  9. :sm="24"
  10. :xs="24"
  11. class="ivu-mb"
  12. v-for="(item, index) in cardLists"
  13. :key="index"
  14. >
  15. <Card shadow :padding="0" class="card_cent">
  16. <div class="card_box">
  17. <div
  18. class="card_box_cir"
  19. :class="{
  20. one: index % 5 == 0,
  21. two: index % 5 == 1,
  22. three: index % 5 == 2,
  23. four: index % 5 == 3,
  24. five: index % 5 == 4,
  25. }"
  26. >
  27. <div
  28. class="card_box_cir1"
  29. :class="{
  30. one1: index % 5 == 0,
  31. two1: index % 5 == 1,
  32. three1: index % 5 == 2,
  33. four1: index % 5 == 3,
  34. five1: index % 5 == 4,
  35. }"
  36. >
  37. <Icon :type="item.className" />
  38. </div>
  39. </div>
  40. <div class="card_box_txt">
  41. <span class="sp1" v-text="item.count || 0"></span>
  42. <span class="sp2" v-text="item.name"></span>
  43. </div>
  44. </div>
  45. </Card>
  46. </Col>
  47. </Row>
  48. </div>
  49. </template>
  50. <script>
  51. export default {
  52. name: 'cards',
  53. data() {
  54. return {};
  55. },
  56. props: {
  57. cardLists: Array,
  58. },
  59. methods: {},
  60. created() {},
  61. };
  62. </script>
  63. <style scoped lang="stylus">
  64. /*.card_cent >>> .ivu-card-body*/
  65. /* width 100%*/
  66. /* height 100%*/
  67. .card_box_cir1 >>> .ivu-icon
  68. font-size: 26px
  69. color: #fff
  70. .one
  71. background #E4ECFF
  72. .two
  73. background #FFF3E0
  74. .three
  75. background #EAF9E1
  76. .four
  77. background #FFEAF4
  78. .five
  79. background #F1E4FF
  80. .one1
  81. background #4D7CFE
  82. .two1
  83. background #FFAB2B
  84. .three1
  85. background #6DD230
  86. .four1
  87. background #FF85C0
  88. .five1
  89. background #B37FEB
  90. .card_box
  91. width 100%
  92. height 100%
  93. display flex
  94. align-items: center
  95. /*justify-content: center*/
  96. padding: 25px
  97. box-sizing: border-box
  98. border-radius: 4px
  99. .card_box_cir
  100. width 60px
  101. height 60px
  102. border-radius: 50%
  103. overflow: hidden
  104. margin-right: 20px
  105. display: flex
  106. justify-content: center
  107. align-items: center
  108. .card_box_cir1
  109. width 48px
  110. height 48px
  111. border-radius: 50%
  112. display: flex
  113. justify-content: center
  114. align-items: center
  115. .card_box_txt
  116. .sp1
  117. display block
  118. color #252631
  119. font-size 24px
  120. .sp2
  121. display block
  122. color #98A9BC
  123. font-size 12px
  124. </style>