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

Loading…
Cancel
Save