mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-05 20:55:35 +00:00
perf: 优化消息流效果
This commit is contained in:
parent
da7c1e40e3
commit
0eb3430c14
@ -1977,6 +1977,7 @@ export default {
|
|||||||
msg.text = text
|
msg.text = text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const curText = msg.text
|
||||||
this.$nextTick(_ => {
|
this.$nextTick(_ => {
|
||||||
if (tail <= 10 && tail != this.scrollInfo().tail) {
|
if (tail <= 10 && tail != this.scrollInfo().tail) {
|
||||||
this.operatePreventScroll++
|
this.operatePreventScroll++
|
||||||
@ -1990,7 +1991,7 @@ export default {
|
|||||||
}
|
}
|
||||||
setTimeout(_ => {
|
setTimeout(_ => {
|
||||||
this.msgChangeCache[load] = false
|
this.msgChangeCache[load] = false
|
||||||
this.onMsgOutput(id, msg)
|
curText === msg.text && this.onMsgOutput(id, msg)
|
||||||
}, 5)
|
}, 5)
|
||||||
})
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user