新建文件

This commit is contained in:
caicai8 2020-04-22 18:45:03 +08:00
parent 6f3d0cadff
commit d3ce0ed9c3
4 changed files with 6 additions and 8 deletions

View File

@ -43,7 +43,6 @@
<!--需要去build js配置--> <!--需要去build js配置-->
<link rel="stylesheet" type="text/css" href="/css/iconfont.css"> <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"> <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/quill/1.3.7/quill.core.min.css">
<style> <style>

View File

@ -316,7 +316,7 @@ class CoderRootDirectory extends Component{
} }
} }
const urlRoot = `/${filePath}`; const urlRoot = filePath === undefined ? '':`/${filePath}`;
const { projectDetail } = this.props; const { projectDetail } = this.props;
let array = filePath && filePath.split("/"); let array = filePath && filePath.split("/");
return( return(
@ -352,12 +352,12 @@ class CoderRootDirectory extends Component{
} }
</div> </div>
<div className="f-wrap-alignCenter"> <div className="f-wrap-alignCenter">
{ {/* {
subFileType !== "file" && (isManager || isDeveloper) && subFileType !== "file" && (isManager || isDeveloper) && */}
<p className="addFile mr30"> <p className="addFile mr30">
<Link to={`/projects/${projectsId}/coders/${branch}/newfile${urlRoot}`} >新建文件</Link> <Link to={`/projects/${projectsId}/coders/${branch}/newfile${urlRoot}`} >新建文件</Link>
</p> </p>
} {/* } */}
{ {
http_url && <CloneAddress http_url={http_url} downloadUrl={downloadUrl} showNotification={this.props.showNotification}></CloneAddress> http_url && <CloneAddress http_url={http_url} downloadUrl={downloadUrl} showNotification={this.props.showNotification}></CloneAddress>
} }

View File

@ -155,8 +155,7 @@ class Detail extends Component{
} }
componentDidUpdate=(prevState)=>{ componentDidUpdate=(prevState)=>{
if((prevState.match.params.projectsId !== this.props.match.params.projectsId)){
if((prevState.match.params.projectsId !== this.props.match.params.projectsId) || (prevState.location.pathname.indexOf("newfile") !== -1)){
this.getDetail(); this.getDetail();
} }
} }

View File

@ -22,7 +22,7 @@ class Index extends Component{
} }
// 取消,弹框询问 // 取消,弹框询问
CancelAddFile=()=>{ CancelAddFile=()=>{
this.props.history.goBack();
} }
changeEditor=(editorValue)=>{ changeEditor=(editorValue)=>{