sync: soul-admin 前端 | 原因: 前端代码修改
This commit is contained in:
@@ -14,14 +14,11 @@ import {
|
||||
import { get, post } from '@/api/client'
|
||||
import { clearAdminToken } from '@/api/auth'
|
||||
|
||||
// 主菜单(核心运营 3 项)
|
||||
// 主菜单(含原「更多」下的项,直接平铺)
|
||||
const primaryMenuItems = [
|
||||
{ icon: LayoutDashboard, label: '数据概览', href: '/dashboard' },
|
||||
{ icon: BookOpen, label: '内容管理', href: '/content' },
|
||||
{ icon: Users, label: '用户管理', href: '/users' },
|
||||
]
|
||||
// 折叠区「更多」(业务模块)
|
||||
const moreMenuItems = [
|
||||
{ icon: GitMerge, label: '找伙伴', href: '/find-partner' },
|
||||
{ icon: Wallet, label: '推广中心', href: '/distribution' },
|
||||
]
|
||||
@@ -31,15 +28,10 @@ export function AdminLayout() {
|
||||
const navigate = useNavigate()
|
||||
const [mounted, setMounted] = useState(false)
|
||||
const [authChecked, setAuthChecked] = useState(false)
|
||||
const [moreExpanded, setMoreExpanded] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
setMounted(true)
|
||||
}, [])
|
||||
useEffect(() => {
|
||||
const inMore = moreMenuItems.some((item) => location.pathname === item.href)
|
||||
if (inMore) setMoreExpanded(true)
|
||||
}, [location.pathname])
|
||||
|
||||
useEffect(() => {
|
||||
if (!mounted) return
|
||||
|
||||
Reference in New Issue
Block a user