fix: show avatar with name if there is only one avatar in list
This commit is contained in:
parent
2a51773225
commit
929fd98f13
@ -1,9 +1,24 @@
|
||||
<template>
|
||||
<div
|
||||
v-if="avatars?.length"
|
||||
class="mr-1.5 flex cursor-pointer flex-row-reverse items-center"
|
||||
class="mr-1.5 flex cursor-pointer items-center"
|
||||
:class="[avatars?.length > 1 ? 'flex-row-reverse' : 'truncate [&>div]:truncate']"
|
||||
>
|
||||
<Tooltip
|
||||
v-if="avatars?.length == 1"
|
||||
:text="avatars[0].name"
|
||||
class="flex items-center gap-2 text-base"
|
||||
>
|
||||
<Avatar
|
||||
shape="circle"
|
||||
:image="avatars[0].image"
|
||||
:label="avatars[0].label"
|
||||
size="md"
|
||||
/>
|
||||
<div class="truncate">{{ avatars[0].label }}</div>
|
||||
</Tooltip>
|
||||
<Tooltip
|
||||
v-else
|
||||
:text="avatar.name"
|
||||
v-for="avatar in reverseAvatars"
|
||||
:key="avatar.name"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user