forked from Gitlink/forgeplus-react
commit add reduce
This commit is contained in:
parent
b43f650946
commit
1e1ea49951
|
|
@ -66,6 +66,14 @@ function Files({ data,history,owner,projectsId , parentsSha }){
|
|||
</div>
|
||||
)
|
||||
|
||||
function subStrContent(content){
|
||||
if(content){
|
||||
return content.slice(1);
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
return(
|
||||
<div onClick={(e)=>{e.nativeEvent.stopImmediatePropagation()}}>
|
||||
<AlignCenter className="color-grey-9" style={{position:'relative'}}>
|
||||
|
|
@ -127,7 +135,10 @@ 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>{item.content}</p>
|
||||
<p 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>
|
||||
)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -112,4 +112,9 @@
|
|||
.mergeBox{
|
||||
margin:0px auto;
|
||||
width: 1200px;
|
||||
}
|
||||
.linetype{
|
||||
width:30px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
|
@ -193,7 +193,6 @@ form .ant-cascader-picker, form .ant-select {
|
|||
width: 100px;
|
||||
padding: 0px 8px;
|
||||
box-sizing: border-box;
|
||||
margin-right: 8px;
|
||||
}
|
||||
.linesContent .lines > span:first-child{
|
||||
margin-right: 0px;
|
||||
|
|
|
|||
Loading…
Reference in New Issue