js分秒格式转时分秒
minSsToHourMinSs(str){ // str 格式为 min:ss (160:59) let arr = str.split(':'); let hour = parseInt(arr[0] / 60); let min = arr[0] - (hour * 60); let ss = arr[1]; // 补0 hour = hour < 10 ? `0${hour}` : hour min = min < 10 ? `0${min}` : min ss = ss < 10 ? `0${ss}` : ss let time = `${hour}:${min}:${ss}`; return time }