Przeglądaj źródła

calendar swiper

zizhong.wang 3 lat temu
rodzic
commit
cc6c8889be
1 zmienionych plików z 10 dodań i 2 usunięć
  1. 10 2
      components/lx-calendar/lx-calendar.vue

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

@@ -9,7 +9,7 @@
 		<view class="date_dl" >
 			<view class="dd" v-for="(item,index) in week" :key="index">{{item}}</view>
 		</view>
-		<swiper :style="{height:(retract ? 2 * 80 : (week_list.length + 1) * 80 ) + 'rpx'}" :current="current" circular @change="change_date">
+		<swiper :style="{height:(retract ? 2 * 80 : (week_list.length + 1) * 80 ) + 'rpx'}" :current="current"  @change="change_date">
 			<swiper-item>
 				
 				<view class="date_dl" v-show="!retract || index == to_prev_week_index" v-for="(item,index) in   week_list_prev_co" :key="index">
@@ -258,12 +258,18 @@ export default {
 			
 			this.current = current;
 			
-			
+			/*uni.showToast({
+				title: primary_current + ' ' + current,
+				icon:'none'
+			});
+			*/
+			//return;
 			
 			
 			if(primary_current - current == -1 || primary_current - current == 2){
 				
 				if(this.retract){
+					
 					this.switch_month_week('next')
 					this.change_week()
 					if(primary_current - current == -1 && current != 1){
@@ -271,6 +277,7 @@ export default {
 					}else if(primary_current - current == 2){
 						this.change_date_week('next')
 					}
+					
 				}else{
 					this.get_date(this.get_month('next'));
 					this.update_month();
@@ -461,6 +468,7 @@ export default {
 			
 		},
 		update_swiper_item(type = 'month'){
+			//return ;
 			
 			if(type == 'month'){
 				if(this.current == 0){