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 8d477608fcf661ec1ffa923836588253573d9c55..154ed8d5e5338e3b99547e4c679ee564eedd24b8 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; } }