-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
fix: avoid emit update:checked twice #3866
Conversation
@@ -89,7 +89,6 @@ export default defineComponent({ | |||
if ('checked' in props) { | |||
this.$refs.input.checked = props.checked; | |||
} | |||
this.__emit('update:checked', eventObj); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
radioGroup checkGroup 会无法触发 update:checked 这个事件 了 全局搜索下 VcCheckbox 看下 group 的逻辑
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok,我去看看
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里没影响啊,https://github.com/vueComponent/ant-design-vue/blob/next/components/checkbox/Checkbox.tsx#L104 ,vcCheckbox emit change,然后通过context调用group的事件, group自己处理update:checked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok 我看错了 看成了 group也是 checked 事件了
@@ -89,7 +89,6 @@ export default defineComponent({ | |||
if ('checked' in props) { | |||
this.$refs.input.checked = props.checked; | |||
} | |||
this.__emit('update:checked', eventObj); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok 我看错了 看成了 group也是 checked 事件了
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
First of all, thank you for your contribution! 😄
New feature please send pull request to feature branch, and rest to master branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you!
[中文版模板 / Chinese template]
This is a ...
What's the background?
API Realization (Optional if not new feature)
What's the effect? (Optional if not new feature)
Changelog description (Optional if not new feature)
Self Check before Merge
Additional Plan? (Optional if not new feature)