Form
Form 表单组件。
Install
1. npm install beeshell
Usage
引入方式
全部引入
1. import { Form } from 'beeshell';
单独引入
1. import Form from 'beeshell/components/Form';
Examples

Code
2. import { Form, Input } from 'beeshell';
3. const FormItem = Form.Item;
5. class App extends React.Component {
6. render() {
7. return (
8. <ScrollView>
9. <Form>
10. <FormItem prop="name" label="姓名" hasLine>
11. <Input value="" onChange={() => {}} />
12. </FormItem>
13. <FormItem prop="email" label="邮箱">
14. <Input value="" onChange={() => {})} />
15. </FormItem>
16. </Form>
17. </ScrollView>
18. );
19. }
20. }
Form Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| title | String | false | null | 表单标题 |
Form.Item Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| label | String | false | null | 表单控件标签 |
| labelWidth | Number | false | 90 | 表单控件标签宽度 |
| hasLine | Boolean | false | false | 是否在控件下有横线 |
| disabled | Boolean | false | false | 禁用控件 |
