-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
feat: update radio #2374
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
feat: update radio #2374
Conversation
5445579
to
668fb01
Compare
components/radio/Radio.jsx
Outdated
const props = getOptionProps(this); | ||
const children = $slots.default; | ||
const { mouseenter = noop, mouseleave = noop, ...restListeners } = getListeners(this); | ||
const { onMouseenter = noop, onMouseleave = noop, ...restAttrs } = $attrs; |
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.
事件的处理 和 v-model 的处理 在理一下 参考 group
components/radio/RadioButton.jsx
Outdated
} | ||
return <Radio {...radioProps}>{this.$slots.default}</Radio>; | ||
return <Radio {...radioProps}>{this.$slots.default()}</Radio>; |
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.
这个添加 inheritAttrs: false 不然这里的 onChange 和 自动挂载的是如何处理的? 大概率是合并
|
||
export default { | ||
name: 'Checkbox', | ||
mixins: [BaseMixin], | ||
inheritAttrs: false, | ||
model: { |
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.
注意 v-model 的处理
668fb01
to
969482c
Compare
48dda04 |
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)