Meituan-Dianping / beeshell

React Native 组件库
MIT License
1.8k stars 280 forks source link

FORM 表单的 Item 无法调整高度???? #72

Open liberalisman opened 5 years ago

liberalisman commented 5 years ago

代码如下:

<Form style={{ marginLeft: 10,marginRight: 10,borderRadius : 4,marginTop: 10}}>
                    <Form.Item
                        style={{height: 30}}
                        label={
                            <View
                                style={{
                                flexDirection: 'row',
                                alignItems: 'center',

                                flex: 1,
                                marginRight: 10
                                }}>
                                <Text style={{ color: 'red', marginRight: 5 }}>*</Text>
                                <Text style={{fontSize:14}}>CPU</Text>
                            </View>
                        }
                        hasLine
                    >
                        <Input 
                            style={{fontSize:14}}
                            testID='name'  
                            placeholder='请输入CPU型号' 
                            textAlign='right' 
                            inputStyle={{ textAlign: 'right' }} 
                            onChange={(value) => {  }} />              
                    </Form.Item>
                </Form>
liberalisman commented 5 years ago

经过测试 paddingVertical 属性是生效的,直接在 style 中设置 Height 是有问题的