第一次提交

This commit is contained in:
xiaoxiao
2025-05-09 15:47:54 +08:00
parent 25e596b591
commit f9d7986df0
357 changed files with 26943 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
export const getTimeText = (time: number = 0, hasUnit = true) => {
if (time < 3600) {
return String(Math.floor(time / 60)) + (hasUnit ? ' 分钟' : '')
} else {
return String(Math.round(time / 3600 * 10) / 10) + (hasUnit ? ' 小时' : '')
}
}
export const getPercentText =
(value: number, total: number) => Math.round(value / total * 100) + '%'