소스 검색

calendar today

zizhong.wang 3 년 전
부모
커밋
23a1fc7c95
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      components/lx-calendar/lx-calendar.vue

+ 3 - 3
components/lx-calendar/lx-calendar.vue

@@ -15,7 +15,7 @@
 				<view class="date_dl" v-show="!retract || index == to_prev_week_index" v-for="(item,index) in   week_list_prev_co" :key="index">
 					<view class="dd" @click="item_click(vo,index,key)" v-for="(vo,key) in item" :key="key">
 						<!-- <view class="num" :class="[vo.today ? 'today' : '',vo.type == 'month' ? 'month' : (retract ? '' : 'disabled')]">{{vo.day}}</view> -->
-						<view class="num" :class="[vo.today ? 'today' : '', vo.dot ? '' : 'disabled']">{{vo.day}}</view>
+						<view class="num" :class="[vo.today && currentMonth == nowMonth ? 'today' : '', vo.dot ? '' : 'disabled']">{{vo.day}}</view>
 						<view v-show="vo.dot && (vo.type == 'month' || retract)" class="dot"></view>
 					</view>
 				</view>
@@ -26,7 +26,7 @@
 				<view class="date_dl" v-show="!retract || index == to_week_index" v-for="(item,index) in week_list" :key="index">
 					<view class="dd" @click="item_click(vo,index,key)" v-for="(vo,key) in item" :key="key">
 						<!-- <view class="num" :class="[vo.today ? 'today' : '',vo.type == 'month' ? 'month' : (retract ? '' : 'disabled')]">{{vo.day}}</view> -->
-						<view class="num" :class="[vo.today ? 'today' : '', vo.dot ? '' : 'disabled']">{{vo.day}}</view>
+						<view class="num" :class="[vo.today && currentMonth == nowMonth ? 'today' : '', vo.dot ? '' : 'disabled']">{{vo.day}}</view>
 						<view v-show="vo.dot && (vo.type == 'month' || retract)" class="dot"></view>
 					</view>
 				</view>
@@ -37,7 +37,7 @@
 				<view class="date_dl" v-show="!retract || index == to_next_week_index" v-for="(item,index) in  week_list_next_co" :key="index">
 					<view class="dd" @click="item_click(vo,index,key)" v-for="(vo,key) in item" :key="key">
 						<!-- <view class="num" :class="[vo.today ? 'today' : '',vo.type == 'month' ? 'month' : (retract ? '' : 'disabled')]">{{vo.day}}</view> -->
-						<view class="num" :class="[vo.today ? 'today' : '', vo.dot ? '' : 'disabled']">{{vo.day}}</view>
+						<view class="num" :class="[vo.today && currentMonth == nowMonth ? 'today' : '', vo.dot ? '' : 'disabled']">{{vo.day}}</view>
 						<view v-show="vo.dot && (vo.type == 'month' || retract)" class="dot"></view>
 					</view>
 				</view>