rounded.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. <div class="flex flex-wrap gap-2 my-2">
  3. <el-tag v-for="item in items" :key="item.label" :type="item.type" class="mx-1" effect="dark" round>
  4. {{ item.label }}
  5. </el-tag>
  6. </div>
  7. <div class="flex flex-wrap gap-2">
  8. <el-tag v-for="item in items" :key="item.label" :type="item.type" class="mx-1" effect="light" round>
  9. {{ item.label }}
  10. </el-tag>
  11. </div>
  12. <div class="flex flex-wrap gap-2 my-2">
  13. <el-tag v-for="item in items" :key="item.label" :type="item.type" class="mx-1" effect="plain" round>
  14. {{ item.label }}
  15. </el-tag>
  16. </div>
  17. </template>
  18. <script lang="ts" setup>
  19. import { ref } from 'vue'
  20. import type { TagProps } from 'element-plus'
  21. type Item = { type: TagProps['type']; label: string }
  22. const items = ref<Array<Item>>([
  23. { type: '', label: 'Tag 1' },
  24. { type: 'success', label: 'Tag 2' },
  25. { type: 'info', label: 'Tag 3' },
  26. { type: 'danger', label: 'Tag 4' },
  27. { type: 'warning', label: 'Tag 5' },
  28. ])
  29. </script>