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 {