import Link from 'next/link' import { useState } from 'react' export const DropMenu = ({ link }) => { const [show, changeShow] = useState(false) const hasSubMenu = link?.subMenus?.length > 0 return
changeShow(true)} onMouseOut={() => changeShow(false)} > {!hasSubMenu && {link?.name} {hasSubMenu && } } {hasSubMenu && <>
{link?.name}
} {/* 子菜单 */} {hasSubMenu && }
} // //
// //
{link.name}
//
// // return ( // //
// //
{link.name}
//
// {link.slot} // // )