From 619acfe9e4310686d00dc0b9383cb30e11d97640 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 9 Oct 2020 10:17:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/About/Index.jsx | 7 ++++--- src/forge/Branch/CloneAddress.js | 2 +- src/forge/Main/Index.js | 10 ++++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/forge/About/Index.jsx b/src/forge/About/Index.jsx index b0d22f9d5..cc7e67adf 100644 --- a/src/forge/About/Index.jsx +++ b/src/forge/About/Index.jsx @@ -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]) diff --git a/src/forge/Branch/CloneAddress.js b/src/forge/Branch/CloneAddress.js index 0031407df..89cd3f4e0 100644 --- a/src/forge/Branch/CloneAddress.js +++ b/src/forge/Branch/CloneAddress.js @@ -14,7 +14,7 @@ class CloneAddress extends Component { const { http_url, downloadUrl } = this.props; return (
-

版本库地址已变更,请基于新地址提交代码

+ {/*

版本库地址已变更,请基于新地址提交代码

*/} { http_url && HTTP } diff --git a/src/forge/Main/Index.js b/src/forge/Main/Index.js index 29625d264..940170645 100644 --- a/src/forge/Main/Index.js +++ b/src/forge/Main/Index.js @@ -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 {