mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 20:06:44 +08:00
笔记时间不一样
This commit is contained in:
@@ -440,3 +440,10 @@ export function formatSecondToHour(second) {
|
||||
h = h.toFixed(n);
|
||||
return h;
|
||||
}
|
||||
// 秒换成时分秒
|
||||
export function getHMS(time) {
|
||||
const hour = parseInt(time / 3600) < 10 ? '0' + parseInt(time / 3600) : parseInt(time / 3600)
|
||||
const min = parseInt(time % 3600 / 60) < 10 ? '0' + parseInt(time % 3600 / 60) : parseInt(time % 3600 / 60)
|
||||
const sec = parseInt(time % 3600 % 60) < 10 ? '0' + parseInt(time % 3600 % 60) : parseInt(time % 3600 % 60)
|
||||
return hour + ':' + min + ':' + sec
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user