using vue
to animate the shopping cart, I made a simplified version of demo
: https://codepen.io/jacktown/pen/JwWPrx
balls
in data
is the corresponding data of div
that is used to realize animation. Use v-show
to switch between showing and hiding, and use the hook of js
to set transform
to realize animation.
what I want to achieve is to add an animation task to tasks
each time the button is clicked, and execute the new animation as soon as there are free squares. But now, if you click to add more animation tasks before the previous animation is finished, the subsequent animation will not be executed correctly (the circle that should have performed the animation just stays in place. Instead of re-entering from the right).