feat: 自行开发设计 ui样式优化 超管端-控制台 相关的页面
This commit is contained in:
@@ -21,6 +21,7 @@ import React, { useState } from 'react';
|
||||
import { useLocation, useNavigate } from 'react-router-dom';
|
||||
import { Button, Dropdown } from '@/components/ui';
|
||||
import { Compass, ExternalLink } from 'lucide-react';
|
||||
import { isNavigationPathActive } from '../../console/consoleRoutes';
|
||||
|
||||
/**
|
||||
* 移动端主导航入口。
|
||||
@@ -41,14 +42,8 @@ const MobileNavMenu = ({ mainNavLinks, userState, t }) => {
|
||||
}
|
||||
|
||||
// 与 Navigation 一致:按完整路径段匹配,避免 /market 命中 /market-detail
|
||||
const isPathActive = (matchPath) => {
|
||||
if (!matchPath) return false;
|
||||
if (matchPath === '/') return location.pathname === '/';
|
||||
return (
|
||||
location.pathname === matchPath ||
|
||||
location.pathname.startsWith(`${matchPath}/`)
|
||||
);
|
||||
};
|
||||
const isPathActive = (matchPath) =>
|
||||
isNavigationPathActive(location.pathname, matchPath);
|
||||
|
||||
// 与 Navigation 一致:未登录时需要鉴权的入口统一引导到企业登录
|
||||
const resolveTarget = (link) => {
|
||||
@@ -122,7 +117,10 @@ const MobileNavMenu = ({ mainNavLinks, userState, t }) => {
|
||||
: '!text-gray-700 dark:!text-neutral-200'
|
||||
}`}
|
||||
>
|
||||
<span className='flex items-center gap-1.5'>
|
||||
<span
|
||||
className='flex items-center gap-1.5'
|
||||
aria-current={item.active ? 'page' : undefined}
|
||||
>
|
||||
{item.text}
|
||||
{item.externalLink && (
|
||||
<ExternalLink size={12} className='opacity-50' />
|
||||
|
||||
Reference in New Issue
Block a user