Sfoglia il codice sorgente

Merge branch 'master' of http://www.sysuimars.cn:3000/feiniao/feiniao-farm-h5

wangsisi 1 settimana fa
parent
commit
22ea20ffee
1 ha cambiato i file con 8 aggiunte e 1 eliminazioni
  1. 8 1
      src/views/old_mini/monitor/index.vue

+ 8 - 1
src/views/old_mini/monitor/index.vue

@@ -2,7 +2,7 @@
     <custom-header v-if="isHeaderShow" name="农场详情"></custom-header>
     <div class="monitor-index" :style="{ height: `calc(100vh - ${tabBarHeight}px)` }">
         <!-- 天气遮罩 -->
-        <div class="weather-mask" v-show="isExpanded"></div>
+        <div class="weather-mask" v-show="isExpanded" @click="handleMaskClick"></div>
         <!-- 天气 -->
         <weather-info
             ref="weatherInfoRef"
@@ -378,6 +378,13 @@ const weatherExpanded = (isExpandedValue) => {
     isExpanded.value = isExpandedValue;
 };
 
+// 点击遮罩时收起天气
+const handleMaskClick = () => {
+    if (weatherInfoRef.value && weatherInfoRef.value.toggleExpand) {
+        weatherInfoRef.value.toggleExpand();
+    }
+};
+
 const gardenId = ref(store.state.home.gardenId);
 const changeGarden = ({ id }) => {
     localStorage.setItem('isGarden', true);