forked from Gitlink/forgeplus-react
修改个人中心的样式问题
This commit is contained in:
parent
656bb38a0b
commit
d6b1da7971
|
@ -2700,6 +2700,12 @@ a.edu-txt-w80,
|
|||
.minH-560 {
|
||||
min-height: 560px;
|
||||
}
|
||||
.minH-650{
|
||||
min-height: 650px;
|
||||
}
|
||||
.minH-670{
|
||||
min-height: 670px;
|
||||
}
|
||||
|
||||
/*超出高度出现滚动条--纵向*/
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ class CommonUsers extends Component {
|
|||
);
|
||||
return (
|
||||
<div className="background-g pbt15">
|
||||
<div className="main background-f">
|
||||
<div className="main background-f minH-650">
|
||||
<div className="plr-20 user-list-items">
|
||||
<div className="font-18 pb-10 border-b-line">{type_title}</div>
|
||||
<Spin spinning={isSpin}>
|
||||
|
|
|
@ -121,7 +121,7 @@ class ForkUsers extends Component {
|
|||
};
|
||||
return (
|
||||
<div className="background-g pbt15">
|
||||
<div className="main background-f">
|
||||
<div className="main background-f minH-650">
|
||||
<div className="plr-20 user-list-items">
|
||||
<div className="font-18 pb-10 border-b-line">Fork列表</div>
|
||||
<Spin spinning={isSpin}>
|
||||
|
|
|
@ -21,7 +21,7 @@ class PraiseUsers extends Component {
|
|||
render() {
|
||||
const { projectId } = this.state;
|
||||
return (
|
||||
<div>
|
||||
<div >
|
||||
{projectId && <CommonUsers user_type="praise_users" type_title="点赞列表" project_id={projectId} current_user={this.props.current_user} />}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@ class Infos extends Component {
|
|||
<div className="bgcF">
|
||||
<div className="list-l-Menu">
|
||||
<p className="list-l-p pd20" onClick={() => this.undo_link()}>
|
||||
<span className="font-16 fwb">
|
||||
<span className="font-16 color-grey-3">
|
||||
<i className="iconfont icon-dahuizhongzuo3x font-15 mr5"></i>
|
||||
待办事项
|
||||
</span>
|
||||
|
@ -204,10 +204,10 @@ class Infos extends Component {
|
|||
)}
|
||||
<div className="bgcF">
|
||||
<ul className="list-l-Menu">
|
||||
<li className="MenuTitle fwb" onClick={() => this.change_project_type(undefined)}>
|
||||
<li className="MenuTitle" onClick={() => this.change_project_type(undefined)}>
|
||||
<i className="iconfont icon-xiangmuleixing font-15 mr5"></i>
|
||||
项目类型
|
||||
<i className="iconfont icon-youjiantou font-15 mr10 color-grey-9 pull-right"></i>
|
||||
<i className="iconfont icon-youjiantou font-15 mr20 color-grey-9 pull-right"></i>
|
||||
</li>
|
||||
<li className={project_type && project_type === "common" ? "active" : ""} onClick={() => this.change_project_type("common")}>
|
||||
<p>
|
||||
|
@ -230,7 +230,7 @@ class Infos extends Component {
|
|||
<div className="bgcF">
|
||||
<div className="list-l-Menu">
|
||||
<p className="list-l-p pd20" onClick={() => this.organize_link()} >
|
||||
<span className="font-16 fwb">
|
||||
<span className="font-16 color-grey-3">
|
||||
<i className="iconfont icon-itsm-liuchengguanli font-15 mr5"></i>
|
||||
组织
|
||||
</span>
|
||||
|
|
|
@ -29,10 +29,10 @@ class InfosUser extends Component {
|
|||
};
|
||||
|
||||
componentDidUpdate = (prevProps) => {
|
||||
if (prevProps.project_type!= this.props.project_type) {
|
||||
this.get_projects();
|
||||
}
|
||||
}
|
||||
if (prevProps.project_type != this.props.project_type) {
|
||||
this.get_projects();
|
||||
}
|
||||
};
|
||||
|
||||
get_projects = () => {
|
||||
const { user, project_type } = this.props;
|
||||
|
@ -49,7 +49,7 @@ class InfosUser extends Component {
|
|||
search,
|
||||
sort_by,
|
||||
category,
|
||||
project_type
|
||||
project_type,
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
|
@ -112,37 +112,37 @@ class InfosUser extends Component {
|
|||
</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
const button_lists =
|
||||
user && current_user && user.login === current_user.login ?
|
||||
[
|
||||
{ type: undefined, name: "所有" },
|
||||
{ type: "manage", name: "我自己的" },
|
||||
{ type: "join", name: "我参与的" },
|
||||
{ type: "watched", name: "我关注的" },
|
||||
{ type: "forked", name: "我Fork的" },
|
||||
{ type: "public", name: "公开的" },
|
||||
{ type: "private", name: "私有的" }
|
||||
]
|
||||
: [ { type: undefined, name: "所有" },
|
||||
{ type: "manage", name: "TA自己的" },
|
||||
{ type: "join", name: "TA参与的" },
|
||||
{ type: "watched", name: "TA关注的" },
|
||||
{ type: "forked", name: "TAFork的" },
|
||||
{ type: "public", name: "公开的" }]
|
||||
const button_lists =
|
||||
user && current_user && user.login === current_user.login
|
||||
? [
|
||||
{ type: undefined, name: "所有" },
|
||||
{ type: "manage", name: "我自己的" },
|
||||
{ type: "join", name: "我参与的" },
|
||||
{ type: "watched", name: "我关注的" },
|
||||
{ type: "forked", name: "我Fork的" },
|
||||
{ type: "public", name: "公开的" },
|
||||
{ type: "private", name: "私有的" },
|
||||
]
|
||||
: [
|
||||
{ type: undefined, name: "所有" },
|
||||
{ type: "manage", name: "TA自己的" },
|
||||
{ type: "join", name: "TA参与的" },
|
||||
{ type: "watched", name: "TA关注的" },
|
||||
{ type: "forked", name: "TAFork的" },
|
||||
{ type: "public", name: "公开的" },
|
||||
];
|
||||
|
||||
const category_button = button_lists.map((item, key) => {
|
||||
return (
|
||||
<span key={key} className="pr15">
|
||||
<Button
|
||||
type={
|
||||
(category && category === item.type) ||
|
||||
(!category && !item.type)
|
||||
(category && category === item.type) || (!category && !item.type)
|
||||
? "primary"
|
||||
: "default"
|
||||
}
|
||||
ghost={
|
||||
(category && category === item.type) ||
|
||||
(!category && !item.type)
|
||||
(category && category === item.type) || (!category && !item.type)
|
||||
}
|
||||
value={item.type}
|
||||
onClick={this.changeCategory}
|
||||
|
@ -172,55 +172,57 @@ class InfosUser extends Component {
|
|||
|
||||
return (
|
||||
<Spin spinning={isSpin}>
|
||||
<div className="list-r-operation">
|
||||
<Search
|
||||
placeholder="输入项目名称关键字进行搜索"
|
||||
enterButton="搜索"
|
||||
size="large"
|
||||
onSearch={this.get_projects}
|
||||
className="list-r-Search"
|
||||
value={search}
|
||||
onChange={this.changeSearchValue}
|
||||
/>
|
||||
<div>
|
||||
{current_user && user && current_user.login === user.login && (
|
||||
<Popover
|
||||
content={newItem}
|
||||
trigger={["click"]}
|
||||
placement="bottom"
|
||||
className="mr50"
|
||||
>
|
||||
<div className="minH-670">
|
||||
<div className="list-r-operation">
|
||||
<Search
|
||||
placeholder="输入项目名称关键字进行搜索"
|
||||
enterButton="搜索"
|
||||
size="large"
|
||||
onSearch={this.get_projects}
|
||||
className="list-r-Search"
|
||||
value={search}
|
||||
onChange={this.changeSearchValue}
|
||||
/>
|
||||
<div>
|
||||
{current_user && user && current_user.login === user.login && (
|
||||
<Popover
|
||||
content={newItem}
|
||||
trigger={["click"]}
|
||||
placement="bottom"
|
||||
className="mr50"
|
||||
>
|
||||
<a className="ant-dropdown-link">
|
||||
<span className="color-blue font-16">
|
||||
<img src={img_new} alt="" width="13px" /> 新建
|
||||
</span>
|
||||
</a>
|
||||
</Popover>
|
||||
)}
|
||||
|
||||
<Popover content={menu} trigger={["click"]} placement="bottom">
|
||||
<a className="ant-dropdown-link">
|
||||
<span className="color-blue font-16">
|
||||
<img src={img_new} alt="" width="13px" /> 新建
|
||||
排序 <img src={img_array} alt="" width="10px" />
|
||||
</span>
|
||||
</a>
|
||||
</Popover>
|
||||
)}
|
||||
|
||||
<Popover content={menu} trigger={["click"]} placement="bottom">
|
||||
<a className="ant-dropdown-link">
|
||||
<span className="color-blue font-16">
|
||||
排序 <img src={img_array} alt="" width="10px" />
|
||||
</span>
|
||||
</a>
|
||||
</Popover>
|
||||
</div>
|
||||
</div>
|
||||
<div className="project-list mt20">{category_button}</div>
|
||||
|
||||
{projectsList && projectsList.length > 0 ? (
|
||||
<div>
|
||||
<ListItem
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
projects={projectsList}
|
||||
></ListItem>
|
||||
</div>
|
||||
) : (
|
||||
<Nodata _html={`暂时没有项目`} />
|
||||
)}
|
||||
{pagination}
|
||||
</div>
|
||||
<div className="project-list mt20">{category_button}</div>
|
||||
|
||||
{projectsList && projectsList.length > 0 ? (
|
||||
<div>
|
||||
<ListItem
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
projects={projectsList}
|
||||
></ListItem>
|
||||
</div>
|
||||
) : (
|
||||
<Nodata _html={`暂时没有项目`} />
|
||||
)}
|
||||
{pagination}
|
||||
</Spin>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ class CommonList extends Component {
|
|||
|
||||
return (
|
||||
<Spin spinning={isSpin}>
|
||||
<div className="pd20">
|
||||
<div className="pd20 minH-650">
|
||||
<div className="grid-item pb20 bbt">
|
||||
<h3>{userType === "watch_users" ? `${title_type}关注的` : `关注${title_type}的`}</h3>
|
||||
<div className="text-right">
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
.list-right{
|
||||
width:74%;
|
||||
background: #fff;
|
||||
padding:0px;
|
||||
padding:0px !important;
|
||||
}
|
||||
.list-l-Menu{
|
||||
margin-bottom: 12px;
|
||||
|
|
|
@ -11,7 +11,7 @@ class WatcherUsers extends Component {
|
|||
render() {
|
||||
const {user, current_user} = this.props
|
||||
return (
|
||||
<div>
|
||||
<div className="minH-650">
|
||||
{user && user.login && <CommonLists userType="watch_users" login={user.login} current_user={current_user} />}
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue