<div contenteditable="true" class="replyContent" v-html="replyContent" @keyup="changeData($event)" ></div>insertEmoji: function (url) { var tpl = `<img src="${ url }" width="24" class="emoji-item-img" />` // console.log(this.replyContent); this.replyContent += tpl // console.log(this.replyContent); }, changeData: function (event) { this.replyContent = event.srcElement.innerHTML // this.$set(this.$data, 'replyContent', event.srcElement.innerHTML) }执行emoji方法后,输入的时候,光标回回跳到首位请问有什么解决方案?或者emoji有什么方法插入容器?very much Thanks in advance~~~
添加回答
举报
0/150
提交
取消