Compare commits
2 Commits
7439c9759a
...
04263cd519
Author | SHA1 | Date |
---|---|---|
lyc | 04263cd519 | |
lyc | aee945f90f |
|
@ -172,16 +172,23 @@ const disabledHours = ()=>{
|
|||
}
|
||||
// 限制分-返回被禁选的
|
||||
const disabledMinute = (hour,role) => {
|
||||
if(form.time == null) return
|
||||
if(getCurrentTime('YYYY-MM-DD') == form.day){
|
||||
const arrs = []
|
||||
if(role == 'start'){
|
||||
for (let i = 0; i < 60; i++) {
|
||||
if (new Date().getMinutes() <= i) continue;
|
||||
arrs.push(i)
|
||||
let nowHour = new Date().getHours().toString().padStart(2, '0');
|
||||
if(nowHour < hour){
|
||||
return []
|
||||
}
|
||||
else{
|
||||
for (let i = 0; i < 60; i++) {
|
||||
if (new Date().getMinutes() <= i) continue;
|
||||
arrs.push(i)
|
||||
}
|
||||
return arrs;
|
||||
}
|
||||
return arrs;
|
||||
}
|
||||
else{
|
||||
if(role == 'end'){
|
||||
if(form.time[0]) return []
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue