inforCard.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <style lang="less">
  2. @import "./styles/infor-card.less";
  3. </style>
  4. <template>
  5. <Card :padding="0">
  6. <div class="infor-card-con">
  7. <Col
  8. class="infor-card-icon-con"
  9. :style="{ backgroundColor: color, color: 'white' }"
  10. span="8"
  11. >
  12. <Row class="height-100" type="flex" align="middle" justify="center">
  13. <Icon :type="iconType" :size="iconSize"></Icon>
  14. </Row>
  15. </Col>
  16. <Col span="16" class="height-100">
  17. <Row type="flex" align="middle" justify="center" class="height-100">
  18. <count-up
  19. class="infor-card-count user-created-count"
  20. :id-name="idName"
  21. :end-val="endVal"
  22. :color="color"
  23. :countSize="countSize"
  24. :countWeight="countWeight"
  25. >
  26. <p class="infor-intro-text" slot="intro">{{ introText }}</p>
  27. </count-up>
  28. </Row>
  29. </Col>
  30. </div>
  31. </Card>
  32. </template>
  33. <script>
  34. import countUp from "./countUp.vue";
  35. export default {
  36. name: "inforCard",
  37. components: {
  38. countUp,
  39. },
  40. props: {
  41. idName: String,
  42. endVal: Number,
  43. color: String,
  44. iconType: String,
  45. introText: String,
  46. countSize: {
  47. type: String,
  48. default: "30px",
  49. },
  50. countWeight: {
  51. type: Number,
  52. default: 700,
  53. },
  54. iconSize: {
  55. type: Number,
  56. default: 40,
  57. },
  58. },
  59. };
  60. </script>