|
@@ -137,7 +137,7 @@ export const dateFormat = (value: string | Date, format = 'YYYY-MM-DD HH:mm:ss')
|
|
|
|
|
|
// 秒转分
|
|
// 秒转分
|
|
export const getSecondRPM = (second: number, type?: string) => {
|
|
export const getSecondRPM = (second: number, type?: string) => {
|
|
- if (isNaN(second)) return '00:00'
|
|
|
|
|
|
+ if (isNaN(second) || second < 0) return '00:00'
|
|
const mm = Math.floor(second / 60)
|
|
const mm = Math.floor(second / 60)
|
|
.toString()
|
|
.toString()
|
|
.padStart(2, '0')
|
|
.padStart(2, '0')
|