Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug-report] textarea-item 监听input事件$_onInput中文输入法中过度导致change事件 #761

Open
gy1001 opened this issue Nov 5, 2021 · 0 comments

Comments

@gy1001
Copy link

gy1001 commented Nov 5, 2021

Mand Mobile Version

2.5.11

Vue Version

2.6.11

Model / OS & Browser Info

ipone

Node Version, Package Management Tool

node 14.16.1/ npm 8.0.0

Recurring Steps

  1. 输入中文、英文、数字等
  2. 英文输入法和数字输入法时候没有问题
  3. 中文输入法时候还没有选择中文字符时候就会触发 change input 事件

Expectant Behaviors

  1. 英文输入法依旧
  2. 中文输入法确认字符后触发change input事件

Actual Behaviors

  1. 英文数字正常
  2. 中文输入法开始输入就触发 change input 事件
    如图

{{ textValue.length }} [输入框输入中文未确认输入字符时候也会触发change事件,同事textValue也会变化] 看源码 textarea身上绑定事件 @input="$_onInput" ,在$_onInput中直接 this.inputValue = event.target.value ;导致inputValue 变化,触发watch 中的逻辑调用 this.$emit('input', val); 是否可以在$_onInpu 后面应该可以做一些判断处理,符合条件的进行现有逻辑处理,否则不处理的
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant