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 checkbox is encapsulated as a component and uses the 'v-on = "$ listeners"' binding when listening events
The parent component listens to its 'onchange' event, triggers the time before the value of the checkbox is modified,
Resulting in the lack of the correct value,
Only listen to the original 'change' event, or use 'nextTick' to get the latest value
Such a situation does not appear in v2.4.4.
Can be modified by modifying the vue version to be reproduced
From Google Translate
What is expected?
父级组件'onchange'应该在value正确得到修改之后触发.
The parent component 'onchange' should be triggered after the value has been modified correctly.
The parent component 'onchange' event is triggered before the value is modified, resulting in the inability to get the correct value and can only be obtained by 'nextTick'.
这种情况在2.4.4没有出现.
导致两个版本无法兼容
This situation did not occur in 2.4.4.
Resulting in two versions that are not compatible
The text was updated successfully, but these errors were encountered:
Version
2.5.0
Reproduction link
https://jsfiddle.net/50wL7mdz/68600/
Steps to reproduce
当checkbox被封装成组件后,并使用'v-on="$listeners"'绑定监听事件时
父组件对其监听'onchange'事件,触发时机早于checkbox的值修改之前,
导致获取不到正确的值,
只能对其监听原生'change'事件,或者使用'nextTick'来获取最新的值
此类情况在v2.4.4 没有出现.
可以修改通过修改vue版本得到重现
来自谷歌翻译
When the checkbox is encapsulated as a component and uses the 'v-on = "$ listeners"' binding when listening events
The parent component listens to its 'onchange' event, triggers the time before the value of the checkbox is modified,
Resulting in the lack of the correct value,
Only listen to the original 'change' event, or use 'nextTick' to get the latest value
Such a situation does not appear in v2.4.4.
Can be modified by modifying the vue version to be reproduced
From Google Translate
What is expected?
父级组件'onchange'应该在value正确得到修改之后触发.
The parent component 'onchange' should be triggered after the value has been modified correctly.
What is actually happening?
父级组件'onchange'事件在value修改之前就被触发.导致无法拿到正确值,只能通过'nextTick'获取.
The parent component 'onchange' event is triggered before the value is modified, resulting in the inability to get the correct value and can only be obtained by 'nextTick'.
这种情况在2.4.4没有出现.
导致两个版本无法兼容
This situation did not occur in 2.4.4.
Resulting in two versions that are not compatible
The text was updated successfully, but these errors were encountered: