import React, { useState } from 'react'; import { Text, View } from 'react-native'; import { Space, Select, Switch, Input } from '@xrnjs/ui'; import { IconXChina1 } from '../../../icons'; import Card from '_global/Card'; import { styles } from './style'; const options = new Array(500).fill(0).map((_, index) => ({ label: `选项${index + 1}`, value: `option${index + 1}`, })); const BasicRadioExample = () => { const [visible, setVisible] = useState(false); const [showNoMoreTip, setShowNoMoreTip] = useState(true); const [value, setValue] = useState(); const [displayValue, setDisplayValue] = useState(); const onChange = (selectedValue: string | string[]) => { const val = selectedValue as string; setValue(val); const selectedOption = options.find((opt) => opt.value === val); setDisplayValue( {selectedOption?.label} ); setVisible(false); }; const onClear = () => { setValue(''); setDisplayValue(''); }; return ( 基础单选 是否显示没有更多选项 ); }; export default BasicRadioExample;