From 8b161630c3d8ac9882e0a9c6bdb4de7f4906e386 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 11 Jun 2021 16:46:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=88=90=E5=91=98--=E9=9A=8F?= =?UTF-8?q?=E4=BE=BF=E8=BE=93=E5=85=A5=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=97=B6=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Component/AddMember.jsx | 10 +++++++--- src/forge/Head/Header.js | 2 +- src/forge/Settings/Collaborator.js | 2 +- src/forge/Team/Group/Setting/GroupMemberSetting.jsx | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/forge/Component/AddMember.jsx b/src/forge/Component/AddMember.jsx index f1c14f07f..f927850c8 100644 --- a/src/forge/Component/AddMember.jsx +++ b/src/forge/Component/AddMember.jsx @@ -4,7 +4,7 @@ import axios from 'axios'; import { getImageUrl } from 'educoder'; const { Option } = AutoComplete; -function AddMember({getID,login}){ +function AddMember({getID,login,showNotification}){ const [ id , setID ] = useState(undefined); const [ source , setSource ] = useState(undefined); const [ searchKey , setSearchKey ] = useState(undefined); @@ -66,8 +66,12 @@ function AddMember({getID,login}){ }; function addCollaborator(){ - getID && getID(id); - setSearchKey(undefined); + if(source && source.length>0){ + getID && getID(id); + setSearchKey(undefined); + }else{ + showNotification("请选择存在的用户!"); + } } return( diff --git a/src/forge/Head/Header.js b/src/forge/Head/Header.js index 86bb52c54..0ea38b41b 100644 --- a/src/forge/Head/Header.js +++ b/src/forge/Head/Header.js @@ -92,7 +92,7 @@ class NewHeader extends Component { className={`search-input mr20`} onSearch={(value)=>this.onGlobalSearch(value,item)} autoFocus={true} - style={{width:"190px"}} + style={{width:"260px"}} /> ) diff --git a/src/forge/Settings/Collaborator.js b/src/forge/Settings/Collaborator.js index 4ae292633..0b94eee5b 100644 --- a/src/forge/Settings/Collaborator.js +++ b/src/forge/Settings/Collaborator.js @@ -34,7 +34,7 @@ function Collaborator(props){ } { nav === "1" ? - + : } diff --git a/src/forge/Team/Group/Setting/GroupMemberSetting.jsx b/src/forge/Team/Group/Setting/GroupMemberSetting.jsx index 847dd6ef4..a0d8ec781 100644 --- a/src/forge/Team/Group/Setting/GroupMemberSetting.jsx +++ b/src/forge/Team/Group/Setting/GroupMemberSetting.jsx @@ -146,7 +146,7 @@ export default ((props) => { <span>团队成员管理</span> - <AddMember getID={getID}/> + <AddMember getID={getID} showNotification={props.showNotification}/>