From c126893a38a08f0739bf10d891257f1995295498 Mon Sep 17 00:00:00 2001 From: ZLY Date: Wed, 17 Dec 2025 16:29:57 +0800 Subject: [PATCH] =?UTF-8?q?feat(ide):=20=E6=B7=BB=E5=8A=A0=E4=BE=A7?= =?UTF-8?q?=E8=BE=B9=E6=A0=8F=E6=8A=98=E5=8F=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/ideContainer/sideBar.tsx | 15 +++++++-- .../ideContainer/style/sideBar.module.less | 31 +++++++++++++++++++ 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/src/pages/ideContainer/sideBar.tsx b/src/pages/ideContainer/sideBar.tsx index ea114a6..58c33f6 100644 --- a/src/pages/ideContainer/sideBar.tsx +++ b/src/pages/ideContainer/sideBar.tsx @@ -22,7 +22,8 @@ import { IconPlus, IconEyeInvisible, IconExpand, - IconShrink + IconShrink, + IconLeft } from '@arco-design/web-react/icon'; import { menuData1, menuData2 } from './config/menuData'; import { Selected } from '@/pages/ideContainer/types'; @@ -350,8 +351,7 @@ const SideBar: React.FC = ({ } // 调用外部传入的菜单选择处理函数 - // 单独针对这个title过滤 - if (item.title !== '应用列表') onMenuSelect?.({ ...item }); + onMenuSelect?.({ ...item }); }; // 监听 selected 状态变化,更新 activeKey @@ -879,6 +879,15 @@ const SideBar: React.FC = ({ {renderMenuItems(filteredMenu[activeKey]?.children)} + + {/* 底部折叠按钮 */} + {!isSubMenuCollapsed &&
+ +
} } diff --git a/src/pages/ideContainer/style/sideBar.module.less b/src/pages/ideContainer/style/sideBar.module.less index 655aa8a..4d4ec03 100644 --- a/src/pages/ideContainer/style/sideBar.module.less +++ b/src/pages/ideContainer/style/sideBar.module.less @@ -65,6 +65,8 @@ border-right: 1px solid #ddd; position: relative; border-left: 1px solid #ddd; + display: flex; + flex-direction: column; .handle-box { display: flex; @@ -72,6 +74,35 @@ } } +.collapse-btn { + position: absolute; + bottom: 20px; + left: 50%; + transform: translateX(-50%); + width: 40px; + height: 40px; + display: flex; + align-items: center; + justify-content: center; + background-color: #fff; + border: 1px solid #e5e5e5; + border-radius: 50%; + cursor: pointer; + transition: all 0.2s ease-in-out; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); + z-index: 10; + + &:hover { + background-color: #f5f5f5; + border-color: #d0d0d0; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + } + + &:active { + transform: translateX(-50%) scale(0.95); + } +} + .context-menu { background: #fff; border-radius: 4px;