CheckBox 选择框
CheckBox 是基础的选择框,选择框用图片实现,支持用户使用自己的图片进行替换
安装
$ npm install rax-checkbox --save
引用
import CheckBox from "rax-checkbox";
属性
名称 | 类型 | 默认值 | 描述 |
---|---|---|---|
checked | Boolean | 选中状态 | |
checkedImage | String | 选中图片 | |
uncheckedImage | String | 非选中图片 | |
containerStyle | Object | 选择框容器样式 | |
checkboxStyle | Object | 选择框图片样式 | |
onChange | Function | 选择事件 |
基本示例
// demo/* eslint-disable import/no-extraneous-dependencies */import createElement render useRef useEffect from 'rax';import DU from 'driver-universal';import View from 'rax-view';import CheckBox from 'rax-checkbox'; const App = const checkboxRef = ; ; return <View ><CheckBox = /></View>;; ;