代码库主页隐藏导航栏
This commit is contained in:
parent
14546d1be4
commit
e525c48248
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Reference in New Issue