nuke-radio

2.3.12 • Public • Published

Radio

  • category component
  • type UI

设计思路

Radio 常用于表单中,便于用户在多项数据源里选择一项合适的值提交。本组件是使用 View + Text 绘制,无端依赖。

Radio 都是受控组件。

API

Radio

属性 说明 类型 默认值
checked 是否选中, group 模式下无效 boolean
disabled 是否禁用 boolean false
size 大小 string(small,medium) medium
onChange 点击造成状态改变时的回调函数,group 使用时,单个 item 上不存在此回调 function(checked,e)
type 单选框类型 string('normal' , 'list','empty','dot') normal
touchStyle 可触摸区域样式 object {}
checkedStyle 可用于选中态的样式 object {}
ignoreContext 忽略上层父级 context,当 radio.group 的子级存在非 group 模式的 radio 时需设置为 false bool(false)

Radio.group

属性 说明 类型 默认值
value 当前选择的值 any ''
onChange 选中值发生改变后的回调 function(value,e) ()=>{}
dataSource 可选数据源 array []
groupItemStyle group 选择时的 item 外部样式 object {}
reverse 反转 label 与 radio 的显示顺序 bool false
renderItem 自定义渲染 group 的 item 方法 function ()

Readme

Keywords

Package Sidebar

Install

npm i nuke-radio

Weekly Downloads

7

Version

2.3.12

License

Apache-2.0

Unpacked Size

114 kB

Total Files

25

Last publish

Collaborators

  • doub
  • fnatic
  • leanhunter
  • no-repeat