Skip to content

Commit

Permalink
/src/utils/index.js parseTime 添加IE浏览器(版本10以下,包括版本10)兼容。
Browse files Browse the repository at this point in the history
  • Loading branch information
aisen60 committed Mar 19, 2020
1 parent c2a5a15 commit d54cd25
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d54cd25

Please sign in to comment.