File tree Expand file tree Collapse file tree
vue/components/basecomponents Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5050}
5151
5252.avatar-list {
53- @apply flex flex-row flex-wrap gap- 4 ;
53+ @apply flex flex-row flex-wrap gap- 2 ;
5454
5555 .avatar-container {
5656 @apply flex flex-row gap- 2;
Original file line number Diff line number Diff line change 11<template >
22 <Avatar
33 :aria-label =" alt "
4- :image =" ` ${ imageUrl }?w=${ imageSize }&h=${ imageSize }&fit=crop ` "
4+ :image =" finalImageUrl "
55 :shape =" shape "
66 :size =" ' normal' !== size ? size : undefined "
77 />
@@ -37,7 +37,7 @@ const props = defineProps({
3737})
3838
3939const imageSize = computed (() => {
40- // these numbers are approximate, they were calculated with a size
40+ // these numbers are approximate; they were calculated with a size
4141 // allowing to see the image clearly
4242 if (props .size === " xlarge" ) {
4343 return 112
@@ -49,4 +49,12 @@ const imageSize = computed(() => {
4949
5050 return 32
5151})
52+
53+ const finalImageUrl = computed (() => {
54+ if (! props .imageUrl ) {
55+ return ` /img/icons/${ imageSize .value } /unknown.png`
56+ }
57+
58+ return ` ${ props .imageUrl } ?w=${ imageSize .value } &h=${ imageSize .value } &fit=crop`
59+ })
5260 </script >
You can’t perform that action at this time.
0 commit comments