From baba0ad38bc70a87195c44f68dcfe2b5e972f1e4 Mon Sep 17 00:00:00 2001 From: taoshihan1991 <630892807@qq.com> Date: Sat, 20 Feb 2021 10:23:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=89=8B=E6=9C=BA=E6=B5=8F?= =?UTF-8?q?=E8=A7=88=E5=99=A8=E8=BE=93=E5=85=A5=E6=A1=86=E9=81=AE=E6=8C=A1?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/chat-page.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/static/js/chat-page.js b/static/js/chat-page.js index d4bebb4..c0e86e5 100644 --- a/static/js/chat-page.js +++ b/static/js/chat-page.js @@ -313,6 +313,17 @@ new Vue({ } return false; }); + + var windheight = $(window).height(); + $(window).resize(function(){ + var docheight = $(window).height(); /*唤起键盘时当前窗口高度*/ + console.log(docheight,windheight); + if(docheight < windheight){ /*当唤起键盘高度小于未唤起键盘高度时执行*/ + $(".chatBoxSend").css("position","static"); + }else{ + $(".chatBoxSend").css("position","fixed"); + } + }); }); }, //心跳