From 6374619b9180bcc1285ed9a4870798b05496e7ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 2 Mar 2020 17:40:40 +0800
Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E4=BC=98=E5=8C=96?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../tpm/shixunchild/Repository/Repository.js | 17 +++++++++++------
.../shixunchild/Repository/RepositoryAddFile.js | 2 +-
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/public/react/src/modules/tpm/shixunchild/Repository/Repository.js b/public/react/src/modules/tpm/shixunchild/Repository/Repository.js
index 943bf6f9e..6a628ef79 100644
--- a/public/react/src/modules/tpm/shixunchild/Repository/Repository.js
+++ b/public/react/src/modules/tpm/shixunchild/Repository/Repository.js
@@ -28,7 +28,8 @@ class Repository extends Component {
evaluationvisible:false,
ischecke:false,
ischeckevalue:"",
- trees:undefined
+ trees:undefined,
+ treesdelecttype:true
}
}
@@ -137,6 +138,9 @@ class Repository extends Component {
}})
.then((response) => {
if(response.data.status == 0) {
+ this.setState({
+ treesdelecttype:false
+ })
this.props.showNotification("删除成功")
if(gototype===1){
if(this.state.trees.length>1){
@@ -157,8 +161,10 @@ class Repository extends Component {
}
this.setState({
ischecke:false,
- ischeckevalue:""
+ ischeckevalue:"",
+ treesdelecttype:true
})
+
}
})
.catch(function (error) {
@@ -185,7 +191,7 @@ class Repository extends Component {
};
render() {
let { match, author, git_url, lastest_commit,repositoryLoading, commits,pathArray , TPMRightSectionData } = this.props;
- let{trees}= this.state;
+ let{trees,treesdelecttype}= this.state;
let matchpath =this.props.match.path;
let Repositoryflag ="";
@@ -411,10 +417,9 @@ class Repository extends Component {
onSelect={this.onSelectDirectoryTree}
onCheck={this.onCheck}
>
- { trees === undefined ?"": trees === null || trees.length===0?"":trees.map((item, index) => {
+ {treesdelecttype===false || trees === undefined ?"": trees === null || trees.length===0?"":trees.map((item, index) => {
return (
-