lilei 4 vuotta sitten
vanhempi
commit
f913651e8f
1 muutettua tiedostoa jossa 6 lisäystä ja 7 poistoa
  1. 6 7
      pages/index/index.vue

+ 6 - 7
pages/index/index.vue

@@ -193,12 +193,8 @@
 					  console.log(devices,'devices list')
 					  if(devices.length){
 						  _this.statusStr = '已发现设备'
-						  _this.deviceList = res.devices
-						  if(res.devices.length == 1){
-							  _this.connectBlue(_this.deviceList[0])
-						  }else{
-							  _this.loading = false
-						  }
+						  _this.deviceList = _this.deviceList.concat(res.devices)
+						  _this.loading = false
 					  }
 					})
 				  }
@@ -502,6 +498,8 @@
 	.devList{
 		width: 80%;
 		padding:10rpx 30rpx;
+		max-height: 50vh;
+		overflow: auto;
 	}
 	.bindDev{
 		margin: 20rpx 0;
@@ -518,6 +516,7 @@
 		border-radius: 20rpx;
 		background: rgba(255,255,255,0.8);
 		box-shadow: 2rpx 2rpx 5rpx rgba(0,0,0,0.2);
+		margin-bottom: 20rpx;
 	}
 	.devList > view .names{
 		flex-grow: 1;
@@ -528,7 +527,7 @@
 	}
 	.devList > view .btns{
 		text-align: center;
-		padding: 15rpx 40rpx;
+		padding: 15rpx 20rpx;
 		color: #ff5500;
 	}
 	.turn{