代码库主页隐藏导航栏

This commit is contained in:
谢思 2026-01-29 09:51:21 +08:00
parent 14546d1be4
commit e525c48248
3 changed files with 10 additions and 4 deletions

View File

@ -41,7 +41,7 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){
return(
<div className="commonBox readBox" id="readme">
<Anchor offsetTop={58}>
{/* <Anchor offsetTop={0}> */}
<div className="commonBox-title boxTitle">
<div className="AlignCenter">
<Dropdown overlay={menu()} trigger={['hover']} overlayClassName="menuslist">
@ -62,7 +62,7 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){
:""
}
</div>
</Anchor>
{/* </Anchor> */}
{
content &&
<div className="commonBox-info">

View File

@ -241,6 +241,9 @@ class Detail extends Component {
this.props.clearProject(e)
})
}
// 获取id为indexHOC的元素添加class名称header-none
let indexHOC = document.getElementById("indexHOC");
indexHOC && indexHOC.classList.add("header-none");
}
@ -283,6 +286,9 @@ class Detail extends Component {
}
componentWillUnmount() {
this.timerChannel && clearTimeout(this.timerChannel);
// 删除class名称header-none
let indexHOC = document.getElementById("indexHOC");
indexHOC && indexHOC.classList.remove("header-none");
}
getProject = async (data) => {

View File

@ -296,10 +296,10 @@ export function TPMIndexHOC(WrappedComponent) {
};
let path =this.props.location.pathname;
let pathCheck = path.indexOf("/zone")>-1 && path.indexOf("/newdetail")>-1 && isPhone();
const headerNone = ['/explore'].includes(this.props.match.path) || ['/:OIdentifier', '/:username'].includes(this.props.match.path) && path.split('/').length>=3;
const headerNone = ['/explore'].includes(this.props.match.path);
return (
<div className={`indexHOC ${headerNone ? "header-none" : ""}`}>
<div className={`indexHOC ${headerNone ? "header-none" : ""}`} id="indexHOC">
{(!path || (path && !path.includes('glcc') )) && <SiderBar {...this.props} {...this.state}/>}
<SystemNotice
system_notification={mygetHelmetapi && mygetHelmetapi.system_notification}