From 010ce04ba6e27f2bd603cec692d2695d7a8a3c1f Mon Sep 17 00:00:00 2001
From: web <candymxq888@outlook.com>
Date: 星期三, 07 五月 2025 08:38:18 +0800
Subject: [PATCH] fix:修改水温深度监测

---
 src/utils/rem.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/utils/rem.js b/src/utils/rem.js
index 25ddf4a..252c483 100644
--- a/src/utils/rem.js
+++ b/src/utils/rem.js
@@ -4,5 +4,5 @@
     const newVal = Math.round((windowWidth / 1920) * baseFontSize)
     document.documentElement.style.fontSize = `${newVal}px`;
 }
-
-window.addEventListener('resize', resize);
\ No newline at end of file
+resize() //先调用一次,适配初次加载屏幕大小
+window.addEventListener('resize', resize);  //挂载窗口大小事件
\ No newline at end of file

--
Gitblit v1.9.3