red-dot.vue 431 B

1234567891011121314151617181920212223242526
  1. <template>
  2. <div class="red-dot"
  3. :style="{width: size + 'px', height: size + 'px',
  4. background: color}">
  5. </div>
  6. </template>
  7. <script setup>
  8. import { defineProps } from "vue";
  9. defineProps({
  10. size: {
  11. type: String,
  12. default: '8'
  13. },
  14. color: {
  15. type: String,
  16. default: '#FF0000'
  17. },
  18. });
  19. </script>
  20. <style lang="scss" scoped>
  21. .red-dot {
  22. border-radius: 50%;
  23. }
  24. </style>