mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-14 04:32:49 +00:00
no message
This commit is contained in:
parent
207d0caf2a
commit
4af354e918
@ -309,6 +309,8 @@ import {languageList, languageName} from "../../../../language";
|
|||||||
import {isMarkdownFormat} from "../../../../utils/markdown";
|
import {isMarkdownFormat} from "../../../../utils/markdown";
|
||||||
import emitter from "../../../../store/events";
|
import emitter from "../../../../store/events";
|
||||||
|
|
||||||
|
const globalRangeIndexs = {};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ChatInput',
|
name: 'ChatInput',
|
||||||
components: {ChatEmoji},
|
components: {ChatEmoji},
|
||||||
@ -737,6 +739,7 @@ export default {
|
|||||||
|
|
||||||
// Reset lists
|
// Reset lists
|
||||||
dialogId() {
|
dialogId() {
|
||||||
|
this.selectRange = null;
|
||||||
this.userList = null;
|
this.userList = null;
|
||||||
this.userCache = null;
|
this.userCache = null;
|
||||||
this.taskList = null;
|
this.taskList = null;
|
||||||
@ -745,6 +748,7 @@ export default {
|
|||||||
this.loadInputDraft()
|
this.loadInputDraft()
|
||||||
},
|
},
|
||||||
taskId() {
|
taskId() {
|
||||||
|
this.selectRange = null;
|
||||||
this.userList = null;
|
this.userList = null;
|
||||||
this.userCache = null;
|
this.userCache = null;
|
||||||
this.taskList = null;
|
this.taskList = null;
|
||||||
@ -916,6 +920,12 @@ export default {
|
|||||||
this.quill?.blur()
|
this.quill?.blur()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
selectRange(range) {
|
||||||
|
if (range?.index) {
|
||||||
|
globalRangeIndexs[this.draftId] = range.index
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
@ -1311,7 +1321,10 @@ export default {
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const quill = this.getEditor();
|
const quill = this.getEditor();
|
||||||
if (quill) {
|
if (quill) {
|
||||||
quill.setSelection(quill.getLength())
|
if (!this.selectRange?.index) {
|
||||||
|
const length = quill.getLength();
|
||||||
|
quill.setSelection(Math.min(globalRangeIndexs[this.draftId] || length, length));
|
||||||
|
}
|
||||||
quill.focus()
|
quill.focus()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user