React Native 的复选框组件 React Native Check Box

码农软件 · 软件分类 · React 开源项目 · 2019-04-28 08:12:09

软件介绍

React Native Check Box,这是一款方便易用的Check Box组件,支持 Android 和 iOS。

安装:

npm i react-native-check-box --save
import CheckBox from 'react-native-check-box'

运行效果:

基本用法:

 <CheckBox
     style={{flex: 1, padding: 10}}
     onClick={()=>this.onClick(data)}
     isChecked={data.checked}
     leftText={leftText} />;

自定义复选框:

renderCheckBox(data) {
    var leftText = data.name;
    return (
        <CheckBox
            style={{flex: 1, padding: 10}}
            onClick={()=>this.onClick(data)}
            isChecked={data.checked}
            leftText={leftText}
            checkedImage={<Image source={require('../../page/my/img/ic_check_box.png')} style={this.props.theme.styles.tabBarSelectedIcon}/>}
            unCheckedImage={<Image source={require('../../page/my/img/ic_check_box_outline_blank.png')} style={this.props.theme.styles.tabBarSelectedIcon}/>}
        />);
}

本文地址:https://codercto.com/soft/d/4549.html

C# Primer Plus

C# Primer Plus

Klaus Michelsen / Sams / 2001-12-15 / USD 49.99

C# Primer Plus is a tutorial based introduction to the C# language and important parts of the .Net Framework. Throughout the book the reader will be exposed to proven principles enabling him to write ......一起来看看 《C# Primer Plus》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

SHA 加密
SHA 加密

SHA 加密工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具