React-Native resizeMode:';包含';不与世博会合作?
我正在使用resizeMode:'contain',因为图像正在拉伸。但是resizeMode不适用于expo应用程序React-Native resizeMode:';包含';不与世博会合作?,react-native,expo,react-native-stylesheet,React Native,Expo,React Native Stylesheet,我正在使用resizeMode:'contain',因为图像正在拉伸。但是resizeMode不适用于expo应用程序 image: { width: 80, height: 80, borderRadius: 10, resizeMode:'contain', }, <TouchableOpacity onPress={() => onPress({ product })}> <Image source={{ ur
image: {
width: 80,
height: 80,
borderRadius: 10,
resizeMode:'contain',
},
<TouchableOpacity onPress={() => onPress({ product })}>
<Image
source={{ uri: getProductImage(product.images[0].src, 100) }}
style={styles.image}
/>
</TouchableOpacity>[enter image description here][1]
图像:{
宽度:80,
身高:80,
边界半径:10,
resizeMode:“包含”,
},
onPress({product}}}>
[在此处输入图像描述][1]
尝试将
resizeMode='contain'
放在图像
组件中:
使用flex
和“高度:未定义”也检查此方法:
我像这样使用resizeMode={'contain'},但仍然不起作用。像这样使用resizeMode='contain'仍然不起作用还有其他方法使用它吗。在这之前是有效的,但在更新节点_模块之后,属性不起作用。检查flex方法的示例这很好,但我发现图像的高度有问题。这些图片来自API。这能回答你的问题吗?