diff --git a/src/pages/ideContainer/index.tsx b/src/pages/ideContainer/index.tsx index fe0f843..d954233 100644 --- a/src/pages/ideContainer/index.tsx +++ b/src/pages/ideContainer/index.tsx @@ -17,16 +17,16 @@ type UrlParamsOptions = { [key: string]: string }; -const CompListComponent = () =>
组件列表
; -const AppInstanceComponent = () =>
应用实例
; -const EventComponent = () =>
事件
; -const GlobalVarComponent = () =>
全局变量
; -const MyComponents = () =>
我的组件
; -const MatchingComponents = () =>
协同组件
; -const ComponentReview = () =>
组件审核
; -const ComponentCoding = () =>
组件编码
; -const ComponentDeployment = () =>
组件部署
; -const ComponentTest = () =>
组件测试
; +const CompListComponent = () =>
组件列表
; +const AppInstanceComponent = () =>
应用实例
; +const EventComponent = () =>
事件
; +const GlobalVarComponent = () =>
全局变量
; +const MyComponents = () =>
我的组件
; +const MatchingComponents = () =>
协同组件
; +const ComponentReview = () =>
组件审核
; +const ComponentCoding = () =>
组件编码
; +const ComponentDeployment = () =>
组件部署
; +const ComponentTest = () =>
组件测试
; function IDEContainer() { @@ -87,7 +87,7 @@ function IDEContainer() { style={{ width: subMenuWidth, height: '100%', - minHeight: 'calc(100vh - 40px)' + minHeight: 'calc(100vh - 60px)' }} onMoving={handleSubMenuResize} > diff --git a/src/pages/ideContainer/sideBar.tsx b/src/pages/ideContainer/sideBar.tsx index 4c6a135..4b6e4ae 100644 --- a/src/pages/ideContainer/sideBar.tsx +++ b/src/pages/ideContainer/sideBar.tsx @@ -1,9 +1,6 @@ import React, { useEffect, useState } from 'react'; import styles from './style/sideBar.module.less'; import { IconApps } from '@arco-design/web-react/icon'; -import { GlobalState } from '@/store'; -import { useSelector } from 'react-redux'; -import getUrlParams from '@/utils/getUrlParams'; import { menuData, menuData2 } from './config/menuData'; interface MenuItemType { @@ -20,16 +17,7 @@ interface SideBarProps { } const SideBar: React.FC = ({ onMenuSelect, selectedKey, identity }) => { - const urlParams = getUrlParams(); const [menu, setMenu] = useState([]); - const { settings } = useSelector( - (state: GlobalState) => state - ); - - const navbarHeight = 60; - const showNavbar = settings?.navbar && urlParams.navbar !== false; - const paddingTop = showNavbar ? { paddingTop: navbarHeight } : {}; - const sideBarStyle = { ...paddingTop, height: '100%' }; function getMenuData(): MenuItemType[] { switch (identity) { @@ -49,7 +37,6 @@ const SideBar: React.FC = ({ onMenuSelect, selectedKey, identity } return (
{menu.map((item, index) => ( diff --git a/src/pages/ideContainer/style/index.module.less b/src/pages/ideContainer/style/index.module.less index dd14bf0..4ae0f8f 100644 --- a/src/pages/ideContainer/style/index.module.less +++ b/src/pages/ideContainer/style/index.module.less @@ -2,7 +2,7 @@ .IDEContainer { width: 100%; - height: 100%; + height: calc(100vh - 60px); padding: 0; display: flex; flex-direction: row; @@ -24,7 +24,7 @@ padding: 16px; > div { - flex: 1; + height: 100%; } } } diff --git a/src/pages/ideContainer/style/sideBar.module.less b/src/pages/ideContainer/style/sideBar.module.less index b055968..a1915ae 100644 --- a/src/pages/ideContainer/style/sideBar.module.less +++ b/src/pages/ideContainer/style/sideBar.module.less @@ -1,21 +1,9 @@ .sider { - width: 60px; - height: 100%; - overflow-y: auto; box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.08); - z-index: 99; transition: all 0.3s ease-in-out; - position: fixed; - top: 0; - left: 0; background-color: var(--color-bg-2); } -.menu-container { - height: calc(100% - 40px); // 为底部留出空间 - overflow-y: auto; -} - .menu-item { padding: 12px 4px; text-align: center;