refactor: add show img
This commit is contained in:
parent
a9890c0968
commit
5f26c8bcdc
3 changed files with 43 additions and 11 deletions
|
|
@ -8,7 +8,9 @@ defineProps<{
|
|||
branchLabelTel: string;
|
||||
branchLabelAddress: string;
|
||||
branchLabelType: string;
|
||||
branchImgUrl: string;
|
||||
};
|
||||
|
||||
metadata?: unknown;
|
||||
badgeField?: string[];
|
||||
fieldSelected?: (
|
||||
|
|
@ -19,6 +21,8 @@ defineProps<{
|
|||
)[];
|
||||
footer?: boolean;
|
||||
}>();
|
||||
|
||||
const baseUrl = import.meta.env.VITE_API_BASE_URL;
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -36,13 +40,22 @@ defineProps<{
|
|||
>
|
||||
<div class="branch-card__header">
|
||||
<div class="branch-card__wrapper">
|
||||
<div class="branch-card__icon">
|
||||
<q-icon
|
||||
size="md"
|
||||
style="scale: 0.8"
|
||||
name="mdi-office-building-outline"
|
||||
/>
|
||||
</div>
|
||||
<q-img
|
||||
:src="baseUrl + data.branchImgUrl"
|
||||
style="
|
||||
height: 3rem;
|
||||
width: 3rem;
|
||||
border-radius: 50%;
|
||||
aspect-ratio: 1;
|
||||
overflow: visible;
|
||||
"
|
||||
>
|
||||
<template #error>
|
||||
<div class="branch-card__icon">
|
||||
<q-icon size="sm" name="mdi-office-building-outline" />
|
||||
</div>
|
||||
</template>
|
||||
</q-img>
|
||||
</div>
|
||||
<div class="branch-card__name">
|
||||
<b>{{ data.branchLabelName }}</b>
|
||||
|
|
@ -95,10 +108,14 @@ defineProps<{
|
|||
& .branch-card__icon {
|
||||
background-color: hsla(var(--_branch-card-bg) / 0.15);
|
||||
border-radius: 50%;
|
||||
padding: var(--size-1);
|
||||
padding: var(--size-2);
|
||||
position: relative;
|
||||
width: 3rem;
|
||||
transform: rotate(45deg);
|
||||
aspect-ratio: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&::after {
|
||||
content: ' ';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue