import React, { useState } from 'react'; import { Text, View } from 'react-native'; import { Button, Space, Select, Field, Input } from '@xrnjs/ui'; import { IconMAFinancialmanagement2, IconPPBrazil1, } from '../../../icons'; import Card from '_global/Card'; import { styles } from './style'; const groups = [ { label: '水果类', children: [ { label: '苹果', value: 'apple', prefixIcon: 'https://images.unsplash.com/photo-1567945716310-4745a6b7844b?w=100', }, { label: '香蕉', value: 'banana', subLabel: '热带水果', }, { label: '橙子', value: 'orange', contentLabel: '维生素C丰富', }, ], }, { label: '蔬菜类', children: [ { label: '胡萝卜', value: 'carrot', prefixIcon: , }, { label: '白菜', value: 'cabbage', subLabel: '绿色蔬菜', }, { label: '土豆(禁用)', value: 'potato', disabled: true, prefixIcon: , }, ], }, { label: '肉类', children: [ { label: '牛肉', value: 'beef', }, { label: '猪肉', value: 'pork', }, ], }, ]; const GroupSelectExample = () => { const [visible, setVisible] = useState(false); const [showTipLimit, setShowTipLimit] = useState('7'); const [value, setValue] = useState([]); const onChange = (values: string | string[]) => { setValue(values as string[]); }; const onConfirm = () => { setVisible(false); }; const extra = ( 提示:可以选择多个不同分组的选项 ); return ( 分组选择