From 0f09dae408dc5111bcc7011af6737d475692f3bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 7 Jan 2020 10:37:37 +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 --- .../react/src/modules/modals/Bottomsubmit.js | 2 +- .../RepositoryAddFileupload_file.js | 30 ++++--------------- 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/public/react/src/modules/modals/Bottomsubmit.js b/public/react/src/modules/modals/Bottomsubmit.js index e67728049..08872a841 100644 --- a/public/react/src/modules/modals/Bottomsubmit.js +++ b/public/react/src/modules/modals/Bottomsubmit.js @@ -40,7 +40,7 @@ class Bottomsubmit extends Component { diff --git a/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFileupload_file.js b/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFileupload_file.js index 14eddbfbc..35dfdf653 100644 --- a/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFileupload_file.js +++ b/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFileupload_file.js @@ -28,31 +28,13 @@ class RepositoryAddFileupload_files extends Component { } - handleSubmit = () =>{ - this.props.form.validateFieldsAndScroll((err, values) => { - if(!err){ - // let shixunId = this.props.match.params.shixunId; - // let url = `/shixuns/${shixunId}/add_file.json` - // axios.post(url,{ - // path:values.path, - // message:values.message, - // content:this.extend_editor.getValue() - // }).then((result)=>{ - // if(result){ - // this.props.history.push(`${result.data.url}`) - // } - // }).catch((error)=>{ - // console.log(error); - // }) - } - }) - } handleChange = (info) => { - console.log(info) - console.log(info.file) - if (info.file.status === 'done') { + if (info.file.status === 'uploading' || info.file.status === 'done') { let fileList = [...info.fileList]; + console.log(info) + console.log(info.file) + console.log(fileList) fileList = fileList.slice(-2); fileList = fileList.map(file => { if (file.response) { @@ -231,7 +213,7 @@ class RepositoryAddFileupload_files extends Component { {/* 添加新文件*/} {/* */} {/*

*/} -
+

@@ -284,7 +266,7 @@ class RepositoryAddFileupload_files extends Component {

- this.handleSubmit()}/> + ) }