From e2fb2ccc2b8f2dcfea70aad38a39354af3634b8b Mon Sep 17 00:00:00 2001 From: wzhqwq Date: Tue, 28 Sep 2021 07:38:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8A=E4=BC=A0=E9=99=90?= =?UTF-8?q?=E5=88=B6=EF=BC=8C=E5=88=A0=E6=8E=89=E4=B8=8A=E4=BC=A0=E5=90=8E?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/upload/upload.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/upload/upload.js b/src/upload/upload.js index 16145cb..12633e5 100644 --- a/src/upload/upload.js +++ b/src/upload/upload.js @@ -34,7 +34,7 @@ export class UploadContainer extends Component { } handleSubmit() { - if ((this.state.msg === "" && this.file === null) || this.state.submitting) return; + if (this.file === null || this.state.submitting) return; this.setState({ submitting: true }); localStorage.removeItem('msgTemp'); } @@ -49,9 +49,7 @@ export class UploadContainer extends Component { return alert('提交内容失败:' + data); } this.setState({ submitting: false, msg: "", url: "", file: null }); - alert('内容提交成功啦').then(({ isConfirmed }) => { - if (isConfirmed) window.close(); - }); + alert('内容提交成功啦'); }); } } @@ -109,7 +107,7 @@ export class UploadContainer extends Component {