|
|
|
@ -5,6 +5,7 @@ import LogBar from './logBar';
|
|
|
|
import RightSideBar from './rightSideBar';
|
|
|
|
import RightSideBar from './rightSideBar';
|
|
|
|
import { getUrlParams } from '@/utils/common';
|
|
|
|
import { getUrlParams } from '@/utils/common';
|
|
|
|
import ProjectContainer from '@/pages/orchestration/project';
|
|
|
|
import ProjectContainer from '@/pages/orchestration/project';
|
|
|
|
|
|
|
|
import { ResizeBox } from '@arco-design/web-react';
|
|
|
|
|
|
|
|
|
|
|
|
interface Selected {
|
|
|
|
interface Selected {
|
|
|
|
currentPath?: string;
|
|
|
|
currentPath?: string;
|
|
|
|
@ -31,6 +32,7 @@ function IDEContainer() {
|
|
|
|
|
|
|
|
|
|
|
|
const [selected, setSelected] = useState<Selected>({});
|
|
|
|
const [selected, setSelected] = useState<Selected>({});
|
|
|
|
const [urlParams, setUrlParams] = useState<UrlParamsOptions>({});
|
|
|
|
const [urlParams, setUrlParams] = useState<UrlParamsOptions>({});
|
|
|
|
|
|
|
|
const [subMenuWidth, setSubMenuWidth] = useState(200); // 子菜单宽度状态
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
setUrlParams(getUrlParams(window.location.href) as UrlParamsOptions);
|
|
|
|
setUrlParams(getUrlParams(window.location.href) as UrlParamsOptions);
|
|
|
|
@ -65,6 +67,12 @@ function IDEContainer() {
|
|
|
|
return <div>点击左侧菜单选择需要查看的功能</div>;
|
|
|
|
return <div>点击左侧菜单选择需要查看的功能</div>;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 处理子菜单区域的拖拽调整大小
|
|
|
|
|
|
|
|
const handleSubMenuResize = (e: MouseEvent, { width }: { width: number }) => {
|
|
|
|
|
|
|
|
setSubMenuWidth(width);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<div className={styles.IDEContainer}>
|
|
|
|
<div className={styles.IDEContainer}>
|
|
|
|
@ -74,6 +82,25 @@ function IDEContainer() {
|
|
|
|
identity={urlParams.identity}
|
|
|
|
identity={urlParams.identity}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<div className={styles.content}>
|
|
|
|
<div className={styles.content}>
|
|
|
|
|
|
|
|
<ResizeBox
|
|
|
|
|
|
|
|
directions={['right']}
|
|
|
|
|
|
|
|
style={{
|
|
|
|
|
|
|
|
width: subMenuWidth,
|
|
|
|
|
|
|
|
height: '100%',
|
|
|
|
|
|
|
|
minHeight: 'calc(100vh - 40px)'
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
onMoving={handleSubMenuResize}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{/* 这里是子菜单区域,可以根据需要添加具体内容 */}
|
|
|
|
|
|
|
|
<div style={{
|
|
|
|
|
|
|
|
width: '100%',
|
|
|
|
|
|
|
|
height: '100%',
|
|
|
|
|
|
|
|
backgroundColor: '#f5f5f5',
|
|
|
|
|
|
|
|
borderRight: '1px solid #ddd'
|
|
|
|
|
|
|
|
}}>
|
|
|
|
|
|
|
|
子菜单区域
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</ResizeBox>
|
|
|
|
<div className={styles.mainContent}>
|
|
|
|
<div className={styles.mainContent}>
|
|
|
|
{renderContent()}
|
|
|
|
{renderContent()}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|