vue.js怎么做:有一个按钮,有一个表格,需要点击按钮时,表格高度平滑隐藏,再次点击时,高度平滑出现。
.show-catalog-enter-active {
transition: all 1s;
}
.show-catalog-leave-active {
transition: all 1s;
}
.show-catalog-enter {
height: 0;
}
.show-catalog-leave-to {
height: 0;
}
当以平滑的消失和外观包裹桌子时<transition>
,没有。一秒钟后,该块简单地消失并相应地出现。
作为备选:
选项 2与高度: