fix(子菜单闪烁问题)

This commit is contained in:
LooseLi
2025-03-24 14:54:41 +08:00
parent a3ea5c0fa3
commit d81d6e79d7

View File

@@ -25,8 +25,12 @@ export const MenuItemDrop = ({ link }) => {
{/* 含子菜单的按钮 */}
{hasSubMenu && (
<>
<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'>
<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}
{/* 主菜单下方的安全区域 */}
{
<div className='absolute w-full h-4 -bottom-4 left-0 bg-transparent z-30'></div>
}
</div>
</>
)}