"use client" import { useEffect, useState } from "react" import Link from "next/link" import { usePathname } from "next/navigation" import { cn } from "@/lib/utils" import { Database, LayoutDashboard, Settings, Users, Target, X, ChevronDown, ChevronRight, Tag, BarChart3, TrendingUp, } from "lucide-react" import { Badge } from "@/components/ui/badge" import { Button } from "@/components/ui/button" interface MobileSidebarProps { isOpen: boolean onClose: () => void } export default function MobileSidebar({ isOpen, onClose }: MobileSidebarProps) { const pathname = usePathname() const [expandedSections, setExpandedSections] = useState({ "user-portrait": true, "user-value": false, }) const toggleSection = (section: string) => { setExpandedSections((prev) => ({ ...prev, [section]: !prev[section], })) } useEffect(() => { if (isOpen) { document.body.style.overflow = "hidden" } else { document.body.style.overflow = "unset" } return () => { document.body.style.overflow = "unset" } }, [isOpen]) const navItems = [ { title: "概览", href: "/", icon: , primary: true, }, { title: "数据集成", href: "/data-integration", icon: , primary: true, tag: "核心", }, { title: "用户画像", href: "/user-portrait", icon: , primary: true, expandable: true, section: "user-portrait", children: [ { title: "用户词", href: "/user-portrait/user-keywords", icon: , }, { title: "标签管理", href: "/user-portrait/tags", icon: , }, ], }, { title: "用户估值", href: "/user-value", icon: , primary: true, expandable: true, section: "user-value", children: [ { title: "估值模型", href: "/user-value/model", icon: , }, { title: "用户升级路径", href: "/user-value/upgrade-paths", icon: , }, ], }, ] const getTagColor = (tag: string) => { switch (tag) { case "核心": return "glass-light text-orange-700 border-orange-200" default: return "glass-light text-gray-700 border-gray-200" } } return ( <> {/* 背景遮罩 */}
{/* 侧边栏 */}
{/* 头部 */}

用户数字资产中台

{/* 导航菜单 */}
{/* 底部设置 */}
设置
) }