diff --git a/src/forge/Main/projecthome/v2/components/openSourceCollaboration1.jsx b/src/forge/Main/projecthome/v2/components/openSourceCollaboration1.jsx index eb21ce44b..5df9c2d31 100644 --- a/src/forge/Main/projecthome/v2/components/openSourceCollaboration1.jsx +++ b/src/forge/Main/projecthome/v2/components/openSourceCollaboration1.jsx @@ -25,6 +25,25 @@ const OpenSourceCollaboration = ({isVisible}) => { } ]; + useEffect(() => { + const interval = setInterval(() => { + setActive(prevActive => { + return prevActive === 1 ? 2 : 1; + }); + }, 6000); + + // 清理定时器 + return () => { + clearInterval(interval); + }; + }, []); + + useEffect(()=>{ + if(isVisible){ + setActive(1); + } + }, [isVisible]) + const handleFeatureClick = (feature) => { setSelectedFeature(selectedFeature === feature ? null : feature); }; diff --git a/src/forge/Main/projecthome/v2/index.scss b/src/forge/Main/projecthome/v2/index.scss index 1d1952a9d..8e0efc469 100644 --- a/src/forge/Main/projecthome/v2/index.scss +++ b/src/forge/Main/projecthome/v2/index.scss @@ -770,7 +770,7 @@ } .software-left-item { - cursor: pointer; + // cursor: pointer; max-height: max-content; &.active { @@ -957,7 +957,7 @@ height: 40px; left: 50%; transform: translateX(-50%); - bottom: 150px; + bottom: -20px; } .content-wrapper { diff --git a/src/forge/projectHome/explore/index.jsx b/src/forge/projectHome/explore/index.jsx index 8c29bcc1c..cb20b7ad4 100644 --- a/src/forge/projectHome/explore/index.jsx +++ b/src/forge/projectHome/explore/index.jsx @@ -136,7 +136,7 @@ function ProjectHomePage(props) {