mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-09 05:00:30 +08:00
fix: 重新修改个人空间展示
This commit is contained in:
parent
a8c0a12404
commit
fb1a6d19de
@ -118,6 +118,43 @@ class ProjectList extends Component {
|
||||
return b.up_time - a.up_time;
|
||||
})
|
||||
projectData = [...followProject, ...noFollow]
|
||||
|
||||
const Follow = () => {
|
||||
return followProject.length ? <Row>
|
||||
<h3 className="owner-type">我的关注</h3>
|
||||
{
|
||||
followProject.map((item, index) => {
|
||||
return (
|
||||
<Col xs={8} md={6} xl={4} key={index}>
|
||||
<ProjectCard projectData={item} callbackResult={this.receiveRes} />
|
||||
</Col>)
|
||||
})
|
||||
}
|
||||
</Row> : null
|
||||
}
|
||||
const NoFollow = () => {
|
||||
return noFollow.length ? <Row style={{ borderBottom: '1px solid #eee', marginBottom: '15px' }}>
|
||||
<h3 className="owner-type">我的项目</h3>
|
||||
{
|
||||
noFollow.map((item, index) => {
|
||||
return (
|
||||
<Col xs={8} md={6} xl={4} key={index}>
|
||||
<ProjectCard projectData={item} callbackResult={this.receiveRes} />
|
||||
</Col>)
|
||||
})
|
||||
}
|
||||
</Row> : null
|
||||
}
|
||||
|
||||
const OwnerSpace = () => {
|
||||
return (projectData.length ?
|
||||
<div>
|
||||
<NoFollow />
|
||||
<Follow />
|
||||
</div>
|
||||
: <ErrMsg type="noProject" />)
|
||||
}
|
||||
|
||||
return (
|
||||
<div style={{ paddingTop: '24px' }} className="m-panel card-panel card-panel-s project-list" >
|
||||
<Row className="project-list-header">
|
||||
@ -132,13 +169,21 @@ class ProjectList extends Component {
|
||||
</Tooltip>}
|
||||
</Col>
|
||||
</Row>
|
||||
<Row gutter={16}>
|
||||
{projectData.length ? projectData.map((item, index) => {
|
||||
<Row>
|
||||
{/* {projectData.length ? projectData.map((item, index) => {
|
||||
return (
|
||||
<Col xs={8} md={6} xl={4} key={index}>
|
||||
<ProjectCard projectData={item} callbackResult={this.receiveRes} />
|
||||
</Col>);
|
||||
}) : <ErrMsg type="noProject" />}
|
||||
}) : <ErrMsg type="noProject" />} */}
|
||||
{
|
||||
/owner/.test(this.props.currGroup.role) ? <OwnerSpace /> : projectData.length ? projectData.map((item, index) => {
|
||||
return (
|
||||
<Col xs={8} md={6} xl={4} key={index}>
|
||||
<ProjectCard projectData={item} callbackResult={this.receiveRes} />
|
||||
</Col>);
|
||||
}) : <ErrMsg type="noProject" />
|
||||
}
|
||||
</Row>
|
||||
</div>
|
||||
);
|
||||
|
@ -26,6 +26,17 @@
|
||||
color: rgba(39, 56, 72, 0.85);
|
||||
font-weight: 500;
|
||||
}
|
||||
.owner-type{
|
||||
// padding: 10px;
|
||||
font-size: 15px;
|
||||
// background-color: #eee;
|
||||
// border-radius: 4px;
|
||||
// margin-bottom: 15px;
|
||||
font-weight: 400;
|
||||
margin-bottom: 0.16rem;
|
||||
border-left: 3px solid #2395f1;
|
||||
padding-left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user