forked from Gitlink/forgeplus-react
数据为0时不显示
This commit is contained in:
parent
f162443756
commit
d9effff762
|
@ -58,8 +58,18 @@ class IndexItem extends Component {
|
||||||
}
|
}
|
||||||
</AlignCenter>
|
</AlignCenter>
|
||||||
<span className="p-r-tags">
|
<span className="p-r-tags">
|
||||||
<span className="pariseTag"><img src={img_parise} alt="" className="pariseImg" />赞 {item.praises_count}</span>
|
{
|
||||||
<span><i className="iconfont icon-fork mr3 font-16" style={{ color: "#1B8FFF" }} />fork {item.forked_count}</span>
|
item.praises_count && item.praises_count>0 ?
|
||||||
|
<span className="pariseTag">
|
||||||
|
<img src={img_parise} alt="" className="pariseImg" />赞 {item.praises_count}
|
||||||
|
</span>:""
|
||||||
|
}
|
||||||
|
{
|
||||||
|
item.forked_count && item.forked_count>0 ?
|
||||||
|
<span>
|
||||||
|
<i className="iconfont icon-fork mr3 font-16" style={{ color: "#1B8FFF" }} />fork {item.forked_count}
|
||||||
|
</span>:""
|
||||||
|
}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<p className="break_word task-hide-2 mt10" style={{ maxHeight: "44px",lineHeight:"22px" }}>{item.description}</p>
|
<p className="break_word task-hide-2 mt10" style={{ maxHeight: "44px",lineHeight:"22px" }}>{item.description}</p>
|
||||||
|
|
|
@ -285,7 +285,11 @@ class Infos extends Component {
|
||||||
<Menu.Item key="2"><Link to={`/users/${user && user.login}/projects/common`}><i className="iconfont icon-xiangmu"></i>项目</Link></Menu.Item>
|
<Menu.Item key="2"><Link to={`/users/${user && user.login}/projects/common`}><i className="iconfont icon-xiangmu"></i>项目</Link></Menu.Item>
|
||||||
{
|
{
|
||||||
current_user && user && user.login === current_user.login ?
|
current_user && user && user.login === current_user.login ?
|
||||||
<Menu.Item key="3"><Link to={`/users/${user && user.login}/notice`}><i className="iconfont icon-daibanshixiang"></i>待办事项<span className="menuNum">({undo_events})</span></Link></Menu.Item>
|
<Menu.Item key="3">
|
||||||
|
<Link to={`/users/${user && user.login}/notice`}>
|
||||||
|
<i className="iconfont icon-daibanshixiang"></i>待办事项
|
||||||
|
{undo_events && undo_events >0 ? <span className="menuNum">({undo_events})</span>:""}</Link>
|
||||||
|
</Menu.Item>
|
||||||
:""
|
:""
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@ -293,7 +297,12 @@ class Infos extends Component {
|
||||||
<Menu.Item key="4"><Link to={`/users/${user && user.login}/devops/CIService`}><i className="iconfont icon-gongzuoliu1"></i>DevOps工作流</Link></Menu.Item>
|
<Menu.Item key="4"><Link to={`/users/${user && user.login}/devops/CIService`}><i className="iconfont icon-gongzuoliu1"></i>DevOps工作流</Link></Menu.Item>
|
||||||
:""
|
:""
|
||||||
}
|
}
|
||||||
<Menu.Item key="5"><Link to={`/users/${user && user.login}/organizes`}><i className="iconfont icon-zuzhi"></i>组织<span className="menuNum">({user && user.user_org_count})</span></Link></Menu.Item>
|
<Menu.Item key="5">
|
||||||
|
<Link to={`/users/${user && user.login}/organizes`}>
|
||||||
|
<i className="iconfont icon-zuzhi"></i>组织
|
||||||
|
{ user && user.user_org_count && user.user_org_count > 0 ? <span className="menuNum">({user.user_org_count})</span>:""}
|
||||||
|
</Link>
|
||||||
|
</Menu.Item>
|
||||||
</Menu>
|
</Menu>
|
||||||
}
|
}
|
||||||
{user && (
|
{user && (
|
||||||
|
|
Loading…
Reference in New Issue