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 {