From 481519169a8a6f8322a8ba1d6441be8216e6b49a Mon Sep 17 00:00:00 2001 From: dragon <3013557874@qq.com> Date: Thu, 25 Jul 2024 15:33:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=98=E7=BD=91=E6=96=B0=E5=A2=9E=E7=9B=91?= =?UTF-8?q?=E5=90=AC=E7=AA=97=E5=8F=A3=E5=8F=98=E5=A4=A7=E5=8F=98=E5=B0=8F?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view/molistar/home/index.html | 2 +- view/molistar/home/js/index.js | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/view/molistar/home/index.html b/view/molistar/home/index.html index 41aecc5..fc58ea3 100644 --- a/view/molistar/home/index.html +++ b/view/molistar/home/index.html @@ -161,7 +161,7 @@ - + diff --git a/view/molistar/home/js/index.js b/view/molistar/home/js/index.js index 45a5769..630abdf 100644 --- a/view/molistar/home/js/index.js +++ b/view/molistar/home/js/index.js @@ -358,4 +358,12 @@ function animatedFun(dom, arrClass) { // 禁止瀏覽器下拉刷新 document.addEventListener('touchmove', event => { event.preventDefault() -}, { passive: false }) \ No newline at end of file +}, { passive: false }) +// 定义处理窗口大小变化的函数 +function handleResize() { + location.reload() + // 这里可以添加更多的逻辑,比如检查窗口的新尺寸 +} + +// 监听窗口大小变化事件 +window.addEventListener('resize', handleResize); \ No newline at end of file