From d54cd25de27ce1154661a1d1edd38cf9c4b6872e Mon Sep 17 00:00:00 2001 From: aisen60 Date: Fri, 20 Mar 2020 00:08:41 +0800 Subject: [PATCH] =?UTF-8?q?/src/utils/index.js=20parseTime=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0IE=E6=B5=8F=E8=A7=88=E5=99=A8=EF=BC=88=E7=89=88?= =?UTF-8?q?=E6=9C=AC10=E4=BB=A5=E4=B8=8B=EF=BC=8C=E5=8C=85=E6=8B=AC?= =?UTF-8?q?=E7=89=88=E6=9C=AC10=EF=BC=89=E5=85=BC=E5=AE=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/index.js b/src/utils/index.js index 2684e3c2597..b50e3bd0f82 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -19,6 +19,8 @@ export function parseTime(time, cFormat) { } else { if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { time = parseInt(time) + } else if (typeof time === 'string') { + time = time.replace(new RegExp(/-/gm), '/'); } if ((typeof time === 'number') && (time.toString().length === 10)) { time = time * 1000