statistics.vue 813 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <!-- 统计组件 -->
  2. <template>
  3. <div class="statistics">
  4. <div class="statistics-left">
  5. <img :src="props.imgUrl" style="width: 60px;height: 60px;">
  6. </div>
  7. <div class="statistics-right">
  8. <el-statistic :title="props.titles" :value="Number(props.subhea)" />
  9. </div>
  10. </div>
  11. </template>
  12. <script setup lang="ts">
  13. const props = defineProps({
  14. imgUrl:{
  15. type: String,
  16. default: () => '',
  17. },
  18. titles:{
  19. type: String,
  20. default: () => '',
  21. },
  22. subhea:{
  23. type: String,
  24. default: () => '',
  25. }
  26. })
  27. </script>
  28. <style lang="scss">
  29. .statistics{
  30. display: flex;
  31. align-items: center;
  32. &-right{
  33. display: block;
  34. line-height: 25px;
  35. margin-left: var(--y-margin);
  36. }
  37. }
  38. </style>