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;
|
||||
nationality: string;
|
||||
documentExpireDate: string;
|
||||
imgUrl: string;
|
||||
imgUrl?: string;
|
||||
status: string;
|
||||
}[];
|
||||
}>(),
|
||||
|
|
@ -116,11 +116,16 @@ const columns = [
|
|||
>
|
||||
<template v-slot:img-column="{ props }">
|
||||
<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>
|
||||
<q-img :src="fallbackImg" :ratio="1" />
|
||||
</template>
|
||||
</q-img>
|
||||
<q-img v-else :src="fallbackImg" :ratio="1" />
|
||||
<div
|
||||
class="absolute-bottom-right"
|
||||
style="
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue