React Native 自定义radio 单选or多选
import React, {
PureComponent } from 'react';
import PropTypes from 'prop-types';
import {
View, Text, StyleSheet, TouchableOpacity, Image, Dimensions } from 'react-native';
import uniq from 'lodash/uniq';
import includes from 'lodash/includes';
import difference from 'lodash/difference';
const selected = require('../images/programme/radioSelect.png')
const unselected = require('../images/programme/radioUnSelect.png')
export default class CustomRadio extends PureComponent {
handleSelect = (option, index) => {
const {
onSelect, type, value } = this.props
const valueAfterSelected = toggleValue(option, type, value)
onSelect && onSelect(valueAfterSelected