mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-02 10:59:42 +00:00
perf: 优化iOS出现连续加载消息列表的情况
This commit is contained in:
parent
7ad8abce6b
commit
5dddf25e5e
@ -1074,7 +1074,16 @@ export default {
|
|||||||
|
|
||||||
allMsgList(newList, oldList) {
|
allMsgList(newList, oldList) {
|
||||||
const {tail} = this.scrollInfo();
|
const {tail} = this.scrollInfo();
|
||||||
this.allMsgs = newList;
|
if ($A.isIos() && newList.length !== oldList.length) {
|
||||||
|
// 隐藏区域,让iOS断触
|
||||||
|
this.$refs.scroller.$el.style.visibility = 'hidden'
|
||||||
|
this.allMsgs = newList;
|
||||||
|
this.$nextTick(_ => {
|
||||||
|
this.$refs.scroller.$el.style.visibility = 'visible'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.allMsgs = newList;
|
||||||
|
}
|
||||||
//
|
//
|
||||||
if (!this.windowActive || (tail > 10 && oldList.length > 0)) {
|
if (!this.windowActive || (tail > 10 && 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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user