File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
packages/ui/components/namecard Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
2
import type { NamecardUser } from ' @vuejs-jp/model'
3
+ import { onMounted , ref } from ' vue'
3
4
4
5
type NamecardAvatarLogoProps = {
5
6
user: NamecardUser
6
7
}
7
8
8
9
defineProps <NamecardAvatarLogoProps >()
10
+ const vuefesLogoImagePath = ref (' ' )
11
+ onMounted (() => {
12
+ vuefesLogoImagePath .value = new URL (' ../../assets/namecard/vuefes_logo.svg' , import .meta .url ).href
13
+ })
9
14
</script >
10
15
11
16
<template >
12
17
<template v-if =" user .avatar_url " >
13
18
<img :alt =" user.display_name" :src =" user.avatar_url" class =" avatar-logo" decoding =" async" />
14
19
</template >
15
20
<template v-else >
16
- <img
17
- alt =" vuefes logo avatar sample"
18
- src =" ../../assets/namecard/vuefes_logo.svg"
19
- class =" sample-logo"
20
- />
21
+ <img alt =" vuefes logo avatar sample" :src =" vuefesLogoImagePath" class =" sample-logo" />
21
22
</template >
22
23
</template >
23
24
You can’t perform that action at this time.
0 commit comments