From c3b30deadb28eb4182a6ee81862cdc1db5ba3c9a Mon Sep 17 00:00:00 2001 From: lld <15027638633@163.com> Date: Thu, 26 Feb 2026 17:57:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8C=96=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=AE=80=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/control/manual.vue | 32 ++++++++------------------------ utils/uni.css | 7 ++++--- 2 files changed, 12 insertions(+), 27 deletions(-) diff --git a/pages/home/control/manual.vue b/pages/home/control/manual.vue index 1da266f..306d4bf 100644 --- a/pages/home/control/manual.vue +++ b/pages/home/control/manual.vue @@ -7,34 +7,17 @@ - - + + {{ liveData[item.key] }} - - - {{ dtu_remark[item.key] }} - {{ item.label }} - - - - - - - - {{ liveData[item.key] }} - %RH + {{data.unit}} {{ dtu_remark[item.key] }} {{ item.label }} @@ -201,6 +184,7 @@ export default { // 确保数据有值后执行方法 if (newVal) { this.imei = this.value + console.info(this.liveData) } } } @@ -253,7 +237,7 @@ export default { imei: '', // 优化:温湿度卡片配置(固定顺序:温度1→2→3→4,湿度1→2→3→4) sensorCard:{}, - dataType: ["temp", "humi"] + dataType: [{name:"temp", unit: "℃"}, {name:"humi", unit: "%RH"}] }; }, @@ -638,7 +622,7 @@ export default { box-shadow: 0 2rpx 8rpx #bfbec1 } -.tempStyle, .humiStyle { +.dataStyle { display: inline-block; font-size: 12px; } diff --git a/utils/uni.css b/utils/uni.css index 61484cd..5366e54 100644 --- a/utils/uni.css +++ b/utils/uni.css @@ -25,15 +25,16 @@ form { flex-direction: column; } -.uni-flex_control_one { +.uni-flex_control_temp { display: flex; flex-direction: column; background: radial-gradient(circle at bottom right, #faf1f1 40%, #F8FCFE 100%); } -.uni-flex_control_two { +.uni-flex_control_humi { display: flex; flex-direction: column; - background: radial-gradient(circle at top left, #E8F4F8 40%, #F8FCFE 100%); + background: radial-gradient(circle at top left, #E8F4F8 40%, + #F8FCFE 100%); } .uni-flex-item {