From f611f96463227b1a2f6b637a227c06dfdd53dd62 Mon Sep 17 00:00:00 2001 From: Volankey <935196116@qq.com> Date: Mon, 16 Mar 2020 18:01:32 +0800 Subject: [PATCH 1/2] fixed(input): input component bug, the cursor moves to the end after deleting the text in the middle --- src/Input/src/Input.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Input/src/Input.vue b/src/Input/src/Input.vue index 470553fdc..41de2e15c 100644 --- a/src/Input/src/Input.vue +++ b/src/Input/src/Input.vue @@ -343,7 +343,6 @@ export default { if (this.isComposing) return const changedValue = e.target.value if (!this.pair) { - e.target.value = this.value this.$emit('input', changedValue) } else { let value = this.value @@ -354,7 +353,7 @@ export default { } e.target.value = value[index] value[index] = changedValue - this.$emit('input', value) + this.$emit('input', `value`) } }, handleInputBlur (e) { From 329751b6d619b6ca3e0c6c20325a2ce6b01ad496 Mon Sep 17 00:00:00 2001 From: Volankey <935196116@qq.com> Date: Mon, 16 Mar 2020 18:04:25 +0800 Subject: [PATCH 2/2] fixed(input): input component bug, the cursor moves to the end after deleting the text in the middle --- src/Input/src/Input.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Input/src/Input.vue b/src/Input/src/Input.vue index 41de2e15c..ef3b4b64b 100644 --- a/src/Input/src/Input.vue +++ b/src/Input/src/Input.vue @@ -353,7 +353,7 @@ export default { } e.target.value = value[index] value[index] = changedValue - this.$emit('input', `value`) + this.$emit('input', value) } }, handleInputBlur (e) {