perf: add fallback without waiting for error
This commit is contained in:
parent
69dd4d67d7
commit
ca38cfaec0
1 changed files with 7 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ withDefaults(
|
||||||
age: string;
|
age: string;
|
||||||
nationality: string;
|
nationality: string;
|
||||||
documentExpireDate: string;
|
documentExpireDate: string;
|
||||||
imgUrl: string;
|
imgUrl?: string;
|
||||||
status: string;
|
status: string;
|
||||||
}[];
|
}[];
|
||||||
}>(),
|
}>(),
|
||||||
|
|
@ -116,11 +116,16 @@ const columns = [
|
||||||
>
|
>
|
||||||
<template v-slot:img-column="{ props }">
|
<template v-slot:img-column="{ props }">
|
||||||
<q-avatar class="q-mr-sm" size="md">
|
<q-avatar class="q-mr-sm" size="md">
|
||||||
<q-img :src="props.row.imgUrl" class="full-height full-width">
|
<q-img
|
||||||
|
v-if="props.row.imgUrl"
|
||||||
|
:src="props.row.imgUrl"
|
||||||
|
class="full-height full-width"
|
||||||
|
>
|
||||||
<template #error>
|
<template #error>
|
||||||
<q-img :src="fallbackImg" :ratio="1" />
|
<q-img :src="fallbackImg" :ratio="1" />
|
||||||
</template>
|
</template>
|
||||||
</q-img>
|
</q-img>
|
||||||
|
<q-img v-else :src="fallbackImg" :ratio="1" />
|
||||||
<div
|
<div
|
||||||
class="absolute-bottom-right"
|
class="absolute-bottom-right"
|
||||||
style="
|
style="
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue