mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
36 lines
719 B
Vue
36 lines
719 B
Vue
<script setup lang="ts">
|
|
const items = ref([
|
|
{
|
|
label: 'benjamincanac',
|
|
value: 'benjamincanac',
|
|
avatar: {
|
|
src: 'https://github.com/benjamincanac.png',
|
|
alt: 'benjamincanac'
|
|
}
|
|
},
|
|
{
|
|
label: 'romhml',
|
|
value: 'romhml',
|
|
avatar: {
|
|
src: 'https://github.com/romhml.png',
|
|
alt: 'romhml'
|
|
}
|
|
},
|
|
{
|
|
label: 'noook',
|
|
value: 'noook',
|
|
avatar: {
|
|
src: 'https://github.com/noook.png',
|
|
alt: 'noook'
|
|
}
|
|
}
|
|
])
|
|
const value = ref(items.value[0]?.value)
|
|
|
|
const avatar = computed(() => items.value.find(item => item.value === value.value)?.avatar)
|
|
</script>
|
|
|
|
<template>
|
|
<USelect v-model="value" :avatar="avatar" :items="items" class="w-48" />
|
|
</template>
|