mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
35 lines
713 B
Vue
35 lines
713 B
Vue
<script setup lang="ts">
|
|
import type { SelectItem } from '@nuxt/ui'
|
|
|
|
const items = ref([
|
|
{
|
|
label: 'Backlog',
|
|
value: 'backlog',
|
|
icon: 'i-lucide-circle-help'
|
|
},
|
|
{
|
|
label: 'Todo',
|
|
value: 'todo',
|
|
icon: 'i-lucide-circle-plus'
|
|
},
|
|
{
|
|
label: 'In Progress',
|
|
value: 'in_progress',
|
|
icon: 'i-lucide-circle-arrow-up'
|
|
},
|
|
{
|
|
label: 'Done',
|
|
value: 'done',
|
|
icon: 'i-lucide-circle-check'
|
|
}
|
|
] satisfies SelectItem[])
|
|
|
|
const value = ref(items.value[0]?.value)
|
|
|
|
const icon = computed(() => items.value.find(item => item.value === value.value)?.icon)
|
|
</script>
|
|
|
|
<template>
|
|
<USelect v-model="value" :items="items" value-key="value" :icon="icon" class="w-48" />
|
|
</template>
|