Vue中div contenteditable 的光标定位

在Vue作项目时,作了一个div[contenteditable=true]的组件做为文本输入框javascript 在非手动输入值后,光标会丢失,经测试如下这段代码可用,直接将光标定位到最后vue function keepLastIndex(obj) { console.log(obj) console.log(window.getSelection)
相关文章
相关标签/搜索