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