From fffeca192570c81b7a91f073f42468edf0ac6d4d Mon Sep 17 00:00:00 2001 From: ZLY Date: Fri, 26 Sep 2025 14:01:42 +0800 Subject: [PATCH] =?UTF-8?q?pref(ideContainer):=20=E7=82=B9=E5=87=BBtab?= =?UTF-8?q?=E9=A1=B9=E4=B8=8D=E5=86=8D=E8=81=94=E5=8A=A8sidebar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/ideContainer/navBar.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 (