diff --git a/frontend/src/pages/Layout/Sidebar.tsx b/frontend/src/pages/Layout/Sidebar.tsx index 06a5da3..71ffb00 100644 --- a/frontend/src/pages/Layout/Sidebar.tsx +++ b/frontend/src/pages/Layout/Sidebar.tsx @@ -108,6 +108,12 @@ const AsiderAndHeaderLayout = () => { selectedKeys={[activeItem]} defaultOpenKeys={["synthesis"]} onClick={({ key }) => { + // 查找菜单项,检查是否有外部链接 + const menuItem = menuItems.find((item) => item.id === key); + if (menuItem?.externalLink) { + window.open(menuItem.externalLink, "_blank"); + return; + } setActiveItem(key); navigate(`/data/${key}`); }} diff --git a/frontend/src/pages/Layout/menu.tsx b/frontend/src/pages/Layout/menu.tsx index eb33bb2..c442354 100644 --- a/frontend/src/pages/Layout/menu.tsx +++ b/frontend/src/pages/Layout/menu.tsx @@ -8,6 +8,7 @@ import { GitBranch, Zap, Shield, + Sparkles, // Database, // Store, // Merge, @@ -42,6 +43,14 @@ export const menuItems = [ description: "对数据进行标注和标记", color: "bg-green-500", }, + { + id: "content-generation", + title: "内容生成", + icon: Sparkles, + description: "智能内容生成与创作", + color: "bg-purple-500", + externalLink: "https://www.baidu.com", + }, // { // id: "synthesis", // title: "数据合成",