ProForm for internal use
ProFormSelcet can be used in three ways
1.The first method is usually used when the server requests data <ProFormSelect width="md"
fieldProps={{
labelInValue: true,
}}
request={async(a) = > [{label: 'all'.value: 'all' },
{ label: 'Unresolved'.value: 'open' },
{ label: 'Settled'.value: 'closed' },
{ label: 'In settlement'.value: 'processing' },
]}
name="useMode"
label="Effective mode stipulated in the Contract"
/>
Copy the code
2.<ProFormSelect name= <ProFormSelect name="select-multiple"
label="Select[multiple]"
valueEnum={{
red: 'Red'.green: 'Green'.blue: 'Blue',
}}
fieldProps={{
mode: 'multiple',
}}
placeholder="Please select favorite colors"
rules={[{ required: true.message: 'Please select your favorite colors! '.type: 'array'}]} / >Copy the code
3.Third way default options way < ProFormSelect. SearchSelect name ="userQuery"
label="Query selector"
options={[
{ label: 'all'.value: 'all' },
{ label: 'Unresolved'.value: 'open' },
{ label: 'Settled'.value: 'closed' },
{ label: 'In settlement'.value: 'processing' },
]}
/>
Copy the code
ProFormDatePicker and ProFormDateTimePicker
ProFormDatePicker can be configured with time equivalent to ProFormDateTimePicker
<ProFormDatePicker name="fixedTime" width={width} label=" fieldProps "={{showTime: {format: 'HH:mm'}, format: 'YYYY-MM-DD HH: MM ',}} /> <ProFormDateTimePicker width={layout} name="faultTime" label=" occurrence date "rules={[{required: True, message: 'Occurrence date cannot be empty! ',},]} />Copy the code