feat(scene): 添加工程卡片点击打开 IDE 功能

master
钟良源 6 months ago
parent 1004569bc0
commit 4dfb66c739

@ -25,6 +25,12 @@ const Engineering: React.FC<EngineeringProps> = ({ dataType, showAdd = true }) =
const handleChange = (value: string) => {
setSearchValue(value);
};
const openEngineHandle = (index: number) => {
const ideUrl = '/ideContainer?menu=false';
window.open(ideUrl, '_blank');
};
return (
<>
<div className={style.engineeringContainer}>
@ -65,7 +71,7 @@ const Engineering: React.FC<EngineeringProps> = ({ dataType, showAdd = true }) =
</Card>
)}
</Col>
{/*遍历生成4个卡片*/}
{/*遍历生成卡片*/}
{Array.from({ length: count }).map((item, index) => (
<Col
key={index}
@ -75,7 +81,7 @@ const Engineering: React.FC<EngineeringProps> = ({ dataType, showAdd = true }) =
lg={6}
xl={6}
xxl={6}>
<Card className={style.cardStyle} hoverable>
<Card className={style.cardStyle} hoverable onClick={() => openEngineHandle(index)}>
<Result
status="info"
subTitle={'工程' + index}

@ -2,5 +2,6 @@
.cardStyle {
margin: 5px;
border: 1px solid var(--color-neutral-3);
cursor: pointer;
}
}
Loading…
Cancel
Save