diff --git a/index.html b/index.html index 5d3e20b..c09996b 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - + @@ -11,8 +11,8 @@ AI小财神 - -
+ +
diff --git a/src/views/homePage.vue b/src/views/homePage.vue index 04c3a3a..b381ce3 100644 --- a/src/views/homePage.vue +++ b/src/views/homePage.vue @@ -536,32 +536,6 @@ onMounted(async () => { // 监听页面高度 throttledHeightListener(); - const isAndroid = /Android/i.test(navigator.userAgent); - if (isAndroid) { - window.visualViewport.addEventListener("resize", () => { - const keyboardHeight = window.innerHeight - window.visualViewport.height; - console.log("视口大小变化", keyboardHeight); - - // 如果键盘高度大于100px,认为键盘弹出 - if (keyboardHeight > 100) { - const footer = document.querySelector(".el-footer"); - footer.style.paddingBottom = `${keyboardHeight}px`; - - // 滚动到输入框位置 - setTimeout(() => { - const msgInput = document.querySelector(".msg-input"); - if (msgInput) { - msgInput.scrollIntoView({ behavior: "smooth" }); - } - }, 300); - } else { - // 键盘收起 - const footer = document.querySelector(".el-footer"); - footer.style.paddingBottom = "0px"; - } - }); - } - // 添加输入框焦点处理 // handleInputFocus();