mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-21 17:20:19 +00:00
perf: 优化快捷表情发送消息时关闭延迟的问题
This commit is contained in:
parent
976b9690d2
commit
e67ce9a438
@ -699,9 +699,13 @@ export default {
|
||||
|
||||
// Update model if text changes
|
||||
this.quill.on('text-change', _ => {
|
||||
this.changeLoad++
|
||||
this.textTimer && clearTimeout(this.textTimer)
|
||||
if (this.textTimer) {
|
||||
clearTimeout(this.textTimer)
|
||||
} else {
|
||||
this.changeLoad++
|
||||
}
|
||||
this.textTimer = setTimeout(_ => {
|
||||
this.textTimer = null
|
||||
this.changeLoad--
|
||||
if (this.maxlength > 0 && this.quill.getLength() > this.maxlength) {
|
||||
this.quill.deleteText(this.maxlength, this.quill.getLength());
|
||||
@ -1032,6 +1036,8 @@ export default {
|
||||
},
|
||||
|
||||
onSend(type) {
|
||||
this.emojiQuickShow = false;
|
||||
//
|
||||
setTimeout(_ => {
|
||||
if (this.filterInvalidLine(this.value) === '') {
|
||||
return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user