diff --git a/src/App.tsx b/src/App.tsx index 20e6ce3..b4b6295 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,7 +1,8 @@ import { useState } from 'react'; import { Dashboard } from './components/Dashboard'; -import { Sidebar } from './components/Sidebar'; +import { Sidebar, sidebarMenuItems } from './components/Sidebar'; import { Header } from './components/Header'; +import { cn } from './lib/utils'; export default function App() { const [currentView, setCurrentView] = useState('overall'); @@ -17,6 +18,28 @@ export default function App() {
+
diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index c472769..40b823d 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -1,14 +1,14 @@ import React from 'react'; -import { BarChart3, Calendar, Settings, Fuel, Users, ShieldCheck } from 'lucide-react'; +import { BarChart3, Calendar, Fuel, Users } from 'lucide-react'; import { cn } from '../lib/utils'; -export function Sidebar({ currentView, setCurrentView }: { currentView: string; setCurrentView: (v: string) => void }) { - const menuItems = [ - { id: 'overall', name: '全网运营总览', icon: Calendar }, - { id: 'users', name: '司机与车辆大盘', icon: Users }, - { id: 'efficiency', name: '站点效能监控', icon: BarChart3 }, - ]; +export const sidebarMenuItems = [ + { id: 'overall', name: '全网运营总览', icon: Calendar }, + { id: 'users', name: '司机与车辆大盘', icon: Users }, + { id: 'efficiency', name: '站点效能监控', icon: BarChart3 }, +]; +export function Sidebar({ currentView, setCurrentView }: { currentView: string; setCurrentView: (v: string) => void }) { return (