This commit is contained in:
caishi 2020-12-01 16:49:24 +08:00
parent 2ba469f210
commit 57363291f1
5 changed files with 12 additions and 18 deletions

View File

@ -277,7 +277,7 @@ class Index extends Component {
</div>
<div className="baseInfo">
<span className="look"><i className="iconfont icon-dianjiliang font-12"></i>{item.visits}</span>
<span className="type">项目类型{item.category && item.category.name}</span>
<span className="type">{item.category && item.category.name}</span>
</div>
</div>
)

View File

@ -68,7 +68,7 @@
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-align: center;
text-align: right;
}
}
}

View File

@ -53,16 +53,16 @@ class IndexItem extends Component {
}
</Link>
<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>
<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>
</span>
</div>
<p className="break_word task-hide-2 mt10" style={{ maxHeight: "44px",lineHeight:"22px" }}>{item.description}</p>
<div className="p-r-about">
<span className="p-r-detail">
<span><label>浏览量</label>{item.visits}</span>
{item.category && item.category.id && <span><label>项目类别</label>{item.category.name}</span>}
{/* <span><label>浏览量:</label>{item.visits}</span> */}
{/* {item.category && item.category.id && <span>{item.category.name}</span>} */}
{item.last_update_time ? <span ><label>更新于</label>{item.time_ago}</span> : ""}
{item.language && item.language.id ? <span className="color-grey-3">{item.language.name}</span> : ""}
</span>

View File

@ -13,16 +13,14 @@ const Div = styled.div`
`;
export default Form.create()(
forwardRef(({ form, match, history }) => {
const [ pullMember, setPullMember ] = useState(undefined);
const [ pushMember, setPushMember ] = useState(undefined);
const [ list, setList ] = useState(undefined);
const { projectsId, owner } = match.params;
const { getFieldDecorator, validateFields } = form;
useEffect(() => {
const url = `/${owner}/${projectsId}/collaborators.json`;
axios.get(url).then((result) => {
setPullMember(result.data.members);
setPushMember(result.data.members);
setList(result.data.members);
})
.catch((error) => {});
}, []);
@ -48,10 +46,6 @@ export default Form.create()(
});
}
function changePull(e){
console.log("dddd",e);
}
const helper = useCallback(
(label, name, rules, widget, className, isRequired) => (
<div className={className}>
@ -84,7 +78,7 @@ export default Form.create()(
[{ required: true, message: "请选择可推送代码成员" }],
<Select placeholder="请选择仓库成员">
<Option value="0">请选择仓库成员</Option>
{getMember(pushMember)}
{getMember(list)}
</Select>,
"setSelectWidth"
)}
@ -92,9 +86,9 @@ export default Form.create()(
"可合并Pull Request成员",
"pullmember",
[{ required: true, message: "请选择可合并Pull Request成员" }],
<Select showSearch placeholder="请选择仓库成员" onChange={changePull}>
<Select placeholder="请选择仓库成员">
<Option value="0">请选择仓库成员</Option>
{getMember(pullMember)}
{getMember(list)}
</Select>,
"setSelectWidth"
)}

View File

@ -128,7 +128,7 @@ class Index extends Component {
<Route
path="/projects/:owner/:projectsId/setting/branch"
render={(props) => (
<Branch {...this.props} {...props} {...this.state} />
<Branch {...this.props} {...props } {...this.state} />
)}
></Route>
<Route