-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
blog日常开发笔记日常开发笔记
Description
如果让宽度自适应内容? Auto width of flex column
flex:1
布局有时候会让字体无法撑开
<View>
<View style={{ flex: 1 }}>
<Text style={{ flex: 1 }}>width auto by content</Text>
</View>
</View>
需要改成
<View>
- <View style={{ flex: 1 }}>
- <Text style={{ flex: 1 }}>width auto by content</Text>
+ <View style={{ flex: undefined }}>
+ <Text style={{ flex: undefined }}>width auto by content</Text>
</View>
</View>
Metadata
Metadata
Assignees
Labels
blog日常开发笔记日常开发笔记