From 460337abfa103d462fb77db8163717ca7b25f715 Mon Sep 17 00:00:00 2001 From: ikmkj <1@qq,com> Date: Fri, 8 Aug 2025 20:31:08 +0800 Subject: [PATCH] =?UTF-8?q?style(SidebarMenu):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E9=A1=B9=E6=B7=A1=E5=85=A5=E6=B7=A1=E5=87=BA?= =?UTF-8?q?=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为菜单项文本和操作添加过渡效果,实现平滑淡入淡出 - 修改菜单项折叠时的样式,使用透明度和宽度变化来实现淡出效果 --- biji-qianduan/src/components/home/SidebarMenu.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/biji-qianduan/src/components/home/SidebarMenu.vue b/biji-qianduan/src/components/home/SidebarMenu.vue index b098f76..9b1823a 100644 --- a/biji-qianduan/src/components/home/SidebarMenu.vue +++ b/biji-qianduan/src/components/home/SidebarMenu.vue @@ -222,12 +222,16 @@ const renderMenu = (item) => { overflow: hidden; text-overflow: ellipsis; flex-grow: 1; + transition: opacity 0.2s ease; /* Add transition for smooth fade */ + opacity: 1; } .menu-item-actions { display: none; align-items: center; gap: 5px; + transition: opacity 0.2s ease; + opacity: 1; } .el-menu:not(.el-menu--collapse) .el-menu-item:hover .menu-item-actions, @@ -237,7 +241,8 @@ const renderMenu = (item) => { .el-menu--collapse .menu-item-text, .el-menu--collapse .menu-item-actions { - display: none; + opacity: 0; /* Fade out instead of just disappearing */ + width: 0; /* Ensure it takes no space */ } .edit-icon, .delete-icon {