|
|
@@ -2,9 +2,9 @@
|
|
|
<template>
|
|
|
<view class="date">
|
|
|
<view class="head">
|
|
|
- <view class="icon" @click="switch_month_week('prev',true)"><text class="iconfont icon-fanhui" :class="[currentMonth == nowMonth ? 'disabled' : '']" /></view>
|
|
|
+ <view class="icon" @click="switch_month_week('prev',true)"><text class="iconfont icon-fanhui" :class="[currentMonth == nowMonth ? 'month_disabled' : '']" /></view>
|
|
|
<view class="title">{{nowYear+'年'+nowMonth+'月'}}</view>
|
|
|
- <view class="icon" @click="switch_month_week('next',true)"><text class="iconfont next icon-fanhui" :class="[currentMonth + 1 == nowMonth ? 'disabled' : '']" /></view>
|
|
|
+ <view class="icon" @click="switch_month_week('next',true)"><text class="iconfont next icon-fanhui" :class="[currentMonth + 1 == nowMonth ? 'month_disabled' : '']" /></view>
|
|
|
</view>
|
|
|
<view class="date_dl" >
|
|
|
<view class="dd" v-for="(item,index) in week" :key="index">{{item}}</view>
|
|
|
@@ -235,7 +235,10 @@ export default {
|
|
|
this.set_to_day_all();
|
|
|
},
|
|
|
change_date_month(type){
|
|
|
+
|
|
|
let week_list = this.week_list;
|
|
|
+
|
|
|
+
|
|
|
if(type == 'prev'){
|
|
|
this.week_list = this.week_list_prev
|
|
|
this.week_list_prev = this.week_list_next;
|
|
|
@@ -248,6 +251,7 @@ export default {
|
|
|
},
|
|
|
change_date(e){
|
|
|
|
|
|
+ //return;
|
|
|
|
|
|
let primary_current = this.current
|
|
|
let current = e.detail.current;
|
|
|
@@ -422,14 +426,14 @@ export default {
|
|
|
return Date.parse(str.replace(/-(\d)(?!\d)/g, '-0$1'));
|
|
|
},
|
|
|
switch_month_week(type = 'next',update_week = false){
|
|
|
- if (this.currentMonth == this.nowMonth && type=="prev"){
|
|
|
+ if (this.currentMonth >= this.nowMonth && type=="prev"){
|
|
|
return;
|
|
|
}
|
|
|
- if (this.currentMonth + 1 == this.nowMonth && type=="next"){
|
|
|
+ if (this.currentMonth < this.nowMonth && type == "next"){
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- this.nowDay = '';
|
|
|
+// this.nowDay = '';
|
|
|
this.date = '';
|
|
|
|
|
|
if(this.retract){
|
|
|
@@ -457,6 +461,7 @@ export default {
|
|
|
|
|
|
},
|
|
|
update_swiper_item(type = 'month'){
|
|
|
+
|
|
|
if(type == 'month'){
|
|
|
if(this.current == 0){
|
|
|
this.change_date_month('next')
|
|
|
@@ -517,7 +522,7 @@ export default {
|
|
|
})
|
|
|
|
|
|
if(i == nowDay && type == 'same'){
|
|
|
- // this.date = `${nowYear}-${nowMonth}-${i}`;
|
|
|
+// this.date = `${nowYear}-${nowMonth}-${i}`;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -612,7 +617,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-.disabled{
|
|
|
+.month_disabled{
|
|
|
color: @color_disabled;
|
|
|
}
|
|
|
.retract{
|