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