Skip to content
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

Radio组件的item checked是怎么触发的? #1843

Closed
zhuyuanwen opened this issue Aug 15, 2017 · 7 comments
Closed

Radio组件的item checked是怎么触发的? #1843

zhuyuanwen opened this issue Aug 15, 2017 · 7 comments

Comments

@zhuyuanwen
Copy link

犹豫我的单选内容不是简单的lable文字,而是一个音乐列表,需要点击播放按钮来试听,另外点击item来触发item选中。因为我可能需要自己加event.stopPropagation()事件。

@airyland
Copy link
Owner

看不懂需求。checked 就是点击触发的。

@zhuyuanwen
Copy link
Author

@airyland 稍等 我截个图给你

@zhuyuanwen
Copy link
Author

zhuyuanwen commented Aug 15, 2017

@zhuyuanwen
Copy link
Author

@airyland 抱歉,我只会这样截图。。 我想知道你的radio的click事件,就是我点击某个item的时候,item被选中。但是我也需要可以点击播放按钮来播放音乐

@airyland
Copy link
Owner

其实看起来不用 Radio 组件直接自己写一个更方便 😅
目测也只能像你上面说的,在点击时阻止冒泡试试。

组件层面上不好设计以支持这种情况。

@zhuyuanwen
Copy link
Author

@airyland 好吧😂 纠结了2天。。
那你的Radio组件是通过哪个函数来控制项目被选中的?

@airyland
Copy link
Owner

直接设置绑定的值就行了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants