You couldn't animate height but you could do that using max-height
:
.shrink-enter-active,
.shrink-leave-active {
transition: all 0.5s ease-out;
max-height: 400px;
}
.shrink-enter,
.shrink-leave-to {
max-height: 0;
}
this is inspired by my sidebar component here and the code is here
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…