Skip to content

Commit 52d4994

Browse files
authored
Merge pull request #390 from vuejs-jp/fix/add-baseurl
Fix/add baseurl
2 parents bf83f4e + b0c6411 commit 52d4994

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

Diff for: apps/web/app/components/event/EventAsset.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script setup lang="ts">
22
import type { Event } from '@vuejs-jp/model'
3+
import { useWithBase } from '#imports'
34
45
interface EventAssetProps {
56
title: Extract<
@@ -10,11 +11,12 @@ interface EventAssetProps {
1011
}
1112
1213
const props = defineProps<EventAssetProps>()
14+
const withBase = useWithBase()
1315
</script>
1416

1517
<template>
1618
<NuxtImg
17-
:src="`/event/${title}.png`"
19+
:src="withBase(`/event/${title}.png`)"
1820
alt=""
1921
class="eventcard-image"
2022
:style="{ marginTop: `${marginTop}px` }"

Diff for: apps/web/app/components/ticket/NamecardSection.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<script setup lang="ts">
22
import { useLocaleCurrent } from '~/composables/useLocaleCurrent'
33
import { endedApplyNormal, endedCreateNamecard, ticketUrl } from '~/utils/constants'
4+
import { useWithBase } from '#imports'
45
56
const { locale: currentLocale } = useLocaleCurrent()
7+
const basePath = useWithBase()
68
</script>
79

810
<template>
@@ -25,7 +27,7 @@ const { locale: currentLocale } = useLocaleCurrent()
2527

2628
<div class="content-wrapper">
2729
<NuxtImg
28-
:src="'/namecard/namecard-samples.png'"
30+
:src="basePath('/namecard/namecard-samples.png')"
2931
alt="test"
3032
width="596"
3133
loading="lazy"

Diff for: apps/web/app/components/ticket/PersonalSponsorSection.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<script setup lang="ts">
22
import { endedApplyNormal, ticketUrl } from '~/utils/constants'
3+
import { useWithBase } from '#imports'
4+
const withBase = useWithBase()
35
</script>
46

57
<template>
@@ -16,7 +18,7 @@ import { endedApplyNormal, ticketUrl } from '~/utils/constants'
1618
:detail="$t(`personal_sponsor.merit${i}.detail`)"
1719
:caution="i === 2 || i === 4 ? $t(`personal_sponsor.merit${i}.caution`) : ''"
1820
>
19-
<NuxtImg alt="" :src="`/sponsor/merit-${i}.jpg`" loading="lazy" class="image" />
21+
<NuxtImg alt="" :src="withBase(`/sponsor/merit-${i}.jpg`)" loading="lazy" class="image" />
2022
</VFMeritCard>
2123
</div>
2224
<div class="personal-sponsor-text">

Diff for: apps/web/app/components/ticket/TicketSection.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ const withBase = useWithBase()
88
const ticketCards = {
99
ippan: {
1010
title: t('ticket.card.ippan.title'),
11-
imgSrc: '/ticket/ippan.png',
11+
imgSrc: withBase('/ticket/ippan.png'),
1212
imgAlt: t('ticket.card.ippan.imgAlt'),
1313
},
1414
ippanParty: {
1515
title: t('ticket.card.ippanParty.title'),
16-
imgSrc: '/ticket/ippan-party.png',
16+
imgSrc: withBase('/ticket/ippan-party.png'),
1717
imgAlt: t('ticket.card.ippanParty.imgAlt'),
1818
},
1919
handsOn: {
2020
title: t('ticket.card.handsOn.title'),
21-
imgSrc: '/ticket/hands-on.png',
21+
imgSrc: withBase('/ticket/hands-on.png'),
2222
imgAlt: t('ticket.card.handsOn.imgAlt'),
2323
},
2424
individualSponsor: {
2525
title: t('ticket.card.individualSponsor.title'),
26-
imgSrc: '/ticket/individual-sponsor.png',
26+
imgSrc: withBase('/ticket/individual-sponsor.png'),
2727
imgAlt: t('ticket.card.individualSponsor.imgAlt'),
2828
},
2929
}
@@ -58,7 +58,7 @@ const ticketCards = {
5858
<div class="ticket-cards-container">
5959
<VFTicketCard
6060
:title="ticketCards.ippan.title"
61-
:img-src="withBase(ticketCards.ippan.imgSrc)"
61+
:img-src="ticketCards.ippan.imgSrc"
6262
:img-alt="ticketCards.ippan.imgAlt"
6363
:is-close="endedApplyNormal"
6464
>

0 commit comments

Comments
 (0)