正在显示
1 个修改的文件
包含
2 行增加
和
0 行删除
| @@ -17,6 +17,8 @@ export function parseTime(time, pattern) { | @@ -17,6 +17,8 @@ export function parseTime(time, pattern) { | ||
| 17 | } else { | 17 | } else { |
| 18 | if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { | 18 | if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { |
| 19 | time = parseInt(time) | 19 | time = parseInt(time) |
| 20 | + } else if (typeof time === 'string') { | ||
| 21 | + time = time.replace(new RegExp(/-/gm), '/'); | ||
| 20 | } | 22 | } |
| 21 | if ((typeof time === 'number') && (time.toString().length === 10)) { | 23 | if ((typeof time === 'number') && (time.toString().length === 10)) { |
| 22 | time = time * 1000 | 24 | time = time * 1000 |
-
请 注册 或 登录 后发表评论