Skip to content

When the component is bundled with 'v-model', if the 'v-on = "$ listeners"' attribute is added, the 'input event' will be passed up. 'Value' is eventually '[object Event]' #6846

@zWingz

Description

@zWingz

Version

2.5.2

Reproduction link

https://jsfiddle.net/50wL7mdz/70003/

Steps to reproduce

输入任意值.得到的是'[object Event]',并观察console
修改vue版本.重复步骤,然后观察console
翻译来自谷歌

Enter any value. Get '[object Event]' and watch console
Modify the vue version. Repeat steps. Then observe the console
Translate from Google

What is expected?

input的值为输入的值

The value of input should be the value entered

What is actually happening?

input标签将'input event'传递给父组件
导致value为[object Event]

The input tag passes 'input event' to the parent component
Causing value to be [object Event]


此情况在2.5.0之前.虽然依然会将event通过input传递给父组件.但并不影响最终结果.
在2.5.2则将会影响最终结果

This is before 2.5.0. Although the event is still passed to the parent component via input, it does not affect the final result.
At 2.5.2 will affect the final result

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions