From 52670a2e8716a05030c790f438a2c6ded7e2ea9c Mon Sep 17 00:00:00 2001 From: qiang Date: Mon, 24 Jun 2019 15:52:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=20textarea=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=9A=84=20input=20=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E6=9F=90=E4=BA=9B=E6=83=85=E5=86=B5=E4=B8=8D=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/view/components/textarea/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/view/components/textarea/index.vue b/src/core/view/components/textarea/index.vue index 03f678658..76b4a5af8 100644 --- a/src/core/view/components/textarea/index.vue +++ b/src/core/view/components/textarea/index.vue @@ -150,7 +150,8 @@ export default { this.valueSync = String(val) }, valueSync (val) { - if (val !== this.value) { + if (val !== this._oldValue) { + this._oldValue = val this.$trigger('input', {}, { value: val, cursor: this.$refs.textarea.selectionEnd @@ -204,7 +205,7 @@ export default { }) }, mounted () { - this.$refs.textarea.value = this.valueSync + this._oldValue = this.$refs.textarea.value = this.valueSync this._resize({ height: this.$refs.sensor.$el.offsetHeight }) -- GitLab