You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
The text was updated successfully, but these errors were encountered:
This is a wontfix, because the emitted events need to be in correct order (as fixed in #6805). It only happened to work previously because the native event was emitted first and then overwritten by the custom event.
You can preserve the old behavior by emitting the custom event in a nextTick, so that it overwrites the native event: https://jsfiddle.net/50wL7mdz/72174/
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
The text was updated successfully, but these errors were encountered: