feat(ide): 暂时隐藏只能边栏右边tab栏,设置默认激活的tab项为2

master
钟良源 2 months ago
parent 5bbbfd0db8
commit 819ef713a5

@ -12,7 +12,7 @@ interface RightSideBarProps {
}
const RightSideBar: React.FC<RightSideBarProps> = ({ updateProjectComp }) => {
const [activeTab, setActiveTab] = useState('1');
const [activeTab, setActiveTab] = useState('2');
const [isExpanded, setIsExpanded] = useState(false);
const resizeBoxRef1 = useRef<HTMLDivElement>(null); // 引用第一个 ResizeBox 容器
const resizeBoxRef2 = useRef<HTMLDivElement>(null); // 引用第二个 ResizeBox 容器
@ -59,29 +59,29 @@ const RightSideBar: React.FC<RightSideBarProps> = ({ updateProjectComp }) => {
className={`${styles.verticalTabs} right-side-bar-tabs`}
activeTab={activeTab}
>
<TabPane
key="1"
title={
<span onClick={() => handleTabClick('1')}>
<IconApps style={{ fontSize: 16 }} />
<span></span>
</span>
}
>
{activeTab === '1' && <ResizeBox
ref={resizeBoxRef1}
className={styles['right-resize-box']}
directions={['left']}
style={{
width: isExpanded ? 550 : 0,
maxWidth: '100%',
minWidth: 0
}}
onMoving={handleResize}
>
<ChatBox></ChatBox>
</ResizeBox>}
</TabPane>
{/*<TabPane*/}
{/* key="1"*/}
{/* title={*/}
{/* <span onClick={() => handleTabClick('1')}>*/}
{/* <IconApps style={{ fontSize: 16 }} />*/}
{/* <span>智能编排</span>*/}
{/* </span>*/}
{/* }*/}
{/*>*/}
{/* {activeTab === '1' && <ResizeBox*/}
{/* ref={resizeBoxRef1}*/}
{/* className={styles['right-resize-box']}*/}
{/* directions={['left']}*/}
{/* style={{*/}
{/* width: isExpanded ? 550 : 0,*/}
{/* maxWidth: '100%',*/}
{/* minWidth: 0*/}
{/* }}*/}
{/* onMoving={handleResize}*/}
{/* >*/}
{/* <ChatBox></ChatBox>*/}
{/* </ResizeBox>}*/}
{/*</TabPane>*/}
<TabPane
key="2"
title={

Loading…
Cancel
Save