import React, { useState } from 'react'; import { TouchableWithoutFeedback, View } from 'react-native'; import { Field, Input, Picker, PickerOption } from '@xrnjs/ui'; import { IconXLowersmall1 } from '../../../icons'; import Card from '_global/Card'; import styles from './style'; const columns1 = new Array(10).fill(0).map((_, index) => ({ label: `选项${index}`, value: `${index}`, disabled: index === 6, })); const PickerDemo = () => { const [pickerValue, setPickerValue] = useState(); return ( } /> { Picker({ ...(pickerValue && { defaultValue: [pickerValue?.value] }), title: '标题', columns: columns1, }).then((data) => { if (data.action === 'confirm') { setPickerValue(data.columns[0]); } }); }} > ); }; export default PickerDemo;