| 17 | } |
| 18 | |
| 19 | render () { |
| 20 | return ( |
| 21 | <ScrollView |
| 22 | style={styles.body}> |
| 23 | <Text style={styles.header}>左对齐</Text> |
| 24 | <Form> |
| 25 | <Form.Item |
| 26 | style={{ paddingVertical: 13 }} |
| 27 | label='姓名' |
| 28 | hasLine> |
| 29 | <Input value={this.state.name} placeholder='请输入姓名' onChange={(value) => { |
| 30 | this.setState({ |
| 31 | name: value |
| 32 | }) |
| 33 | }} /> |
| 34 | </Form.Item> |
| 35 | |
| 36 | <Form.Item |
| 37 | style={{ paddingVertical: 13 }} |
| 38 | label='住址'> |
| 39 | <Input value={this.state.address} placeholder='请输入地址' onChange={(value) => { |
| 40 | this.setState({ |
| 41 | address: value |
| 42 | }) |
| 43 | }} /> |
| 44 | </Form.Item> |
| 45 | </Form> |
| 46 | |
| 47 | <Text style={styles.header}>右对齐</Text> |
| 48 | <Form> |
| 49 | <Form.Item |
| 50 | style={{ paddingVertical: 13 }} |
| 51 | label='姓名' |
| 52 | hasLine> |
| 53 | <Input textAlign='right' value={this.state.name} placeholder='请输入姓名' onChange={(value) => { |
| 54 | this.setState({ |
| 55 | name: value |
| 56 | }) |
| 57 | }} /> |
| 58 | </Form.Item> |
| 59 | |
| 60 | <Form.Item |
| 61 | style={{ paddingVertical: 13 }} |
| 62 | label='住址'> |
| 63 | <Input |
| 64 | textAlign='right' |
| 65 | value={this.state.address} |
| 66 | placeholder='请输入地址' |
| 67 | onChange={(value) => { |
| 68 | this.setState({ |
| 69 | address: value |
| 70 | }) |
| 71 | }} |
| 72 | /> |
| 73 | </Form.Item> |
| 74 | </Form> |
| 75 | |
| 76 | <Text style={styles.header}>多行</Text> |