添加过渡动画

This commit is contained in:
zyronon
2023-08-09 23:19:29 +08:00
parent 2d362184c6
commit 15d4e95b57
4 changed files with 119 additions and 93 deletions

17
src/assets/css/anim.scss Normal file
View File

@@ -0,0 +1,17 @@
.list-move, /* 对移动中的元素应用的过渡 */
.list-enter-active,
.list-leave-active {
transition: all 0.5s ease;
}
.list-enter-from,
.list-leave-to {
opacity: 0;
transform: translateX(30px);
}
/* 确保将离开的元素从布局流中删除
以便能够正确地计算移动的动画。 */
.list-leave-active {
position: absolute;
}

View File

@@ -1,5 +1,6 @@
@import "@icon-park/vue-next/styles/index.css";
@import "colors";
@import "anim";
html, body {
padding: 0;