How to dynamically modify the custom transition class name of Transition in Vue?

problem description

use Animate.css to switch components. I want to modify the animation effect dynamically, but the following two class names of transition (enter-active-class,leave-active-class) cannot be bound, nor can I modify them directly with DOM.

related codes

< transition

  name="fade"
  enter-active-class="animated fadeInRight"
  leave-active-class="animated fadeOutLeft"
>
  <component
    class="view_item"
    v-bind:is="currentTabComponent"
  ></component>
</transition>
Apr.15,2022

can actually be bound, but I haven't learned enough

< transition

  name="fade"
  :enter-active-class="enterClass"
  :leave-active-class="leaveClass"
>
  <component
    class="view_item"
    v-bind:is="currentTabComponent"
  ></component>
</transition>

data() {
return {     
  enterClass: "animated fadeInRight",
  leaveClass: "animated fadeOutLeft"
};

},
methods: {
animationSwitch (enter, leave) {

  this.enterClass = `animated ${enter}`;
  this.leaveClass = `animated ${leave}`;
}

}

Menu