fix-plog-menubar

This commit is contained in:
tangly1024.com
2023-07-19 12:10:34 +08:00
parent f63dd835e3
commit 1cf656a4ba

View File

@@ -9,8 +9,7 @@ export const MenuItemDrop = ({ link }) => {
const hasSubMenu = link?.subMenus?.length > 0
return <li className='mx-3 my-2' >
<div className='cursor-pointer ' onMouseOver={() => changeShow(true)} onMouseOut={() => changeShow(false)}>
return <li className='cursor-pointer py-2 px-3' onMouseEnter={() => changeShow(true)} onMouseLeave={() => changeShow(false)}>
{!hasSubMenu &&
<div className="block text-black dark:text-gray-50 nav" >
<Link href={link?.to} >
@@ -27,7 +26,7 @@ export const MenuItemDrop = ({ link }) => {
}
{/* 子菜单 */}
{hasSubMenu && <ul className={`${show ? 'visible opacity-100 bottom-16 ' : 'invisible opacity-0 top-10 '} border-gray-100 bg-white rounded-lg dark:bg-black dark:border-gray-800 bg-opacity-60 transition-all duration-300 z-20 absolute block drop-shadow-lg `}>
{hasSubMenu && <ul className={`${show ? 'visible opacity-100 bottom-16 ' : 'invisible opacity-0 bottom-14'} border-gray-100 bg-white rounded-lg overflow-hidden dark:bg-black dark:border-gray-800 bg-opacity-60 transition-all duration-300 z-20 absolute block drop-shadow-lg `}>
{link.subMenus.map((sLink, index) => {
return <li key={index} className='text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-900 tracking-widest transition-all duration-200 dark:border-gray-800 py-3 pr-6 pl-3'>
<Link href={sLink.to}>
@@ -37,7 +36,5 @@ export const MenuItemDrop = ({ link }) => {
})}
</ul>}
</div>
</li>
</li>
}