perf: android表情输入框跟键盘同时出现的情况

This commit is contained in:
kuaifan 2023-03-17 20:22:08 +08:00
parent 528ea404ad
commit bbcec1dac2

View File

@ -425,10 +425,8 @@ export default {
},
// Watch disabled change
disabled(newVal) {
if (this.quill) {
this.quill.enable(!newVal)
}
disabled(val) {
this.quill?.enable(!val)
},
// Reset lists
@ -448,6 +446,13 @@ export default {
},
showEmoji(val) {
if (this.emojiBottom) {
if (val) {
this.quill.enable(false)
} else if (!this.disabled) {
this.quill.enable(true)
}
}
if (val) {
let text = this.value.replace(/ /g," ")
text = text.replace(/<[^>]+>/g, "")
@ -626,7 +631,7 @@ export default {
// Instance
this.quill = new Quill(this.$refs.editor, this._options)
this.quill.enable(false)
this.quill.enable(!this.disabled)
// Set editor content
if (this.value) {
@ -635,11 +640,6 @@ export default {
this.$emit('input', this.getInputCache())
}
// Disabled editor
if (!this.disabled) {
this.quill.enable(true)
}
// Mark model as touched if editor lost focus
this.quill.on('selection-change', range => {
if (!range) {