refactor: person card fallback img
This commit is contained in:
parent
c324cd6117
commit
b430f40ad6
2 changed files with 8 additions and 14 deletions
|
|
@ -12,6 +12,7 @@ defineProps<{
|
|||
male?: boolean;
|
||||
female?: boolean;
|
||||
img?: string;
|
||||
fallbackImg?: string;
|
||||
detail?: { icon: string; value: string }[];
|
||||
};
|
||||
tag?: [{ color: string; value: string }];
|
||||
|
|
@ -98,19 +99,15 @@ defineEmits<{
|
|||
<q-img
|
||||
v-if="!$slots.img"
|
||||
:src="data.img ?? '/no-profile.png'"
|
||||
style="
|
||||
object-fit: cover;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
"
|
||||
fit="cover"
|
||||
style="width: 100%; height: 100%; border-radius: 50%"
|
||||
>
|
||||
<template #error>
|
||||
<div
|
||||
style="background: none"
|
||||
class="full-width full-height items-center justify-center flex"
|
||||
class="no-padding full-width full-height flex items-center justify-center"
|
||||
>
|
||||
<q-img src="/no-profile.png" width="5rem" />
|
||||
<q-img :src="data.fallbackImg || '/no-profile.png'" fit="cover" />
|
||||
</div>
|
||||
</template>
|
||||
</q-img>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue