index.vue 611 B

12345678910111213141516171819202122232425262728293031
  1. <template>
  2. <transition name="fade">
  3. <div class="bubble" :class="{ [type]: true, [level]: true }" v-if="show" @click.stop>
  4. <div class="bubble-layer">
  5. <div class="bubble-arr"></div>
  6. <slot></slot>
  7. </div>
  8. </div>
  9. </transition>
  10. </template>
  11. <script setup>
  12. defineProps({
  13. type: {
  14. type: String,
  15. default: 'right',
  16. },
  17. show: {
  18. type: Boolean,
  19. default: true,
  20. },
  21. level: {
  22. type: String,
  23. require: false,
  24. },
  25. })
  26. </script>
  27. <script>
  28. export default { name: 'UiBubble' }
  29. </script>