forked from Gitlink/forgeplus-react
新建文件
This commit is contained in:
parent
6f3d0cadff
commit
d3ce0ed9c3
|
@ -43,7 +43,6 @@
|
|||
|
||||
<!--需要去build js配置-->
|
||||
<link rel="stylesheet" type="text/css" href="/css/iconfont.css">
|
||||
<!-- <link rel="stylesheet" type="text/css" href="/css/edu-all.css"> -->
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/quill/1.3.7/quill.core.min.css">
|
||||
<style>
|
||||
|
|
|
@ -316,7 +316,7 @@ class CoderRootDirectory extends Component{
|
|||
}
|
||||
}
|
||||
|
||||
const urlRoot = `/${filePath}`;
|
||||
const urlRoot = filePath === undefined ? '':`/${filePath}`;
|
||||
const { projectDetail } = this.props;
|
||||
let array = filePath && filePath.split("/");
|
||||
return(
|
||||
|
@ -352,12 +352,12 @@ class CoderRootDirectory extends Component{
|
|||
}
|
||||
</div>
|
||||
<div className="f-wrap-alignCenter">
|
||||
{
|
||||
subFileType !== "file" && (isManager || isDeveloper) &&
|
||||
{/* {
|
||||
subFileType !== "file" && (isManager || isDeveloper) && */}
|
||||
<p className="addFile mr30">
|
||||
<Link to={`/projects/${projectsId}/coders/${branch}/newfile${urlRoot}`} >新建文件</Link>
|
||||
</p>
|
||||
}
|
||||
{/* } */}
|
||||
{
|
||||
http_url && <CloneAddress http_url={http_url} downloadUrl={downloadUrl} showNotification={this.props.showNotification}></CloneAddress>
|
||||
}
|
||||
|
|
|
@ -155,8 +155,7 @@ class Detail extends Component{
|
|||
}
|
||||
|
||||
componentDidUpdate=(prevState)=>{
|
||||
|
||||
if((prevState.match.params.projectsId !== this.props.match.params.projectsId) || (prevState.location.pathname.indexOf("newfile") !== -1)){
|
||||
if((prevState.match.params.projectsId !== this.props.match.params.projectsId)){
|
||||
this.getDetail();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ class Index extends Component{
|
|||
}
|
||||
// 取消,弹框询问
|
||||
CancelAddFile=()=>{
|
||||
|
||||
this.props.history.goBack();
|
||||
}
|
||||
|
||||
changeEditor=(editorValue)=>{
|
||||
|
|
Loading…
Reference in New Issue