diff --git a/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFile.js b/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFile.js index 785d93830..45b96a6ed 100644 --- a/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFile.js +++ b/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFile.js @@ -73,6 +73,9 @@ const mirrorNameModeMap = { class RepositoryAddFile extends Component { constructor(props) { super(props); + this.state = { + path:"" + } } componentDidMount(){ @@ -88,9 +91,12 @@ class RepositoryAddFile extends Component { newfilspath=newfilspath+'/'+item; } }) + this.setState({ + path:newfilspath + }) this.props.form.setFieldsValue({ - path:newfilspath, + path: newfilspath, }); } } @@ -147,6 +153,14 @@ class RepositoryAddFile extends Component { } }) } + setinput=(e)=>{ + this.setState({ + path:e.target.value + }) + this.props.form.setFieldsValue({ + path:e.target.value, + }); + } render(){ const {getFieldDecorator} = this.props.form; let { shixunId } = this.props.match.params; @@ -159,6 +173,7 @@ class RepositoryAddFile extends Component { if(matchpath.indexOf("secret_repository")>-1){ Repositoryflag ="secret_repository"; } + return(
@@ -237,10 +252,11 @@ class RepositoryAddFile extends Component { }], })( - 提示:输入 / 可以将文件创建到新文件夹下 + this.setinput(e)}/>提示:输入 / 可以将文件创建到新文件夹下 )} +