修复了日历的报错

This commit is contained in:
luyuan 2020-10-29 09:40:15 +08:00
parent 4f8b5519a3
commit 8575d2dcac
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
3 changed files with 10 additions and 5 deletions

View File

@ -7,7 +7,7 @@
</div> </div>
</div> </div>
<div class="list"> <div class="list" @mouseout="tuichu()">
<div v-for="(i,j) in list" :key="j" style="overflow: hidden;" @click="routeto(j)" @mouseenter="mouse(j)"> <div v-for="(i,j) in list" :key="j" style="overflow: hidden;" @click="routeto(j)" @mouseenter="mouse(j)">
<div class="item" :class="{'selitem': j == selnum, 'seltop': j == selnum - 1, 'selbottom': j == selnum + 1}"> <div class="item" :class="{'selitem': j == selnum, 'seltop': j == selnum - 1, 'selbottom': j == selnum + 1}">
<div class="route"> <div class="route">
@ -201,13 +201,18 @@ export default defineComponent({
router.replace("/"); router.replace("/");
} }
function tuichu(){
console.log(1121)
}
return{ return{
list, list,
routeto, routeto,
selnum, selnum,
userinfo, userinfo,
logout, logout,
mouse mouse,
tuichu
} }
} }
}) })

View File

@ -41,7 +41,7 @@ export function getdate(yue?: number): GetDate{
while(i < month){ while(i < month){
for(w = 0; w < week; w++){ for(w = 0; w < week; w++){
date[0][w] = {}; date[0][w] = {list:[]};
} }
i++; i++;
const zhou = Math.floor((i + w - 1) / 7) const zhou = Math.floor((i + w - 1) / 7)
@ -55,7 +55,7 @@ export function getdate(yue?: number): GetDate{
date[zhou].push(d) date[zhou].push(d)
} }
while(date[date.length - 1].length < 7){ while(date[date.length - 1].length < 7){
date[date.length - 1].push({}) date[date.length - 1].push({list:[]})
} }
console.log(date) console.log(date)

View File

@ -223,7 +223,7 @@ export default defineComponent({
} }
} }
} }
console.log(month.value.date) console.log(month.value.date, 121)
}) })
} }
function xia(){ function xia(){