feat(Input/InputMenu/Select/SelectMenu): handle avatar prop

This commit is contained in:
Benjamin Canac
2024-10-17 18:21:12 +02:00
parent df2013ca92
commit 53a3796d1b
42 changed files with 618 additions and 842 deletions

View File

@@ -25,18 +25,9 @@ const items = ref([
}
}
])
const selected = ref(items.value[0])
const value = ref(items.value[0])
</script>
<template>
<UInputMenu v-model="selected" :items="items" class="w-40">
<template #leading="{ modelValue, ui }">
<UAvatar
v-if="modelValue"
v-bind="modelValue.avatar"
:size="ui.itemLeadingAvatarSize()"
:class="ui.itemLeadingAvatar()"
/>
</template>
</UInputMenu>
<UInputMenu v-model="value" :avatar="value?.avatar" :items="items" />
</template>