Commit 9e68d91e authored by youjie's avatar youjie

no message

parent 8076505b
......@@ -23,10 +23,7 @@
changeText: function () {
let sel = window.getSelection();
let offset = sel.anchorOffset;
if (this.$el.innerText.length > this.textLength) {
this.$el.innerText = this.$el.innerText.slice(0, 3);
}
if (this.textLength) {
if (this.textLength&&this.$el.innerText.length > this.textLength) {
this.$el.innerText = this.$el.innerText.slice(0, this.textLength);
}
this.$emit("input", this.$el.innerText);
......
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