feat: 导航菜单改为 hover 触发
为所有导航菜单组件添加 trigger="hover" 属性,使菜单在鼠标悬停时自动展开,提升用户体验。 修改的组件: - DesktopNav.js: 4 个主导航菜单(高频跟踪、行情复盘、AGENT社群、联系我们) - MoreMenu.js: 平板版"更多"下拉菜单 - PersonalCenterMenu.js: 个人中心下拉菜单 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -46,7 +46,7 @@ const DesktopNav = memo(({ isAuthenticated, user }) => {
|
|||||||
return (
|
return (
|
||||||
<HStack spacing={8}>
|
<HStack spacing={8}>
|
||||||
{/* 高频跟踪 */}
|
{/* 高频跟踪 */}
|
||||||
<Menu>
|
<Menu trigger="hover">
|
||||||
<MenuButton
|
<MenuButton
|
||||||
as={Button}
|
as={Button}
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
@@ -102,7 +102,7 @@ const DesktopNav = memo(({ isAuthenticated, user }) => {
|
|||||||
</Menu>
|
</Menu>
|
||||||
|
|
||||||
{/* 行情复盘 */}
|
{/* 行情复盘 */}
|
||||||
<Menu>
|
<Menu trigger="hover">
|
||||||
<MenuButton
|
<MenuButton
|
||||||
as={Button}
|
as={Button}
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
@@ -160,7 +160,7 @@ const DesktopNav = memo(({ isAuthenticated, user }) => {
|
|||||||
</Menu>
|
</Menu>
|
||||||
|
|
||||||
{/* AGENT社群 */}
|
{/* AGENT社群 */}
|
||||||
<Menu>
|
<Menu trigger="hover">
|
||||||
<MenuButton as={Button} variant="ghost" rightIcon={<ChevronDownIcon />}>
|
<MenuButton as={Button} variant="ghost" rightIcon={<ChevronDownIcon />}>
|
||||||
AGENT社群
|
AGENT社群
|
||||||
</MenuButton>
|
</MenuButton>
|
||||||
@@ -183,7 +183,7 @@ const DesktopNav = memo(({ isAuthenticated, user }) => {
|
|||||||
</Menu>
|
</Menu>
|
||||||
|
|
||||||
{/* 联系我们 */}
|
{/* 联系我们 */}
|
||||||
<Menu>
|
<Menu trigger="hover">
|
||||||
<MenuButton as={Button} variant="ghost" rightIcon={<ChevronDownIcon />}>
|
<MenuButton as={Button} variant="ghost" rightIcon={<ChevronDownIcon />}>
|
||||||
联系我们
|
联系我们
|
||||||
</MenuButton>
|
</MenuButton>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const MoreMenu = memo(({ isAuthenticated, user }) => {
|
|||||||
if (!isAuthenticated || !user) return null;
|
if (!isAuthenticated || !user) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Menu>
|
<Menu trigger="hover">
|
||||||
<MenuButton
|
<MenuButton
|
||||||
as={Button}
|
as={Button}
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ const PersonalCenterMenu = memo(({ user, handleLogout }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Menu>
|
<Menu trigger="hover">
|
||||||
<MenuButton
|
<MenuButton
|
||||||
as={Button}
|
as={Button}
|
||||||
size="sm"
|
size="sm"
|
||||||
|
|||||||
Reference in New Issue
Block a user