浏览代码

优化温控组件回显

htc 2 月之前
父节点
当前提交
5648e92aef
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      pagesHome/airConditioner/index.vue

+ 4 - 2
pagesHome/airConditioner/index.vue

@@ -44,7 +44,7 @@
 				<template v-if="!setShow">
 					<image class="setting" :src="imgBase+'home/kongtiao_set.png'" @tap="setShow = true"></image>
 					<div class="wendu">
-						<TemperatureControl :temperature="27" @changeTemperature="changeTemperature"></TemperatureControl>
+						<TemperatureControl :temperature="this.ktInfo.temperature" @changeTemperature="changeTemperature" ref="tcRef"></TemperatureControl>
 					</div>
 					<div class="type">
 						<div class="pre" :class="{'active':ktInfo.type==1}" @tap="changeType(1)">
@@ -189,7 +189,7 @@
 				setShow:false,
 				ktInfo:{},
 				speend:20,
-				wtype:1
+				wtype:1,
 			}
 		},
 		methods:{
@@ -201,6 +201,8 @@
 					this.ktInfo.type = '';
 				} 
 				this.show = true;
+				this.$refs.tcRef.sjTemperature = item.temperature;
+				this.$refs.tcRef.init();
 			},
 			changeType(type){
 				if(this.ktInfo.status==2) return