fix(优化子菜单闪烁代码)

This commit is contained in:
LooseLi
2025-03-24 15:19:51 +08:00
parent 2ac4f9f931
commit 72e63950a9
2 changed files with 5 additions and 3 deletions

View File

@@ -28,9 +28,9 @@ export const MenuItemDrop = ({ link }) => {
<div className='cursor-pointer hover:bg-black hover:bg-opacity-10 rounded-2xl flex justify-center items-center px-3 py-1 no-underline tracking-widest relative'>
{link?.icon && <i className={link?.icon} />} {link?.name}
{/* 主菜单下方的安全区域 */}
{
{show && (
<div className='absolute w-full h-4 -bottom-4 left-0 bg-transparent z-30'></div>
}
)}
</div>
</>
)}

View File

@@ -34,7 +34,9 @@ export const MenuItemDrop = ({ link }) => {
<i
className={`px-2 fa fa-angle-down duration-300 ${show ? 'rotate-180' : 'rotate-0'}`}></i>
{/* 主菜单下方的安全区域 */}
<div className='absolute w-full h-3 -bottom-1 left-0 bg-transparent z-30'></div>
{show && (
<div className='absolute w-full h-3 -bottom-1 left-0 bg-transparent z-30'></div>
)}
</div>
</>
)}