From 1fa4df60ea3fb0c8fc1516fab1c75bdb6498f16d Mon Sep 17 00:00:00 2001 From: "wenbo.dong" Date: Wed, 26 Jul 2017 15:02:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=97=B6=E5=8F=AA=E6=9C=89=E6=9C=80=E5=90=8E=E4=B8=80=E9=A1=B9?= =?UTF-8?q?=E6=9C=89=E5=88=A0=E9=99=A4=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../containers/ProjectGroups/ProjectList/UpDateModal.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/containers/ProjectGroups/ProjectList/UpDateModal.js b/client/containers/ProjectGroups/ProjectList/UpDateModal.js index 7e122b09..81ca8bb7 100644 --- a/client/containers/ProjectGroups/ProjectList/UpDateModal.js +++ b/client/containers/ProjectGroups/ProjectList/UpDateModal.js @@ -252,7 +252,7 @@ class UpDateModal extends Component { })( - {envs.length > 0 ? ( + {/* 新增的项中,只有最后一项有删除按钮 */} + { (envs.length > 0 && k._id) || (envs.length == index + 1) ? ( this.remove(k._id ? k._id : k)} + onClick={() => { + return this.remove(k._id ? k._id : k); + }} /> ) : null}