beeshell icon indicating copy to clipboard operation
beeshell copied to clipboard

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

Open liberalisman opened this issue 6 years ago • 1 comments

代码如下:

<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 avatar Oct 15 '19 13:10 liberalisman

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

liberalisman avatar Oct 16 '19 01:10 liberalisman