From d9f65a3c67acb31bd86e036d804d906ce80bd61c Mon Sep 17 00:00:00 2001 From: guoapeng Date: Sun, 6 Jul 2025 22:01:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=99=9A=E6=8B=9F=E9=94=AE=E7=9B=98?= =?UTF-8?q?=E6=99=BA=E8=83=BD=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/FTInput/index.vue | 4 +++- src/components/home/Environment.vue | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/common/FTInput/index.vue b/src/components/common/FTInput/index.vue index b0d11cc..e8f2802 100644 --- a/src/components/common/FTInput/index.vue +++ b/src/components/common/FTInput/index.vue @@ -59,7 +59,9 @@ const open = () => { const focusInput = (e: any) => { const rect = e.target.getBoundingClientRect() - if (rect.top + window.scrollY > 800) { + const scrollTop = window.scrollY || document.documentElement.scrollTop + console.log(rect.top + scrollTop) + if (window.innerHeight - rect.bottom < 300) { placement.value = 'top' } else { diff --git a/src/components/home/Environment.vue b/src/components/home/Environment.vue index da9d756..3eead59 100644 --- a/src/components/home/Environment.vue +++ b/src/components/home/Environment.vue @@ -45,8 +45,8 @@ const imgs: Record = { const titles: Record = { Internal: '仓内', - WiredExtSensor: '外接', - WirelessExtSensor: '无线', + WiredExtSensor: '探头', + WirelessExtSensor: '探头', } /** * @hook 生命周期钩子 - 组件挂载完成时执行