Skip to content

Commit 7c75b78

Browse files
authored
Merge pull request #334 from vuejs-jp/enhance/clipPath
fix: clipPath
2 parents a5b878d + 9338550 commit 7c75b78

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/components/shapes/HeadPhoto.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
cx="0"
1515
cy="0"
1616
r="0"
17-
clip-path="url(#clip-boundary)"
17+
:clip-path="`url(${urlBasePath}#clip-boundary)`"
1818
/>
1919
</clipPath>
2020
<image
@@ -24,11 +24,12 @@
2424
y="-60"
2525
width="120"
2626
height="120"
27-
:clip-path="`url(#${CLIP_ID})`"
27+
:clip-path="`url(${urlBasePath}#${CLIP_ID})`"
2828
/>
2929
</g>
3030
</template>
3131
<script lang="ts">
32+
import { urlBasePath } from '~/utils/constants'
3233
import type { CustomPropType } from '~/types/shims-vue'
3334
import { useAnimationParts } from '~/composables/useAnimationParts'
3435
@@ -96,7 +97,7 @@ export default defineComponent({
9697
fadeAnimations()
9798
})
9899
99-
return { transform, CLIP_ID, imageSrc }
100+
return { urlBasePath, transform, CLIP_ID, imageSrc }
100101
},
101102
})
102103
</script>

0 commit comments

Comments
 (0)