import{i as u}from"./index.1703796278973314.js";import{d as l,k as _,m as h,p as m,o as y,x,z as e,V as v,G as w,H as g,t as i}from"./vue.1703796278973.js";import{_ as S}from"./_plugin-vue_export-helper.1703796278973.js";const r=s=>(w("data-v-3e3b9a4d"),s=s(),g(),s),b={class:"humidity-sensor"},C=r(()=>e("div",{class:"header"},[e("div",null,[i(" 上限"),e("span",{style:{"font-size":"16px",color:"#fa3e2e"}},"80%")]),e("div",null,[i(" 下限"),e("span",{style:{"font-size":"16px",color:"#4277ff"}},"40%")])],-1)),k={class:"content"},H={class:"box",style:{"--w":"200px","--n":"40","--t":"8px","--d":"3deg","--c":"#15C646"}},z=r(()=>e("div",{class:"flag"},[e("span",null,"0%"),e("span",null,"100%")],-1)),I=l({name:"HumiditySensor"}),L=l({...I,props:{propertyData:{type:Object,default:()=>{}}},setup(s){const c=s,a=_({});let o=null;h(()=>c.propertyData,t=>{t&&t.value&&t.value.property&&(console.log("=====watch===value==========",t.value.value),o&&t.value.property=="humidity"&&o.setOption({series:[{data:[{value:t.value.value,name:"RH"}]}]}))},{immediate:!0});const d=(t=[],p=[])=>{const n=a.value;if(n){o=u(n);const f={series:[{type:"gauge",startAngle:220,endAngle:320,min:0,max:100,progress:{show:!0,roundCap:!0,width:9,itemStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"blue"},{offset:1,color:"white"}],global:!1}}},pointer:{show:!1},axisLine:{roundCap:!0,lineStyle:{width:9}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1},title:{show:!0,offsetCenter:[0,"30%"],color:"#828282"},detail:{offsetCenter:[0,"0%"],formatter:"{value}%"},data:[{value:0,name:"RH"}]}]};v(()=>{o.setOption(f),window.addEventListener("resize",function(){o.resize()})})}};return m(()=>{d()}),(t,p)=>(y(),x("div",b,[C,e("div",k,[e("div",H,[e("div",{ref_key:"chartRef",ref:a,style:{width:"200px","min-height":"200px"}},null,512)]),z])]))}});const T=S(L,[["__scopeId","data-v-3e3b9a4d"]]);export{T as default};