From 1998d41c506793bbad19577f5d548b35efc9a390 Mon Sep 17 00:00:00 2001 From: QMZ <1164250597@qq.com> Date: Sat, 21 Dec 2024 23:38:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=83=E7=A2=8E=E4=B9=8B=E6=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/community/community.css | 29 +--- src/views/community/PostCard.vue | 172 +++++++++++++++++-- src/views/community/Postform.vue | 218 ++++++++++++++----------- src/views/community/trends.vue | 36 ++-- 4 files changed, 315 insertions(+), 140 deletions(-) diff --git a/src/assets/css/community/community.css b/src/assets/css/community/community.css index 9cb0a82d..1c08a2b7 100644 --- a/src/assets/css/community/community.css +++ b/src/assets/css/community/community.css @@ -1,34 +1,11 @@ -/* 设置进入和离开的过渡效果 */ - .post-list .fade-leave-active { transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out; } -.post-list .fade-enter-active { - transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out; -} - -/* 元素进入时,缩放并渐变 */ -.post-list .fade-leave-to /* .fade-leave-active in Vue 2.x */ { - opacity: 0; - transform: scale(0.5); /* 初始状态为缩小 */ -} -.post-list .fade-enter{ - opacity: 0; - transform: scale(0.5); /* 初始状态为缩小 */ -} - -/* 元素进入时恢复到原尺寸 */ -.post-list .fade-enter-to { - opacity: 1; - transform: scale(1); /* 变大恢复正常尺寸 */ -} - -/* 元素离开时,继续保持缩小状态 */ -.post-list .fade-leave-to { - opacity: 0; - transform: scale(0.5); /* 离开时缩小 */ +.post-list .fade-leave-to /* 离开完成后状态 */ +{ + transform: translateX(100%) scale(0.5); /* 离开时从右边滑出并缩小 */ } diff --git a/src/views/community/PostCard.vue b/src/views/community/PostCard.vue index 7846c84b..0432b027 100644 --- a/src/views/community/PostCard.vue +++ b/src/views/community/PostCard.vue @@ -1,11 +1,11 @@