this.monthList.push(this.getMonth(year,month+1))
},
get3week(){
var year = this.disp_date.getFullYear()
var month = this.disp_date.getMonth()
var day = this.disp_date.getDate()
this.monthList = [] this.monthList.push(this.getWeek(year,month,day-7))
this.monthList.push(this.getWeek(year,month,day))
this.monthList.push(this.getWeek(year,month,day+7))
console.log(this.monthList)
},
changeIndex(index,is_week,is_click = false){
if(index){
if(is_week){
this.disp_date = new Date(this.disp_date.getFullYear(),this.disp_date.getMonth(),this.disp_date.getDate()+(7*(index)))
this.checkedDay = this.format(this.disp_date.getFullYear(), this.disp_date.getMonth(), this.disp_date.getDate())
this.current_day = this.disp_date
this.get3week()
}else{
// console.log(this.disp_date.getMonth()+index)
var _tmpdt = new Date(this.disp_date.getFullYear(),this.disp_date.getMonth()+index,0)
var maxday = _tmpdt.getDate()
var _day = maxday<this.disp_date.getDate()?maxday:this.disp_date.getDate()
console.log(_day)
this.disp_date = new Date(this.disp_date.getFullYear(),this.disp_date.getMonth()+index,_day)
if(!is_click){
this.checkedDay = this.format(this.disp_date.getFullYear(),this.disp_date.getMonth(),this.disp_date.getDate())
console.log(this.checkedDay)
}
// console.log(this.format(this.disp_date.getFullYear(),this.disp_date.getMonth(),_day))
this.get3month()
console.log('move_change')
}
this.$refs.calendar_swiper.move_change()
}
}
},
components:{
calendarContent
}
}
</script>
<style scoped>
.calendar-box{
/*background: #4188d8;*/
color: #fff;
position: relative;
height:100%;
z-index:99;
}
.calendar-head{
background: #4188d8;
display: flex;
height:30px;
line-height: 30px;
}
.calendar-head li{
flex-grow: 1;
text-align: center;
}
.swiper-item{
position: absolute;
width:100%;
height:100%;
top:0;
}
.swiper-item:nth-child(1){
left: -100%;
}
.swiper-item:nth-child(2){
left:0;
}
.swiper-item:nth-child(3){
left: 100%;
}
.month ul{
display:flex;
margin:0;
padding:0;
width: 100%;
height:16%;
min-height:40px;
border-right:1px solid #eee;
}
.month li{
flex: 1;
flex-grow: 1;
overflow: hidden;
}
.week-day{
position: relative;
margin: auto;
font-size:12px;
text-align: center;
border: 0;
line-height: 10px;
overflow: hidden;
border-top: 1px solid #fff;
border-left: 1px solid #fff;
z-index: 1;
height:140px;
}
.week-day i{
display:block;
text-align: center;
font-size: 10px;










