From cc76e91e12ee8b18d93ea0e919aa6b02e6419e86 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Sat, 29 Jul 2023 00:04:03 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96Android=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E9=94=AE=E7=9B=98=E5=90=8E=E8=81=8A=E5=A4=A9=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E8=A2=AB=E8=A6=86=E7=9B=96=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/functions/eeui.js | 5 ++++ .../pages/manage/components/DialogWrapper.vue | 24 ++++++++++++++----- resources/mobile | 2 +- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/resources/assets/js/functions/eeui.js b/resources/assets/js/functions/eeui.js index 272783373..4d30f6f46 100755 --- a/resources/assets/js/functions/eeui.js +++ b/resources/assets/js/functions/eeui.js @@ -88,6 +88,11 @@ if (!$A.isEEUiApp) return; return requireModuleJs("eeui").getThemeName(); }, + + eeuiAppKeyboardStatus() { + if (!$A.isEEUiApp) return; + return requireModuleJs("eeui").keyboardStatus(); + }, }); window.$A = $; diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue index 96cf0017c..490b138cb 100644 --- a/resources/assets/js/pages/manage/components/DialogWrapper.vue +++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue @@ -1117,7 +1117,7 @@ export default { this.allMsgs = newList; } // - if (!this.windowActive || (tail > 45 && oldList.length > 0)) { + if (!this.windowActive || (tail > 55 && oldList.length > 0)) { const lastId = oldList[oldList.length - 1] ? oldList[oldList.length - 1].id : 0 const tmpList = newList.filter(item => item.id && item.id > lastId) this.msgNew += tmpList.length @@ -1134,7 +1134,7 @@ export default { this.navStyle = { marginTop: val + 'px' } - if (tail <= 45) { + if (tail <= 55) { requestAnimationFrame(this.onToBottom) } if (this.$refs.input.isFocus) { @@ -1152,6 +1152,18 @@ export default { } }, + windowHeight(current, before) { + if (current < before + && $A.isEEUiApp + && $A.isAndroid() + && this.$refs.input.isFocus) { + const {tail} = this.scrollInfo(); + if (tail <= 55 + (before - current)) { + requestAnimationFrame(this.onToBottom) + } + } + }, + dialogDrag(val) { if (val) { this.operateVisible = false; @@ -1167,7 +1179,7 @@ export default { footerPaddingBottom(val) { if (val) { const {tail} = this.scrollInfo(); - if (tail <= 45) { + if (tail <= 55) { requestAnimationFrame(this.onToBottom) } } @@ -1366,7 +1378,7 @@ export default { } else if (data.type === 'replace') { item.msg.text = data.text } - if (tail <= 45) { + if (tail <= 55) { this.onToBottom() } } @@ -2159,7 +2171,7 @@ export default { const {offset, tail} = this.scrollInfo(); this.scrollOffset = offset; this.scrollTail = tail; - if (this.scrollTail <= 45) { + if (this.scrollTail <= 55) { this.msgNew = 0; } // @@ -2364,7 +2376,7 @@ export default { const {tail} = this.scrollInfo() this.setQuote(this.operateItem.id, type) this.inputFocus() - if (tail <= 45) { + if (tail <= 55) { requestAnimationFrame(this.onToBottom) } }, diff --git a/resources/mobile b/resources/mobile index 8fb68ce8c..53f7d66e2 160000 --- a/resources/mobile +++ b/resources/mobile @@ -1 +1 @@ -Subproject commit 8fb68ce8c946501cc8121c40ff3d639e88fda8ec +Subproject commit 53f7d66e239a5683887246084cf60b1bca6e0f85