LegendItem.vue 948 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <div class="legend-col">
  3. <div class="legend-mark" :style="{ background: props.color }"></div>
  4. <span class="legend-name">{{ props.name }}</span>
  5. <div class="legend-divider"></div>
  6. <span class="legend-count">{{ props.count }}</span>
  7. </div>
  8. </template>
  9. <script setup lang="ts">
  10. const props = defineProps<{
  11. color: string;
  12. name: string;
  13. count: string;
  14. }>();
  15. </script>
  16. <style scoped>
  17. .legend-col {
  18. width: 120px;
  19. height: 22px;
  20. margin-bottom: 16px;
  21. display: flex;
  22. justify-content: flex-start;
  23. align-items: center;
  24. }
  25. .legend-mark {
  26. width: 8px;
  27. height: 8px;
  28. margin-right: 8px;
  29. border-radius: 50%;
  30. }
  31. .legend-name {
  32. font-size: 14px;
  33. font-weight: 400;
  34. color: #6d6d6d;
  35. }
  36. .legend-divider {
  37. width: 1px;
  38. height: 12px;
  39. margin: 0 8px;
  40. background: #d9d9d9;
  41. }
  42. .legend-count {
  43. font-size: 14px;
  44. color: #bdbdbd;
  45. }
  46. </style>