From 6fba0358159ce73a49f35d4e319a5dbe7579d854 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, 2 Jul 2019 18:08:30 +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 --- public/react/src/common/UnitUtil.js | 10 +++++----- .../src/modules/courses/Resource/Fileslistitem.js | 2 +- public/react/src/modules/login/LoginDialog.js | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/public/react/src/common/UnitUtil.js b/public/react/src/common/UnitUtil.js index bb3267aa4..ea4fb9e96 100644 --- a/public/react/src/common/UnitUtil.js +++ b/public/react/src/common/UnitUtil.js @@ -1,6 +1,6 @@ -export function bytesToSize(bytes) { - var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; - if (bytes == 0) return '0 Byte'; - var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))); - return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[i]; +export function bytesToSize(bytes) { + var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; + if (bytes == 0) return '0 Byte'; + var i = Math.floor(Math.log(bytes) / Math.log(1024)); + return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[i]; } \ No newline at end of file diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index c778e14c7..b52efd3c1 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -233,7 +233,7 @@ class Fileslistitem extends Component{ :"" } - {discussMessage.is_publish===true?:""} + {discussMessage.is_publish===false?:""}