使用optionItemRender属性
<ProFormSelect
name="select"
label="Select"
options={[
{ label: '全部', value: 'all' },
{ label: '未解决', value: 'open' },
{ label: '已解决', value: 'closed' },
{ label: '解决中', value: 'processing' },
]}
fieldProps={{
optionItemRender(item) {
return item.label + ' - ' + item.value;
},
}}
placeholder="Please select a country"
rules={[{ required: true, message: 'Please select your country!' }]}
/>
网友评论