educoder项目-图片不能点击

This commit is contained in:
caishi 2021-12-09 14:04:54 +08:00
parent ecd1a8444e
commit 4db125545f
3 changed files with 11 additions and 7 deletions

View File

@ -279,6 +279,7 @@ function CoderDepot(props){
// //
function returnUlr(url){ function returnUlr(url){
let enBranch = turnbar(branchName); let enBranch = turnbar(branchName);
setType('dir');
props.history.push(`/${owner}/${projectsId}/tree${enBranch?`/${enBranch}`:""}/${url}`); props.history.push(`/${owner}/${projectsId}/tree${enBranch?`/${enBranch}`:""}/${url}`);
} }
// //
@ -496,6 +497,7 @@ function CoderDepot(props){
item={item} item={item}
projectsId={projectsId} projectsId={projectsId}
goToSubRoot={goToSubRoot} goToSubRoot={goToSubRoot}
platform={props.platform}
/> />
) )
}) })

View File

@ -8,13 +8,18 @@ const typeIco = {
"dir":"icon-wenjianjia4 font-15 color-blue_4C" "dir":"icon-wenjianjia4 font-15 color-blue_4C"
} }
function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId }){ function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId , platform }){
return( return(
<li> <li>
<span> <span>
<a onClick={()=>goToSubRoot(item.path,item.type,item.name)} className={item.type === "submodule" && "submoduleStyle"}> {
<i className={`iconfont ${typeIco[`${item.type}`]} mr8`}></i>{item.name} (!platform && item.image_type) ?
</a> <span><i className={`iconfont ${typeIco[`${item.type}`]} mr8`}></i>{item.name}</span>
:
<a onClick={()=>goToSubRoot(item.path,item.type,item.name)} className={item.type === "submodule" && "submoduleStyle"}>
<i className={`iconfont ${typeIco[`${item.type}`]} mr8`}></i>{item.name}
</a>
}
</span> </span>
<span title="init project"> <span title="init project">
<Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.commit && item.commit.sha}`)}`} title={item.commit && item.commit.message}> <Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.commit && item.commit.sha}`)}`} title={item.commit && item.commit.message}>

View File

@ -1,6 +1,3 @@
i.iconfont {
cursor: pointer;
}
.overflowHidden1 { .overflowHidden1 {
overflow: hidden; overflow: hidden;