/
demo7.js
80 lines (74 loc) · 1.87 KB
/
demo7.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import React from 'react'
import { Form, Input, Grid } from '@alicloud/console-components'
const FormItem = Form.Item
const { Row, Col } = Grid
const formItemLayout = {
labelCol: { span: 4 },
wrapperCol: { span: 14 },
}
const insetLayout = {
labelCol: { fixedSpan: 3 },
}
const Demo7 = () => (
<Form {...formItemLayout}>
<FormItem id="control-input" label="Input Something:">
<Row gutter="4">
<Col>
<FormItem
label="Nest"
labelAlign="inset"
{...insetLayout}
required
requiredTrigger="onBlur"
asterisk={false}
>
<Input placeholder="Please enter..." name="firstname" />
</FormItem>
</Col>
<Col>
<FormItem
label="Nest"
labelAlign="inset"
{...insetLayout}
required
asterisk={false}
>
<Input placeholder="need onChange" name="secondname" />
</FormItem>
</Col>
</Row>
</FormItem>
<FormItem label="Bank Account:">
<Row gutter="4">
<Col>
<FormItem required requiredTrigger="onBlur">
<Input name="A" />
</FormItem>
</Col>
<Col>
<FormItem required requiredTrigger="onBlur">
<Input name="B" />
</FormItem>
</Col>
<Col>
<FormItem required requiredTrigger="onBlur">
<Input name="C" />
</FormItem>
</Col>
<Col>
<FormItem required requiredTrigger="onBlur">
<Input name="D" />
</FormItem>
</Col>
</Row>
</FormItem>
<FormItem label=" ">
<Form.Submit onClick={v => console.log(v)}>Submit</Form.Submit>
</FormItem>
</Form>
)
export default Demo7
export const demoMeta = {
zhName: '嵌套',
zhDesc: `FormItem 嵌套`,
}