mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-31 04:07:56 +01:00
docs: refactor dropdown avatar
This commit is contained in:
@@ -87,11 +87,6 @@
|
|||||||
<button class="flex">
|
<button class="flex">
|
||||||
<UAvatar src="https://picsum.photos/200/300" />
|
<UAvatar src="https://picsum.photos/200/300" />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<template #item-with-avatar="{ item }">
|
|
||||||
<UAvatar v-if="item.avatar" :src="item.avatar" size="xxs" />
|
|
||||||
{{ item.label }}
|
|
||||||
</template>
|
|
||||||
</UDropdown>
|
</UDropdown>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -318,10 +313,9 @@ const dropdownItems = [
|
|||||||
const customDropdownItems = [
|
const customDropdownItems = [
|
||||||
[{
|
[{
|
||||||
label: 'benjamincanac',
|
label: 'benjamincanac',
|
||||||
avatar: 'https://picsum.photos/200/300',
|
avatar: { src: 'https://picsum.photos/200/300' },
|
||||||
href: 'https://google.fr',
|
href: 'https://google.fr',
|
||||||
target: '_blank',
|
target: '_blank'
|
||||||
slot: 'item-with-avatar'
|
|
||||||
}],
|
}],
|
||||||
[{
|
[{
|
||||||
label: 'About',
|
label: 'About',
|
||||||
|
|||||||
Reference in New Issue
Block a user