mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-15 13:22:49 +00:00
perf: 优化消息性能
This commit is contained in:
parent
03f140fe3b
commit
bc5343652b
@ -72,7 +72,7 @@
|
|||||||
"vue-resize-observer": "^2.0.16",
|
"vue-resize-observer": "^2.0.16",
|
||||||
"vue-router": "^3.6.5",
|
"vue-router": "^3.6.5",
|
||||||
"vue-template-compiler": "~2.6.14",
|
"vue-template-compiler": "~2.6.14",
|
||||||
"vue-virtual-scroll-list-hi": "^2.3.5-15",
|
"vue-virtual-scroll-list-hi": "^2.3.5-16",
|
||||||
"vuedraggable": "^2.24.3",
|
"vuedraggable": "^2.24.3",
|
||||||
"vuex": "^3.6.2"
|
"vuex": "^3.6.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1180,6 +1180,10 @@ export default {
|
|||||||
}, 100)
|
}, 100)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getEditor() {
|
||||||
|
return this.fullInput ? this.fullQuill : this.quill
|
||||||
|
},
|
||||||
|
|
||||||
getText() {
|
getText() {
|
||||||
if (this.quill) {
|
if (this.quill) {
|
||||||
return `${this.quill.getText()}`.replace(/^\s+|\s+$/g, "")
|
return `${this.quill.getText()}`.replace(/^\s+|\s+$/g, "")
|
||||||
@ -1230,16 +1234,17 @@ export default {
|
|||||||
|
|
||||||
focus() {
|
focus() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.quill) {
|
const quill = this.getEditor();
|
||||||
this.quill.setSelection(this.quill.getLength())
|
if (quill) {
|
||||||
this.quill.focus()
|
quill.setSelection(quill.getLength())
|
||||||
|
quill.focus()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
blur() {
|
blur() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.quill && this.quill.blur()
|
this.getEditor()?.blur()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -206,7 +206,7 @@
|
|||||||
@scroll="onScroll"
|
@scroll="onScroll"
|
||||||
@totop="onPrevPage"
|
@totop="onPrevPage"
|
||||||
@range="onRange"
|
@range="onRange"
|
||||||
@active-range="onActiveRange"
|
@visible="onVisible"
|
||||||
|
|
||||||
@on-mention="onMention"
|
@on-mention="onMention"
|
||||||
@on-longpress="onLongpress"
|
@on-longpress="onLongpress"
|
||||||
@ -1556,7 +1556,9 @@ export default {
|
|||||||
setTimeout(_ => {
|
setTimeout(_ => {
|
||||||
this.onSearchMsgId()
|
this.onSearchMsgId()
|
||||||
this.positionShow = this.readTimeout === null
|
this.positionShow = this.readTimeout === null
|
||||||
this.startMsgId === 0 && (this.startMsgId = data.list[data.list.length - 1]?.id || 0)
|
if (this.startMsgId === 0 && data.list.length > 0) {
|
||||||
|
this.startMsgId = data.list[data.list.length - 1].id
|
||||||
|
}
|
||||||
}, 100)
|
}, 100)
|
||||||
}).catch(_ => {
|
}).catch(_ => {
|
||||||
this.errorId = dialog_id
|
this.errorId = dialog_id
|
||||||
@ -3052,8 +3054,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onActiveRange(array) {
|
onVisible(v) {
|
||||||
this.startMsgId = $A.runNum(array.length > 0 ? array[0] : 0)
|
this.startMsgId = $A.runNum(v.length > 0 ? v[0] : 0)
|
||||||
},
|
},
|
||||||
|
|
||||||
onBack() {
|
onBack() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user