StatisticsList.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <div class="tabs-list-wrap">
  3. <Row :gutter="16">
  4. <Col :span="spanNum" v-for="(item, index) in tabsData" :key="index">
  5. <div class="tabs-list">
  6. <img :src="tabsIcon[index].imgSrc" >
  7. <div>
  8. <p class="">{{ item.text }}</p>
  9. <p :style="'color:'+tabsTitleColor[index]" class="tabs-list-value">{{ item.value }}<span class="tabs-list-company">{{ item.company }}</span></p>
  10. </div>
  11. </div>
  12. </Col>
  13. </Row>
  14. </div>
  15. </template>
  16. <script>
  17. export default {
  18. name: "StatisticsList",
  19. props: {
  20. tabsInitData: {
  21. type: Array,
  22. default: () => {
  23. return [];
  24. },
  25. },
  26. tabsIcon: {
  27. type: Array,
  28. default: () => {
  29. return [];
  30. },
  31. },
  32. tabsTitleColor: {
  33. type: Array,
  34. default: () => {
  35. return [];
  36. },
  37. },
  38. spanNum: {
  39. type: Number,
  40. default: 6
  41. }
  42. },
  43. components:{
  44. },
  45. data() {
  46. return {
  47. tabsData: []
  48. };
  49. },
  50. mounted() {
  51. // this.$nextTick(()=> {
  52. // this.tabsData = this.tabsInitData
  53. // })
  54. this.tabsData = this.tabsInitData
  55. console.log(this.tabsData)
  56. },
  57. methods: {
  58. }
  59. };
  60. </script>
  61. <style scoped lang="stylus">
  62. .tabs-list-wrap {
  63. display: flex;
  64. justify-content: space-between;
  65. }
  66. .tabs-list {
  67. display: flex;
  68. align-items: center;
  69. justify-content: center;
  70. flex: 1;
  71. background: #0B2856;
  72. border: 1px solid #204384;
  73. height: 120px;
  74. font-size: 14px;
  75. color: #0185EA;
  76. img {
  77. margin-right: 30px;
  78. }
  79. .tabs-list-value {
  80. font-size: 30px;
  81. }
  82. .tabs-list-company {
  83. font-size: 14px;
  84. margin-left: 6px;
  85. }
  86. }
  87. >>> .ivu-row {
  88. width: 100%;
  89. margin: 0 !important;
  90. }
  91. >>> .ivu-row .ivu-col:first-child {
  92. padding-left: 0px !important;
  93. }
  94. >>> .ivu-row .ivu-col:last-child {
  95. padding-right: 0px !important;
  96. }
  97. </style>