-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
89 additions
and
80 deletions.
There are no files selected for viewing
49 changes: 23 additions & 26 deletions
49
packages/form/src/components/QueryFilter/demos/query-filter.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,31 @@ | ||
import { | ||
ProFormDatePicker, | ||
ProFormDateRangePicker, | ||
ProFormSelect, | ||
ProForm, | ||
ProFormDateTimePicker, | ||
ProFormText, | ||
QueryFilter, | ||
} from '@ant-design/pro-components'; | ||
|
||
export default () => { | ||
return ( | ||
<QueryFilter<{ | ||
name: string; | ||
}> | ||
onFinish={async (values) => { | ||
console.log(values.name); | ||
}} | ||
> | ||
<ProFormText name="name" label="应用名称" rules={[{ required: true }]} /> | ||
<ProFormText name="creater" label="创建人" /> | ||
<ProFormSelect | ||
name="sex" | ||
label="性别" | ||
showSearch | ||
valueEnum={{ | ||
man: '男', | ||
woman: '女', | ||
}} | ||
/> | ||
<ProFormText name="status" label="应用状态" /> | ||
<ProFormDatePicker name="startdate" label="响应日期" /> | ||
<ProFormDateRangePicker name="create" label="创建时间" colSize={3} /> | ||
</QueryFilter> | ||
<ProForm grid={true}> | ||
<ProForm.Group> | ||
<ProFormDateTimePicker | ||
label="下单时间" | ||
colProps={{ xl: 12 }} | ||
name="orderTime" | ||
required | ||
fieldProps={{ | ||
style: { | ||
width: '100%', | ||
}, | ||
}} | ||
/> | ||
<ProFormText | ||
disabled | ||
colProps={{ xl: 12 }} | ||
name="pay" | ||
label="支付方式" | ||
/> | ||
</ProForm.Group> | ||
</ProForm> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters