提交 acaf5edb 编写于 作者: guangjun.yang's avatar guangjun.yang

时间显示问题

上级 1f217a7f
...@@ -234,11 +234,16 @@ export function convertTime(time, isToSlash = true) { ...@@ -234,11 +234,16 @@ export function convertTime(time, isToSlash = true) {
if(!time) { if(!time) {
return '' return ''
} else { } else {
// time = time + ''; if(typeof time == 'object') {
if(isToSlash) { return time.format("yyyy/MM/dd HH:mm:ss");
return time.replace(/-/g, '/')
} else { } else {
return time.replace(/\//g, '-') return new Date(time).format("yyyy/MM/dd HH:mm:ss");
} }
// // time = time + '';
// if(isToSlash) {
// return time.replace(/-/g, '/')
// } else {
// return time.replace(/\//g, '-')
// }
} }
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册