element icon indicating copy to clipboard operation
element copied to clipboard

[Feature Request] radio's selection function

Open sparknest-team opened this issue 9 years ago • 5 comments

Existing Component

Yes

Component Name

radio

Description

建议radio单选框,增加取消功能,应用场景非常多! 比如默认不选中的情况,你勾选后无法取消,特别难用

sparknest-team avatar Aug 15 '17 08:08 sparknest-team

Translation of this issue:

Existing Component

Yes

Component Name

Radio

Description

Recommend radio radio box, increase the cancellation function, the application scene is very much!

For example, the default is not selected, you can not cancel the check, particularly difficult to use

element-bot avatar Aug 15 '17 08:08 element-bot

所以还有个复选框嘛~
Radio 标准的HTML Radio也是这个样子

qingdengyue avatar Aug 16 '17 00:08 qingdengyue

标准要是好用,就不用组件了,需求是存在的,复选框单选行为太怪异

sparknest-team avatar Aug 16 '17 06:08 sparknest-team

标准要是好用,就不用组件了,需求是存在的,复选框单选行为太怪异

最近项目中也遇到这个需求,已找到解决方法。监听el-radio的原生click事件,事件会触发两次,判断事件参数e.target.nodeName==='INPUT'时,将v-model绑定的value值设置为相反状态的值

maple326 avatar Jun 02 '22 04:06 maple326

标准要是好用,就不用组件了,需求是存在的,复选框单选行为太怪异

最近项目中也遇到这个需求,已找到解决方法。监听el-radio的原生click事件,事件会触发两次,判断事件参数e.target.nodeName==='INPUT'时,将v-model绑定的value值设置为相反状态的值

如果能内置到组件的cancelable就完美了。

sparknest-team avatar Jun 07 '22 02:06 sparknest-team