时间格式

This commit is contained in:
lukaijie
2021-11-17 16:54:18 +08:00

View File

@@ -173,7 +173,7 @@ export function formatTime(time, formatter = 'YYYY-MM-DD') {
export function formatDateTime(time, formatter = 'YYYY-MM-DD HH:mm:ss') {
const newTime = time.toString().length < 13 ? time * 1000 : time
return dayjs(newTime, formatter)
return dayjs(newTime).format(formatter)
}
export function copyText(text, msg = '内容已复制') {