提交记录展示问题修复

This commit is contained in:
黄心宇 2025-06-05 14:58:50 +08:00
parent 10154577b1
commit 14fc83bfff
1 changed files with 6 additions and 2 deletions

View File

@ -242,7 +242,11 @@ function CoderDepot(props){
let ele = document.getElementById("ptxt");
if(ele){
let h = ele.offsetHeight;
if( h <= 36 ) setHideBtn(false);
if( h <= 36 ) {
setHideBtn(false);
} else {
setHideBtn(true)
}
}
}
},[projectDetail,lastCommit])
@ -589,7 +593,7 @@ function CoderDepot(props){
{
lastCommit.message &&
<div className={hideBtn && hide ? "ellipsistxt hidetxt" :"ellipsistxt"}>
<pre id="ptxt"><Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(lastCommit.sha)}`}><RenderHtml value={lastCommit.message}/></Link></pre>
<pre id="ptxt"><Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(lastCommit.sha)}`}><div className="markdown-body"><p>{lastCommit.message}</p></div></Link></pre>
</div>
}
{ hideBtn && __CLIENT__ && <div className="ellipsis" onClick={()=>changeHide(hide)}><i className="iconfont icon-shenglvehao"></i></div> }