AnimatedDots.vue 442 B

12345678910111213141516171819202122232425262728
  1. <script setup>
  2. defineProps({
  3. animating: {
  4. type: Boolean,
  5. default: true
  6. }
  7. })
  8. </script>
  9. <template>
  10. <span :class="{ dots: animating }"></span>
  11. </template>
  12. <style scoped>
  13. .dots::after {
  14. content: '';
  15. animation: dots 1.5s steps(4, end) infinite;
  16. }
  17. @keyframes dots {
  18. 0% { content: ''; }
  19. 25% { content: '.'; }
  20. 50% { content: '..'; }
  21. 75% { content: '...'; }
  22. 100% { content: ''; }
  23. }
  24. </style>