Commit a9e412df authored by 黄奎's avatar 黄奎

页面修改

parent b5a78eaa
...@@ -28,19 +28,19 @@ ...@@ -28,19 +28,19 @@
} }
if(this.textLength) this.$el.innerText = this.$el.innerText.slice(0,this.textLength) if(this.textLength) this.$el.innerText = this.$el.innerText.slice(0,this.textLength)
this.$emit("input", this.$el.innerText); this.$emit("input", this.$el.innerText);
setTimeout(() => { // setTimeout(() => {
var range = sel.getRangeAt(0); // var range = sel.getRangeAt(0);
if (range) { // if (range) {
var textNode = range.startContainer; // var textNode = range.startContainer;
if (textNode) { // if (textNode) {
range.setStart(textNode, offset) // range.setStart(textNode, offset)
} // }
if (sel) { // if (sel) {
sel.removeAllRanges() // sel.removeAllRanges()
sel.addRange(range) // sel.addRange(range)
} // }
} // }
}, 0) // }, 0)
} }
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment