|
| 1 | +import { urlBasePath } from '~/utils/constants' |
| 2 | + |
1 | 3 | export function useAnimation() {
|
2 | 4 | // types
|
3 | 5 | type TWindowType = 'sm' | 'md' | 'lg'
|
@@ -99,7 +101,7 @@ export function useAnimation() {
|
99 | 101 | x: (GAP + GRID) / 2 + col * (GAP + GRID),
|
100 | 102 | y: (GAP + GRID) / 2 + row * (GAP + GRID),
|
101 | 103 | rotate: 0,
|
102 |
| - src: '', |
| 104 | + src: urlBasePath, |
103 | 105 | key: `${row}-${col}`,
|
104 | 106 | }
|
105 | 107 | switch (p) {
|
@@ -140,27 +142,27 @@ export function useAnimation() {
|
140 | 142 | break
|
141 | 143 | case '1':
|
142 | 144 | parts.type = 'head-photo'
|
143 |
| - parts.src = 'image01.png' |
| 145 | + parts.src = `${urlBasePath}/image01.png` |
144 | 146 | break
|
145 | 147 | case '2':
|
146 | 148 | parts.type = 'head-photo'
|
147 |
| - parts.src = 'image02.png' |
| 149 | + parts.src = `${urlBasePath}/image02.png` |
148 | 150 | break
|
149 | 151 | case '3':
|
150 | 152 | parts.type = 'head-photo'
|
151 |
| - parts.src = 'image03.png' |
| 153 | + parts.src = `${urlBasePath}/image03.png` |
152 | 154 | break
|
153 | 155 | case '4':
|
154 | 156 | parts.type = 'head-photo'
|
155 |
| - parts.src = 'image04.png' |
| 157 | + parts.src = `${urlBasePath}/image04.png` |
156 | 158 | break
|
157 | 159 | case '5':
|
158 | 160 | parts.type = 'head-photo'
|
159 |
| - parts.src = 'image05.png' |
| 161 | + parts.src = `${urlBasePath}/image05.png` |
160 | 162 | break
|
161 | 163 | case '6':
|
162 | 164 | parts.type = 'head-photo'
|
163 |
| - parts.src = 'image06.png' |
| 165 | + parts.src = `${urlBasePath}/image06.png` |
164 | 166 | break
|
165 | 167 | }
|
166 | 168 | return parts
|
|
0 commit comments