From b7fc815d58f31392933c275938a97d26baff0aa7 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Thu, 7 Dec 2023 18:31:25 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E7=A7=BB=E5=8A=A8=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B6=88=E6=81=AF=E8=BE=93=E5=85=A5=E6=A1=86?= =?UTF-8?q?=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/components/ChatInput/index.vue | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/resources/assets/js/pages/manage/components/ChatInput/index.vue b/resources/assets/js/pages/manage/components/ChatInput/index.vue index b82ece712..fcd416ea6 100755 --- a/resources/assets/js/pages/manage/components/ChatInput/index.vue +++ b/resources/assets/js/pages/manage/components/ChatInput/index.vue @@ -252,6 +252,12 @@ export default { type: Object, default: () => ({}) }, + toolbar: { + type: Array, + default: () => { + return ['bold', 'strike', 'italic', 'underline', {'list': 'ordered'}, {'list': 'bullet'}, 'blockquote', 'code-block'] + }, + }, maxlength: { type: Number }, @@ -496,7 +502,7 @@ export default { separateSendButton() { return $A.jsonParse(window.localStorage.getItem("__keyboard:data__"))?.separate_send_button === 'open'; }, - + }, watch: { // Watch content change @@ -658,9 +664,7 @@ export default { readOnly: false, placeholder: this.placeholder, modules: { - toolbar: [ - ['bold', 'strike', 'italic', 'underline', {'list': 'ordered'}, {'list': 'bullet'}, 'blockquote', 'code-block'] - ], + toolbar: this.$isEEUiApp || this.windowTouch ? false : this.toolbar, keyboard: { bindings: { 'short enter': { @@ -1244,9 +1248,7 @@ export default { readOnly: false, placeholder: this.placeholder, modules: { - toolbar: [ - ['bold', 'strike', 'italic', 'underline', {'list': 'ordered'}, {'list': 'bullet'}, 'blockquote', 'code-block'] - ], + toolbar: this.toolbar, mention: this.quillMention() } }, this.options)) @@ -1350,7 +1352,7 @@ export default { }) }) moreUser.sort((a, b) => a.last_at > b.last_at ? -1 : (a.last_at < b.last_at ? 1 : 0)); - // + // this.userList = list this.userCache = []; if (moreUser.length > 0) {