| 1 | <template> |
| 2 | <Badge> |
| 3 | <template #value> |
| 4 | <div class="flex items-center gap-2"> |
| 5 | <PlatformIcon :platform :size="14" /> |
| 6 | <span class="whitespace-nowrap">{{ platformName }}</span> |
| 7 | </div> |
| 8 | </template> |
| 9 | </Badge> |
| 10 | </template> |
| 11 | |
| 12 | <script setup lang="ts"> |
| 13 | import { computed } from "vue" |
| 14 | import Badge from "@/components/common/Badge.vue" |
| 15 | import PlatformIcon from "@/components/common/PlatformIcon.vue" |
| 16 | import { getOS } from "@/utils" |
| 17 | |
| 18 | const { platform } = defineProps<{ platform: string }>() |
| 19 | |
| 20 | const platformName = computed(() => getOS(platform)) |
| 21 | </script> |