版本库优化调整

dev_new_shixunsrepository
杨树明 5 years ago
parent ec6e606286
commit ceeabf9dc2

@ -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 (
<TreeNode disableCheckbox={this.state.ischeckevalue===item.name?false:this.state.ischecke?true:false} item={item} title={`${item.name}`} key={item.type==='tree'?"0-0":`0-0-${index}`} icon={item.type==='tree'?<i className="iconfont icon-xingzhuangjiehebeifen color-blue font-12" />:<i className="iconfont icon-xingzhuangjiehe color-blue font-12"/>} id={`file${index}`} key={index}>
<div className={"fr"}>x</div>
<TreeNode disableCheckbox={this.state.ischeckevalue===item.name?false:this.state.ischecke?true:item.type==='tree'?true:false} item={item} title={`${item.name}`} key={item.type==='tree'?"0-0":`0-0-${index}`} icon={item.type==='tree'?<i className="iconfont icon-xingzhuangjiehebeifen color-blue font-12" />:<i className="iconfont icon-xingzhuangjiehe color-blue font-12"/>} id={`file${index}`} key={index}>
</TreeNode>
)})}
</DirectoryTree>

@ -255,7 +255,7 @@ class RepositoryAddFile extends Component {
})(
<span>
<span> </span><span><Input value={this.state.path} placeholder="文件名称或文件路径" className="fl" style={{ width: 200 }} size="large" onInput={(e)=>this.setinput(e)}/></span><span className={" ml10 fl"}>
提示1.输入 文件名 可以创建一个新文件2.输入 新文件夹名/新文件名 可以创建新文件夹和新文件</span>
提示1.输入文件名可以创建一个新文件2.输入新文件夹名/新文件名可以创建新文件夹和新文件</span>
</span>
)}
</Form.Item>

Loading…
Cancel
Save