refactor(ui): 优化药品添加页面的图片选择和显示效果
This commit is contained in:
@@ -432,8 +432,7 @@ export default function AddMedicationScreen() {
|
||||
}
|
||||
|
||||
const result = await ImagePicker.launchImageLibraryAsync({
|
||||
allowsEditing: true,
|
||||
mediaTypes: ImagePicker.MediaTypeOptions.Images,
|
||||
mediaTypes: ['images'],
|
||||
quality: 0.9,
|
||||
});
|
||||
|
||||
@@ -651,7 +650,7 @@ export default function AddMedicationScreen() {
|
||||
>
|
||||
{photoPreview ? (
|
||||
<>
|
||||
<Image source={{ uri: photoPreview }} style={styles.photoPreview} contentFit="cover" />
|
||||
<Image source={{ uri: photoPreview }} style={styles.photoPreview} contentFit="contain" />
|
||||
<View style={styles.photoOverlay}>
|
||||
<Ionicons name="camera" size={18} color="#fff" />
|
||||
<ThemedText style={styles.photoOverlayText}>
|
||||
@@ -1370,7 +1369,7 @@ const styles = StyleSheet.create({
|
||||
photoCard: {
|
||||
borderWidth: 1,
|
||||
borderRadius: 20,
|
||||
height: 180,
|
||||
height: 240,
|
||||
overflow: 'hidden',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user