diff --git a/src/pages/ideContainer/navBar.tsx b/src/pages/ideContainer/navBar.tsx index 91f3489..04b99f8 100644 --- a/src/pages/ideContainer/navBar.tsx +++ b/src/pages/ideContainer/navBar.tsx @@ -43,7 +43,7 @@ const NavBar: React.FC = ({ selected, menuData, onTabChange, onTabC const key = selected.key; const title = selected.title; // 检查tab是否已存在 - const existingTab = tabs.find(tab => tab.key === key && tab.title === title); + const existingTab = tabs.find(tab => tab.key === (key) && tab.title === title); if (!existingTab) { // 创建新tab @@ -85,10 +85,10 @@ const NavBar: React.FC = ({ selected, menuData, onTabChange, onTabC const handleTabChange = (key: string) => { setActiveTab(key); // 查找对应的tab并通知父组件 - const tab = tabs.find(t => t.key === key); - if (tab) { - onTabChange?.(tab.key); - } + // const tab = tabs.find(t => t.key === key); + // if (tab) { + // onTabChange?.(tab.key); + // } }; return (