Skip to content

Commit 6587092

Browse files
committed
fix: urlBasePath
1 parent 20eca36 commit 6587092

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

app/composables/useAnimation.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { urlBasePath } from '~/utils/constants'
2+
13
export function useAnimation() {
24
// types
35
type TWindowType = 'sm' | 'md' | 'lg'
@@ -99,7 +101,7 @@ export function useAnimation() {
99101
x: (GAP + GRID) / 2 + col * (GAP + GRID),
100102
y: (GAP + GRID) / 2 + row * (GAP + GRID),
101103
rotate: 0,
102-
src: '',
104+
src: urlBasePath,
103105
key: `${row}-${col}`,
104106
}
105107
switch (p) {
@@ -140,27 +142,27 @@ export function useAnimation() {
140142
break
141143
case '1':
142144
parts.type = 'head-photo'
143-
parts.src = 'image01.png'
145+
parts.src = `${urlBasePath}/image01.png`
144146
break
145147
case '2':
146148
parts.type = 'head-photo'
147-
parts.src = 'image02.png'
149+
parts.src = `${urlBasePath}/image02.png`
148150
break
149151
case '3':
150152
parts.type = 'head-photo'
151-
parts.src = 'image03.png'
153+
parts.src = `${urlBasePath}/image03.png`
152154
break
153155
case '4':
154156
parts.type = 'head-photo'
155-
parts.src = 'image04.png'
157+
parts.src = `${urlBasePath}/image04.png`
156158
break
157159
case '5':
158160
parts.type = 'head-photo'
159-
parts.src = 'image05.png'
161+
parts.src = `${urlBasePath}/image05.png`
160162
break
161163
case '6':
162164
parts.type = 'head-photo'
163-
parts.src = 'image06.png'
165+
parts.src = `${urlBasePath}/image06.png`
164166
break
165167
}
166168
return parts

0 commit comments

Comments
 (0)