Vue does not use show if to control cube translation

can vue only use show and if to control animation?
how do I use a button to control an existing square to slide to the right? And the button can be reused

Jul.06,2022

http://jsrun.net/uWXKp/edit

above is demo, : style and transition: all 1s; Bar


Why use vue to control animation? just leave the animation to css. Bind the triggered event to the button, and use vue to add and remove classes to control the effect of sliding.

Menu