import React, { useState } from 'react'; import { Button, Space, Picker, PickerOption, Fill } from '@xrnjs/ui'; import Card from '_global/Card'; // 基础选项数据 const basicOptions: PickerOption[] = new Array(10).fill(0).map((_, index) => ({ label: `选项${index + 1}`, value: `option_${index + 1}`, disabled: index === 5, // 第6个选项禁用 })); // 多列选择数据 const multipleColumns: PickerOption[][] = [ new Array(5).fill(0).map((_, index) => ({ label: `第一列${index + 1}`, value: `col1_${index + 1}`, })), new Array(5).fill(0).map((_, index) => ({ label: `第二列${index + 1}`, value: `col2_${index + 1}`, })), new Array(5).fill(0).map((_, index) => ({ label: `第三列${index + 1}`, value: `col3_${index + 1}`, })), ]; // 长文本选项数据 const longTextOptions: PickerOption[] = new Array(8) .fill(0) .map((_, index) => ({ label: `这是一个很长的选项文本内容,用于测试文本换行和显示效果 ${ index + 1 }`, value: `long_text_${index + 1}`, disabled: index === 3, })); const BasicUsage = () => { const [singleResult, setSingleResult] = useState(''); const [multipleResult, setMultipleResult] = useState([]); const [longTextResult, setLongTextResult] = useState(''); return ( {singleResult && ( )} {multipleResult.length > 0 && ( )} {longTextResult && ( )} ); }; export default BasicUsage;