lilei %!s(int64=2) %!d(string=hai) anos
pai
achega
c2f0a928d8
Modificáronse 1 ficheiros con 13 adicións e 21 borrados
  1. 13 21
      components/kk-printer/index.vue

+ 13 - 21
components/kk-printer/index.vue

@@ -35,24 +35,22 @@
 							<view class="empty-text">~ 无可搜索到的设备 ~</view>
 						</view>
 						<view class="" v-else>
-							<view class="kk-devices-item flex align_center justify_between" v-for="(item,index) in filterDeviceList" :key="index" @tap="handleConnectDevice(item)">
-								<view style="text-align: left;flex-grow: 1;">
+							<view class="kk-devices-item" v-for="(item,index) in filterDeviceList" :key="index" @tap="handleConnectDevice(item)">
+								<view>
 									<view class="name">
 										<text>设备名称:</text>
 										<text>{{item.name?item.name:'未命名'}}</text>
 									</view>
-									<view class="rssi">
-										<text>信号强度:</text>
-										<text>({{Math.max(0, item.RSSI + 100)}}%)</text>
+									<view class="flex align_center justify_between">
+										<view class="rssi">
+											<text>信号强度:</text>
+											<text>({{Math.max(0, item.RSSI + 100)}}%)</text>
+										</view>
+										<view style="width: 120rpx;text-align: right;">
+											<!-- <u-icon :size="60" color="#55aaff" name="plus-circle"></u-icon> -->
+											<u-button :loading="isConnecting" @tap="handleConnectDevice(item)" shape="circle" size="mini" :custom-style="{background:$config('primaryColor')}" type="primary">{{isConnecting?'连接中':'连接'}}</u-button>
+										</view>
 									</view>
-									<view class="deviceid">
-										<text>设备ID:</text>
-										<text>{{item.deviceId}}</text>
-									</view>
-								</view>
-								<view style="width: 120rpx;text-align: right;">
-									<!-- <u-icon :size="60" color="#55aaff" name="plus-circle"></u-icon> -->
-									<u-button :loading="isConnecting" @tap="handleConnectDevice(item)" shape="circle" size="mini" :custom-style="{background:$config('primaryColor')}" type="primary">{{isConnecting?'连接中':'连接'}}</u-button>
 								</view>
 							</view>
 						</view>
@@ -369,7 +367,7 @@
 				z-index: 10000;
 				.kk-modal{
 					width:680upx;
-					height: 60%;
+					height: 80%;
 					padding:24upx;
 					box-sizing: border-box;
 					overflow-y: auto;
@@ -461,17 +459,11 @@
 							.kk-devices-item{
 								width:100%;
 								border-bottom: 1upx solid #ebebeb;
-								padding:10upx 0;
+								padding:20upx 0;
 								box-sizing: border-box;
 								&:nth-last-child(1){
 									border-bottom: none;
 								}
-								> view{
-									&:first-child{
-										flex-grow: 1;
-										width: 80%;
-									}
-								}
 								button{
 									width: auto;
 								}