From 0ef754024d3b017b573cb17f293c94d81e2f066f Mon Sep 17 00:00:00 2001 From: DCloud_JSON Date: Mon, 17 Jun 2024 20:14:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=83=85=E5=86=B5=E4=B8=8B=EF=BC=8C=E6=8F=92=E5=85=A5=E7=9A=84?= =?UTF-8?q?=E8=A1=A8=E6=83=85=E5=8C=85=E7=9A=84=E4=BD=8D=E7=BD=AE=E4=B8=8D?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/uni-im-chat-input/uni-im-chat-input.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/uni-im-chat-input/uni-im-chat-input.vue b/components/uni-im-chat-input/uni-im-chat-input.vue index 8d47760..154ed8d 100644 --- a/components/uni-im-chat-input/uni-im-chat-input.vue +++ b/components/uni-im-chat-input/uni-im-chat-input.vue @@ -244,7 +244,10 @@ this.addHtmlToCursor(uniCodeEmoji,false) }, addHtmlToCursor(html,focus=true) { - this.$refs.editor.callRmd('$addHtmlToCursor',html,focus) + // 因为可能在点击某个元素后失去了光标,所以需要延迟让lastCursor更新后在插入 + setTimeout(()=>{ + this.$refs.editor.callRmd('$addHtmlToCursor',html,focus) + },100) }, setContent(content) { console.log('setContent', content); @@ -318,7 +321,7 @@ background-color: #2faf4c; height: 28px; line-height: 28px; - padding: 0 10px; + padding: 0 8px; text-align: center; } } -- GitLab