new Vue({
el:
"#calender",
data:{
// 周
daynamearr:[
"周日","周一","周二","周三","周四","周五","周六"]
,
// 月
dayarr:[
0,0,0,0,0,1,0, 0,0,0,0,0,1,0, 0,0,0,0,0,1,0, 0,0,0,0,0,1,0, 0,0,0,0,0,1,0, 0,0,0,0,0,1,0
]
,
}
,
methods:{
theweek:
function(){
let result=[]
;
for(let i=
0;i<
this.
dayarr.
length;i+=
7){
result.
push(
this.
dayarr.
slice(i
,i+
7))
;
}
return result
;
}
}
})
转载请注明原文地址: https://www.6miu.com/read-1750025.html