{children}
import React from 'react'; import { Link, useLocation } from 'react-router-dom'; import { Home, Cpu, MessageSquare, Activity, Settings, Menu, X } from 'lucide-react'; import { useState } from 'react'; import { clsx } from 'clsx'; const navItems = [ { path: '/', icon: Home, label: '首页' }, { path: '/devices', icon: Cpu, label: '设备控制' }, { path: '/ai', icon: MessageSquare, label: 'AI 交互' }, { path: '/system', icon: Activity, label: '系统状态' }, ]; export const Layout: React.FC<{ children: React.ReactNode }> = ({ children }) => { const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); const location = useLocation(); return (