Merge pull request '标签列表显示头像、样式修改' (#143) from caishi/forgeplus-react:pre_develop_dev into pre_develop_dev
This commit is contained in:
commit
4902a26646
|
|
@ -4,6 +4,7 @@ import { Table , Tooltip , Spin } from 'antd';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { truncateCommitId } from '../../common/util';
|
import { truncateCommitId } from '../../common/util';
|
||||||
|
import { getImageUrl } from 'educoder';
|
||||||
import Nonedata from '../../Nodata';
|
import Nonedata from '../../Nodata';
|
||||||
import './Index.scss';
|
import './Index.scss';
|
||||||
import Tree from '../img/tree.png'
|
import Tree from '../img/tree.png'
|
||||||
|
|
@ -34,12 +35,12 @@ function Tags(props) {
|
||||||
dataIndex:"name",
|
dataIndex:"name",
|
||||||
key:1,
|
key:1,
|
||||||
ellipsis:true,
|
ellipsis:true,
|
||||||
|
width:"200px",
|
||||||
render:(txt,item)=>{
|
render:(txt,item)=>{
|
||||||
return(
|
return(
|
||||||
<div className="tagBranch">
|
<div className="tagBranch">
|
||||||
<Link className="hover tagClass" to={`/${owner}/${projectsId}/tree/${item.name}`}>{item.name}</Link>
|
<Link className="hover tagClass" to={`/${owner}/${projectsId}/tree/${item.name}`}>{item.name}</Link>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -51,7 +52,21 @@ function Tags(props) {
|
||||||
render:(txt,item)=>{
|
render:(txt,item)=>{
|
||||||
return (
|
return (
|
||||||
<span className="color-grey-3 tagModel">
|
<span className="color-grey-3 tagModel">
|
||||||
<Link className="mr3" style={{fontWeight:"500"}} to={`/${item.tagger && item.tagger.login}`} >{item.tagger && item.tagger.name}</Link>
|
{
|
||||||
|
item.tagger &&
|
||||||
|
<Tooltip placement="top" title={item.tagger.name}>
|
||||||
|
{
|
||||||
|
item.tagger.id ?
|
||||||
|
<Link className="mr3 tagModelImg" to={`/${item.tagger.login}`} >
|
||||||
|
<img src={getImageUrl(`/${item.tagger && item.tagger.image_url}`)} alt=""/>
|
||||||
|
</Link>
|
||||||
|
:
|
||||||
|
<span className="mr3 tagModelImg" style={{cursor:"default"}}>
|
||||||
|
<img src={getImageUrl(`/${item.tagger && item.tagger.image_url}`)} alt=""/>
|
||||||
|
</span>
|
||||||
|
}
|
||||||
|
</Tooltip>
|
||||||
|
}
|
||||||
<span>创建于{txt}</span>
|
<span>创建于{txt}</span>
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
|
|
@ -86,17 +101,17 @@ function Tags(props) {
|
||||||
key:5,
|
key:5,
|
||||||
ellipsis:true,
|
ellipsis:true,
|
||||||
align:"center",
|
align:"center",
|
||||||
width:"181px",
|
width:"204px",
|
||||||
render:(txt,item)=>{
|
render:(txt,item)=>{
|
||||||
return (
|
return (
|
||||||
<div>
|
<React.Fragment>
|
||||||
<a href={`${item.tarball_url}`} download className="btn-83">
|
<a href={`${item.tarball_url}`} download className="btn-83">
|
||||||
<i className="iconfont icon-xiazai-icon font-16 mr5"></i>TAR
|
<i className="iconfont icon-xiazai-icon font-16 mr5"></i>TAR
|
||||||
</a>
|
</a>
|
||||||
<a href={`${item.zipball_url}`} download className="btn-83">
|
<a href={`${item.zipball_url}`} download className="btn-83">
|
||||||
<i className="iconfont icon-xiazai-icon font-16 mr5"></i>ZIP
|
<i className="iconfont icon-xiazai-icon font-16 mr5"></i>ZIP
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</React.Fragment>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tbody{
|
tbody{
|
||||||
|
.btn-83{
|
||||||
|
margin:0px 8px;
|
||||||
|
}
|
||||||
tr{
|
tr{
|
||||||
&:hover td{
|
&:hover td{
|
||||||
background-color: #fff!important;
|
background-color: #fff!important;
|
||||||
|
|
@ -23,7 +26,6 @@
|
||||||
line-height: 69px;
|
line-height: 69px;
|
||||||
color:#333333;
|
color:#333333;
|
||||||
div{
|
div{
|
||||||
padding-left: 69px;
|
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -43,8 +45,7 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.tagBranch{
|
.tagBranch{
|
||||||
width: 200px;
|
padding-right: 15px;
|
||||||
margin-left: -67px;
|
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
.tagClass{
|
.tagClass{
|
||||||
|
|
@ -53,4 +54,9 @@
|
||||||
}
|
}
|
||||||
.tagModel{
|
.tagModel{
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
.tagModelImg img{
|
||||||
|
width: 25px;
|
||||||
|
height: 25px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue