mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-06 13:15:35 +00:00
perf: 优化Android弹出键盘后聊天内容被覆盖的问题
This commit is contained in:
parent
b59aca0b5c
commit
cc76e91e12
5
resources/assets/js/functions/eeui.js
vendored
5
resources/assets/js/functions/eeui.js
vendored
@ -88,6 +88,11 @@
|
|||||||
if (!$A.isEEUiApp) return;
|
if (!$A.isEEUiApp) return;
|
||||||
return requireModuleJs("eeui").getThemeName();
|
return requireModuleJs("eeui").getThemeName();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
eeuiAppKeyboardStatus() {
|
||||||
|
if (!$A.isEEUiApp) return;
|
||||||
|
return requireModuleJs("eeui").keyboardStatus();
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
window.$A = $;
|
window.$A = $;
|
||||||
|
|||||||
@ -1117,7 +1117,7 @@ export default {
|
|||||||
this.allMsgs = newList;
|
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 lastId = oldList[oldList.length - 1] ? oldList[oldList.length - 1].id : 0
|
||||||
const tmpList = newList.filter(item => item.id && item.id > lastId)
|
const tmpList = newList.filter(item => item.id && item.id > lastId)
|
||||||
this.msgNew += tmpList.length
|
this.msgNew += tmpList.length
|
||||||
@ -1134,7 +1134,7 @@ export default {
|
|||||||
this.navStyle = {
|
this.navStyle = {
|
||||||
marginTop: val + 'px'
|
marginTop: val + 'px'
|
||||||
}
|
}
|
||||||
if (tail <= 45) {
|
if (tail <= 55) {
|
||||||
requestAnimationFrame(this.onToBottom)
|
requestAnimationFrame(this.onToBottom)
|
||||||
}
|
}
|
||||||
if (this.$refs.input.isFocus) {
|
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) {
|
dialogDrag(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.operateVisible = false;
|
this.operateVisible = false;
|
||||||
@ -1167,7 +1179,7 @@ export default {
|
|||||||
footerPaddingBottom(val) {
|
footerPaddingBottom(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
const {tail} = this.scrollInfo();
|
const {tail} = this.scrollInfo();
|
||||||
if (tail <= 45) {
|
if (tail <= 55) {
|
||||||
requestAnimationFrame(this.onToBottom)
|
requestAnimationFrame(this.onToBottom)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1366,7 +1378,7 @@ export default {
|
|||||||
} else if (data.type === 'replace') {
|
} else if (data.type === 'replace') {
|
||||||
item.msg.text = data.text
|
item.msg.text = data.text
|
||||||
}
|
}
|
||||||
if (tail <= 45) {
|
if (tail <= 55) {
|
||||||
this.onToBottom()
|
this.onToBottom()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2159,7 +2171,7 @@ export default {
|
|||||||
const {offset, tail} = this.scrollInfo();
|
const {offset, tail} = this.scrollInfo();
|
||||||
this.scrollOffset = offset;
|
this.scrollOffset = offset;
|
||||||
this.scrollTail = tail;
|
this.scrollTail = tail;
|
||||||
if (this.scrollTail <= 45) {
|
if (this.scrollTail <= 55) {
|
||||||
this.msgNew = 0;
|
this.msgNew = 0;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -2364,7 +2376,7 @@ export default {
|
|||||||
const {tail} = this.scrollInfo()
|
const {tail} = this.scrollInfo()
|
||||||
this.setQuote(this.operateItem.id, type)
|
this.setQuote(this.operateItem.id, type)
|
||||||
this.inputFocus()
|
this.inputFocus()
|
||||||
if (tail <= 45) {
|
if (tail <= 55) {
|
||||||
requestAnimationFrame(this.onToBottom)
|
requestAnimationFrame(this.onToBottom)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit 8fb68ce8c946501cc8121c40ff3d639e88fda8ec
|
Subproject commit 53f7d66e239a5683887246084cf60b1bca6e0f85
|
||||||
Loading…
x
Reference in New Issue
Block a user