提交记录代码行缩进-群里提出的问题

This commit is contained in:
caishi 2024-03-11 16:33:11 +08:00
parent c6d6d7bb1c
commit 7c8d60bdca
2 changed files with 7 additions and 5 deletions

View File

@ -131,10 +131,11 @@ function Files({ data,history,owner,projectsId , parentsSha }){
<span>{item.leftIdx && item.leftIdx !=="0" ? item.leftIdx :"" }</span>
<span>{item.rightIdx && item.rightIdx !=="0" ? item.rightIdx :"" }</span>
</span>
<p style={{display:"flex"}}>
<div style={{display:"flex"}}>
<span className="linetype">{item.type===2 ? "+" : item.type===3 ? "-" :""}</span>
{ (item.type===3 || item.type===2) ? subStrContent(item.content) : item.content}
</p>
<div dangerouslySetInnerHTML={{__html:(item.type===3 || item.type===2) ? subStrContent(item.content) : item.content}}></div>
{/* <div><span style={{whiteSpace:"pre-wrap"}}>{(item.type===3 || item.type===2) ? subStrContent(item.content) : item.content}</span></div> */}
</div>
</div>
)
})

View File

@ -182,10 +182,11 @@ form .ant-cascader-picker, form .ant-select {
color: #333;
flex-wrap: wrap;
}
.linesContent > p{
.linesContent > div{
flex:1;
word-break: break-all;
/* white-space: pre; */
white-space: pre-wrap;
font-family: auto;
}
.linesContent .lines{
display: flex;