添加了加载中 日历完成一般

This commit is contained in:
2020-10-20 17:08:18 +08:00
parent 8d93aa04d3
commit d6a2569255
3 changed files with 74 additions and 17 deletions

View File

@@ -89,7 +89,9 @@ export function getweek(zhou?: number){
for(let j = 0;j < 24; j++){
date[i].list?.push({
start:"",
num:""
num:"",
title: "",
time:""
})
}
}
@@ -103,4 +105,24 @@ export function getDay(date: string){
const now = dayjs(date)
console.log(now.date())
return now.date();
}
export function gethour(date: string){
const now = dayjs(date)
console.log(now.hour(), now.date(), now.minute())
return now.hour();
}
export function getminute(date: string){
const now = dayjs(date)
// console.log(now.hour(), now.date(), now.minute())
return now.minute();
}
export function gettime(date: string, num: number){
let now = dayjs(date)
const start = `${now.hour() > 9 ? now.hour() : '0' + now.hour()}:${now.minute() > 9 ? now.minute() : '0' + now.minute()}`
now = now.minute(now.minute() + num);
const end = `${now.hour() > 9 ? now.hour() : '0' + now.hour()}:${now.minute() > 9 ? now.minute() : '0' + now.minute()}`
return start + "-" + end;
}