feat(SelectMenu): new component (#103)

This commit is contained in:
Benjamin Canac
2024-05-13 14:26:01 +02:00
committed by GitHub
parent 8baee1292f
commit 7a376b5e49
23 changed files with 2318 additions and 196 deletions

View File

@@ -135,12 +135,7 @@ const groups = computed(() => props.items?.length ? (Array.isArray(props.items[0
{{ item.label }}
</SelectLabel>
<SelectSeparator v-else-if="item?.type === 'separator'" :class="ui.separator()" />
<SelectItem
v-else
:class="ui.item()"
:disabled="item.disabled"
:value="typeof item === 'object' ? item.value : item"
>
<SelectItem v-else :class="ui.item()" :disabled="item.disabled" :value="typeof item === 'object' ? item.value : item">
<slot name="item" :item="(item as T)" :index="index">
<slot name="item-leading" :item="(item as T)" :index="index">
<UAvatar v-if="item.avatar" size="2xs" v-bind="item.avatar" :class="ui.itemLeadingAvatar()" />