瀏覽代碼

calendar swiper

zizhong.wang 3 年之前
父節點
當前提交
83f222bbe1
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      components/lx-calendar/lx-calendar.vue

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

@@ -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 ? 'month_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 ? 'month_disabled' : '']" /></view>
+			<view class="icon" @click="switch_month_week('next',true)"><text class="iconfont next icon-fanhui" :class="[currentMonth < nowMonth ? 'month_disabled' : '']" /></view>
 		</view>
 		<view class="date_dl" >
 			<view class="dd" v-for="(item,index) in week" :key="index">{{item}}</view>