2018-12-17 16:34:32 +00:00
|
|
|
import {
|
|
|
|
Form,
|
|
|
|
Select,
|
|
|
|
InputNumber,
|
|
|
|
DatePicker,
|
|
|
|
Switch,
|
|
|
|
Slider,
|
|
|
|
Button
|
|
|
|
} from 'antd'
|
2018-06-07 11:14:27 +00:00
|
|
|
|
|
|
|
const FormItem = Form.Item
|
|
|
|
const Option = Select.Option
|
|
|
|
|
|
|
|
export default () => (
|
2018-12-10 11:20:01 +00:00
|
|
|
<div style={{ marginTop: 100 }}>
|
|
|
|
<Form layout='horizontal'>
|
|
|
|
<FormItem
|
|
|
|
label='Input Number'
|
|
|
|
labelCol={{ span: 8 }}
|
|
|
|
wrapperCol={{ span: 8 }}
|
|
|
|
>
|
2018-12-17 16:34:32 +00:00
|
|
|
<InputNumber
|
|
|
|
size='large'
|
|
|
|
min={1}
|
|
|
|
max={10}
|
|
|
|
style={{ width: 100 }}
|
|
|
|
defaultValue={3}
|
|
|
|
name='inputNumber'
|
|
|
|
/>
|
2018-12-10 11:20:01 +00:00
|
|
|
<a href='#'>Link</a>
|
|
|
|
</FormItem>
|
2018-06-07 11:14:27 +00:00
|
|
|
|
2018-12-17 16:34:32 +00:00
|
|
|
<FormItem label='Switch' labelCol={{ span: 8 }} wrapperCol={{ span: 8 }}>
|
2018-12-10 11:20:01 +00:00
|
|
|
<Switch defaultChecked name='switch' />
|
|
|
|
</FormItem>
|
2018-06-07 11:14:27 +00:00
|
|
|
|
2018-12-17 16:34:32 +00:00
|
|
|
<FormItem label='Slider' labelCol={{ span: 8 }} wrapperCol={{ span: 8 }}>
|
2018-12-10 11:20:01 +00:00
|
|
|
<Slider defaultValue={70} />
|
|
|
|
</FormItem>
|
2018-06-07 11:14:27 +00:00
|
|
|
|
2018-12-17 16:34:32 +00:00
|
|
|
<FormItem label='Select' labelCol={{ span: 8 }} wrapperCol={{ span: 8 }}>
|
|
|
|
<Select
|
|
|
|
size='large'
|
|
|
|
defaultValue='lucy'
|
|
|
|
style={{ width: 192 }}
|
|
|
|
name='select'
|
|
|
|
>
|
2018-12-10 11:20:01 +00:00
|
|
|
<Option value='jack'>jack</Option>
|
|
|
|
<Option value='lucy'>lucy</Option>
|
2018-12-17 16:34:32 +00:00
|
|
|
<Option value='disabled' disabled>
|
|
|
|
disabled
|
|
|
|
</Option>
|
2018-12-10 11:20:01 +00:00
|
|
|
<Option value='yiminghe'>yiminghe</Option>
|
|
|
|
</Select>
|
|
|
|
</FormItem>
|
2018-06-07 11:14:27 +00:00
|
|
|
|
2018-12-10 11:20:01 +00:00
|
|
|
<FormItem
|
|
|
|
label='DatePicker'
|
|
|
|
labelCol={{ span: 8 }}
|
|
|
|
wrapperCol={{ span: 8 }}
|
|
|
|
>
|
|
|
|
<DatePicker name='startDate' />
|
|
|
|
</FormItem>
|
2018-12-17 16:34:32 +00:00
|
|
|
<FormItem style={{ marginTop: 48 }} wrapperCol={{ span: 8, offset: 8 }}>
|
2018-12-10 11:20:01 +00:00
|
|
|
<Button size='large' type='primary' htmlType='submit'>
|
2018-12-17 16:34:32 +00:00
|
|
|
OK
|
2018-12-10 11:20:01 +00:00
|
|
|
</Button>
|
|
|
|
<Button size='large' style={{ marginLeft: 8 }}>
|
2018-12-17 16:34:32 +00:00
|
|
|
Cancel
|
2018-12-10 11:20:01 +00:00
|
|
|
</Button>
|
|
|
|
</FormItem>
|
|
|
|
</Form>
|
|
|
|
</div>
|
2018-06-07 11:14:27 +00:00
|
|
|
)
|