opti: 修改收藏按钮点击区域

This commit is contained in:
wenbo.dong 2017-08-22 20:08:21 +08:00
parent 55b2e487cb
commit c2a4b3b51a

View File

@ -76,9 +76,9 @@ class ProjectCard extends Component {
<Icon type="area-chart" className="ui-logo" /> <Icon type="area-chart" className="ui-logo" />
<h4 className="ui-title">{projectData.name || projectData.projectname}</h4> <h4 className="ui-title">{projectData.name || projectData.projectname}</h4>
</Card> </Card>
<div className="card-btns"> <div className="card-btns" onClick={projectData.follow || inFollowPage ? this.del : this.add}>
<Tooltip placement="rightTop" title={projectData.follow || inFollowPage ? '取消关注' : '添加关注'}> <Tooltip placement="rightTop" title={projectData.follow || inFollowPage ? '取消关注' : '添加关注'}>
<Icon type={projectData.follow || inFollowPage ? 'star' : 'star-o'} className="icon" onClick={projectData.follow || inFollowPage ? this.del : this.add}/> <Icon type={projectData.follow || inFollowPage ? 'star' : 'star-o'} className="icon"/>
</Tooltip> </Tooltip>
</div> </div>
</div> </div>