|
|
@@ -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);
|