From ccdb114e9367b6385e199685eb98f6fe2d61f914 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期四, 25 七月 2024 12:01:43 +0800
Subject: [PATCH] onActivated

---
 src/components/chat/chatComponents/summaryCom/components/deviceLastValue/DeviceLastValueCom.vue |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/components/chat/chatComponents/summaryCom/components/deviceLastValue/DeviceLastValueCom.vue b/src/components/chat/chatComponents/summaryCom/components/deviceLastValue/DeviceLastValueCom.vue
index 6b5edb2..088955c 100644
--- a/src/components/chat/chatComponents/summaryCom/components/deviceLastValue/DeviceLastValueCom.vue
+++ b/src/components/chat/chatComponents/summaryCom/components/deviceLastValue/DeviceLastValueCom.vue
@@ -80,7 +80,7 @@
 
 <script setup lang="ts">
 import _ from 'lodash';
-import { computed, onMounted, ref } from 'vue';
+import { computed, onActivated, onMounted, ref } from 'vue';
 import MonitorContent from './MonitorContent.vue';
 import { debounce, getTextWidth } from '/@/utils/util';
 
@@ -274,6 +274,13 @@
 		height: 0.7 * document.body.clientHeight,
 	});
 });
+
+onActivated(() => {
+	resizeEvent({
+		width: containerRef.value.clientWidth,
+		height: 0.7 * document.body.clientHeight,
+	});
+});
 </script>
 <style scoped lang="scss">
 :deep(.space-y-\[2px\] > :not([hidden]) ~ :not([hidden])) {

--
Gitblit v1.9.3