Skip to content

v-model not update when use the Chinese input method #5158

Closed
@jiangtao

Description

@jiangtao

中文输入法导致 v-model 的值不更新

代码:http://jsbin.com/robetuzuxo/edit?html,js,output
demo: http://output.jsbin.com/robetuzuxo

当用手机浏览器打开 demo 后,点击 input 输入框,切换至中文输入法,随便输入,然后直接点击 submit 按钮(不要点击完成或者 done),发现 v-model 的值没有更新,但是通过原生方法找到 input 的 value,发现 value 值是更新过的,这种情况要怎么处理?目前我们的解决方案是重新封装一个 input component 出来,但是以前的上线的全部业务现在出现这种情况,直接导致业务不可用了. 当然可以使用computed setter getter 解决,但是,由于业务中有大量的表单数据,使用computed改动成本很高. 望尤大能给一个好的解决方案, 谢谢!

Bug:

Chinese input method cause v-model data is not updated.

Code:http://jsbin.com/robetuzuxo/edit?html,js,output
demo: http://output.jsbin.com/robetuzuxo

When you use the mobile browser to open the demo, click the input field input box, switch to the Chinese input method, casually enter, and then click the submit button (do not click Finish or done) and found that the value of v-model is not updated, but found by native method Input value, found that the value is updated, how to deal with this situation? At present our solution is to re-package an input component out, but the previous on-line all the business now this situation, a direct result of the business is not available. Of course, I can use the computed setter getter to solve it, but because of the large number of forms in the business data, solve it with the use of high cost changes. so hope to give a good solution. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions