From 9a8d4adad3a79a1bd43464ad70f9ca4f9cb80006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 23 Dec 2019 13:46:51 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/TPMDataset.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/tpm/TPMDataset.js b/public/react/src/modules/tpm/TPMDataset.js index 9569c5174..0cb5ba4f7 100644 --- a/public/react/src/modules/tpm/TPMDataset.js +++ b/public/react/src/modules/tpm/TPMDataset.js @@ -490,7 +490,7 @@ class TPMDataset extends Component { beforeUpload: (file) => { //上传前的操作 // console.log('beforeUpload', file.name); - this.props.showNotification(`文件上传中`); + // this.props.showNotification(`文件上传中`); const isLt300M = file.size / 1024 / 1024 <= 300; if (!isLt300M) { From 28d322ca91db400dcf5b7bc02ca9440539c04e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 23 Dec 2019 13:51:59 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/TPMDataset.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/tpm/TPMDataset.js b/public/react/src/modules/tpm/TPMDataset.js index 0cb5ba4f7..0c380467a 100644 --- a/public/react/src/modules/tpm/TPMDataset.js +++ b/public/react/src/modules/tpm/TPMDataset.js @@ -491,15 +491,15 @@ class TPMDataset extends Component { //上传前的操作 // console.log('beforeUpload', file.name); // this.props.showNotification(`文件上传中`); - const isLt300M = file.size / 1024 / 1024 <= 300; + const isLt400M = file.size / 1024 / 1024 <= 400; - if (!isLt300M) { + if (!isLt400M) { this.setState({ Buttonloading:false }) - this.props.showNotification('文件大小必须小于等于300MB!'); + this.props.showNotification('文件大小必须小于等于400MB!'); } - return isLt300M; + return isLt400M; }, }; // console.log("showmodelshowmodel"); From 73412c733019eb292e84b2c8a22c786a1f753eda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 23 Dec 2019 14:06:40 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/TPMDataset.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/tpm/TPMDataset.js b/public/react/src/modules/tpm/TPMDataset.js index 0c380467a..ecd004a92 100644 --- a/public/react/src/modules/tpm/TPMDataset.js +++ b/public/react/src/modules/tpm/TPMDataset.js @@ -459,9 +459,9 @@ class TPMDataset extends Component { } ButtonloadinghandleChange=()=>{ // this.props.showNotification(`zhzzzzz`); - // this.setState({ - // Buttonloading:true - // }) + this.setState({ + Buttonloading:false + }) } render() { const {tpmLoading, shixun, user, match} = this.props; @@ -494,9 +494,7 @@ class TPMDataset extends Component { const isLt400M = file.size / 1024 / 1024 <= 400; if (!isLt400M) { - this.setState({ - Buttonloading:false - }) + this.ButtonloadinghandleChange this.props.showNotification('文件大小必须小于等于400MB!'); } return isLt400M; @@ -548,7 +546,7 @@ class TPMDataset extends Component {