From 4a6ff31898ac63456ad3cb24338c094556a3cc22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 28 Feb 2020 20:38:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Repository/RepositoryAddFile.js | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) 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(