From bbcec1dac28c3454eae721418903bf49e80c2fa5 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Fri, 17 Mar 2023 20:22:08 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20android=E8=A1=A8=E6=83=85=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=A1=86=E8=B7=9F=E9=94=AE=E7=9B=98=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/components/ChatInput/index.vue | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/resources/assets/js/pages/manage/components/ChatInput/index.vue b/resources/assets/js/pages/manage/components/ChatInput/index.vue index 2c36a8102..02b961b59 100755 --- a/resources/assets/js/pages/manage/components/ChatInput/index.vue +++ b/resources/assets/js/pages/manage/components/ChatInput/index.vue @@ -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) {