wangjiawen %!s(int64=4) %!d(string=hai) anos
pai
achega
c8968b0a18
Modificáronse 1 ficheiros con 23 adicións e 2 borrados
  1. 23 2
      components/drawer/threeLineDrawer.vue

+ 23 - 2
components/drawer/threeLineDrawer.vue

@@ -10,7 +10,7 @@
 					</view>
 					
 					<view v-for="(item,index) in drawerList" :class="[changeGary==index?'statusMonitoring':'item']" :key="index" @click="clickChangeColor(index)">
-						<div @click="goToIndex(item)">
+						<div @click="goToIndex(item);closeDrawer();">
 							{{item.name}}
 							</div>
 					
@@ -66,7 +66,28 @@
 			},
 			closeDrawer: function() {
 				this.drawerIsShow = false;
-				this.$parent.leftbar();
+				 switch(uni.getSystemInfoSync().platform){
+				
+				    case 'android':
+				
+				       console.log('运行Android上')
+				       this.$parent.leftbar();
+				       break;
+				
+				    case 'ios':
+				
+				       console.log('运行iOS上')
+				       this.$parent.leftbar();
+				       break;
+				
+				    default:
+				
+				       console.log('运行在开发者工具上')
+				
+				       break;
+				
+				}
+				
 			},
 			clickChangeColor: function(index) {
 				this.changeGary = index;