@@ -49,7 +49,10 @@ export default defineComponent({
49
49
50
50
setup(props , setupContext ) {
51
51
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 ()
53
56
54
57
const KEY_FRAME1 = [' 0 -60 0 -60 0 -60' , ' -54 -60 54 -60 0 -6' ]
55
58
const KEY_FRAME2 = [' -60 0 -60 0 -60 0' , ' -60 -54 -60 54 -6 0' ]
@@ -60,18 +63,18 @@ export default defineComponent({
60
63
61
64
const createAnimations = () => {
62
65
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 ] })
67
70
}, 0 )
68
71
}
69
72
70
73
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 ] })
75
78
}
76
79
77
80
onMounted (() => {
0 commit comments