How to achieve translation transition in VUE?

https://jsfiddle.net/7Lypucvo.

can I use < transition > of vue to realize the horizontal bar translation transition at the bottom?

I looked at the official documents and it seems that I can only add in and leave the transition?

Mar.28,2021

Yes.
first analyze the animation
Animation has two directions, left to right. This can monitor the selected index, to be obtained by comparing the new and old values.
if implemented with the transition component, the transition component triggers if the dom is visible and hidden. Then we need four border elements to switch between explicit and implicit triggers transition.
DEMO

We can achieve
without using the transition component. We can display the transition effect by zooming horizontally with the pseudo elements of each item. Use transform-origin to control the direction of the transition

Control scaling
.item {
  padding: 20px;
  background-color: -sharpfff;
  position: relative;
  &:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: -sharp00f;
    transform: scaleX(0);
    transition: transform 0.3s;
  }
  &.active {
    &:after {
      transform: scaleX(1);
    }
  }
}
  .isLeft {
    .item {
      &:after {
        transform-origin: 0 100%;
      }
      &.active {
        &:after {
          transform-origin: 100% 0;
        }
      }
    }
  }

  .isRight {
    .item {
      &:after {
        transform-origin: 100% 0;
      }
      &.active {
        &:after {
          transform-origin: 0 100%;
        }
      }
    }
  }
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e976-2c419.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e976-2c419.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?