@@ -49,7 +49,10 @@ export default defineComponent({
4949
5050 setup(props , setupContext ) {
5151 const { createAnimation, fadeAnimation, transformPosition } = useAnimationParts ()
52- const refs = setupContext .refs
52+ const shape1 = ref ()
53+ const shape2 = ref ()
54+ const shape3 = ref ()
55+ const shape4 = ref ()
5356
5457 const KEY_FRAME1 = [' 0 -60 0 -60 0 -60' , ' -54 -60 54 -60 0 -6' ]
5558 const KEY_FRAME2 = [' -60 0 -60 0 -60 0' , ' -60 -54 -60 54 -6 0' ]
@@ -60,18 +63,18 @@ export default defineComponent({
6063
6164 const createAnimations = () => {
6265 setTimeout (() => {
63- createAnimation (refs . shape1 , { points: KEY_FRAME1 [1 ] })
64- createAnimation (refs . shape2 , { points: KEY_FRAME2 [1 ] })
65- createAnimation (refs . shape3 , { points: KEY_FRAME3 [1 ] })
66- createAnimation (refs . shape4 , { points: KEY_FRAME4 [1 ] })
66+ createAnimation (shape1 . value , { points: KEY_FRAME1 [1 ] })
67+ createAnimation (shape2 . value , { points: KEY_FRAME2 [1 ] })
68+ createAnimation (shape3 . value , { points: KEY_FRAME3 [1 ] })
69+ createAnimation (shape4 . value , { points: KEY_FRAME4 [1 ] })
6770 }, 0 )
6871 }
6972
7073 const fadeAnimations = () => {
71- fadeAnimation (refs . shape1 , { points:KEY_FRAME1 [0 ] })
72- fadeAnimation (refs . shape2 , { points:KEY_FRAME2 [0 ] })
73- fadeAnimation (refs . shape3 , { points:KEY_FRAME3 [0 ] })
74- fadeAnimation (refs . shape4 , { points:KEY_FRAME4 [0 ] })
74+ fadeAnimation (shape1 . value , { points:KEY_FRAME1 [0 ] })
75+ fadeAnimation (shape2 . value , { points:KEY_FRAME2 [0 ] })
76+ fadeAnimation (shape3 . value , { points:KEY_FRAME3 [0 ] })
77+ fadeAnimation (shape4 . value , { points:KEY_FRAME4 [0 ] })
7578 }
7679
7780 onMounted (() => {
0 commit comments