This commit is contained in:
caishi 2020-10-09 10:17:00 +08:00
parent 36a9f16634
commit 619acfe9e4
3 changed files with 15 additions and 4 deletions

View File

@ -17,15 +17,16 @@ function Index(props){
const [ editOpration , setEditOpration ] = useState(false);
const { owner , projectsId } = props.match.params;
const { isManager , isDeveloper } = props;
const { isManager , isDeveloper , current_user } = props;
useEffect(()=>{
if(owner&&projectsId){
if(owner && projectsId){
Init();
}
},[owner,projectsId])
useEffect(()=>{
if(isManager === true || isDeveloper === true){
if( (current_user && current_user.login) && (isManager === true || isDeveloper === true)){
setEditOpration(true);
}
},[isManager , isDeveloper])

View File

@ -14,7 +14,7 @@ class CloneAddress extends Component {
const { http_url, downloadUrl } = this.props;
return (
<div className="gitAddressClone">
<p className="addressTips"><span>版本库地址已变更请基于新地址提交代码</span></p>
{/* <p className="addressTips"><span>版本库地址已变更,请基于新地址提交代码</span></p> */}
{
http_url && <span>HTTP</span>
}

View File

@ -223,6 +223,12 @@ class Index extends Component {
this.getListData(page, limit, undefined, sort, project_type, category_id ,e === 0 ?undefined:e);
}
filterOption=(input,option)=>{
// console.log(input,option);
let o = option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
console.log(o);
}
render() {
const { current_user } = this.props;
const menu = (
@ -293,11 +299,15 @@ class Index extends Component {
<div className="list-r-operation">
<div>
<Select
showSearch
placeholder="请选择语言"
style={{width:"150px",marginRight:"20px"}}
size={"large"}
onChange={this.changeLanguage}
value={languageId}
allowClear={true}
optionFilterProp="children"
filterOption={(input,option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
>
<Select.Option key={0} value={0}>请选择语言</Select.Option>
{