fix(images): 修正图片展示模式为aspectFit

- 将商品分类页图片组件的mode属性从aspectFill改为aspectFit
- 修改首页图片组件的mode属性以保持图片完整显示
- 防止图片裁剪,提升图片展示效果一致性
This commit is contained in:
2026-07-09 18:06:22 +08:00
parent 9bb8915f66
commit 700b6f865c
2 changed files with 2 additions and 2 deletions

View File

@@ -232,7 +232,7 @@ const IndexPage: React.FC = () => {
<Image <Image
style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%' }} style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%' }}
src={getCompressedImageUrl(item.image)} src={getCompressedImageUrl(item.image)}
mode='aspectFill' mode='aspectFit'
/> />
) : ( ) : (
<View style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%' }} className='bg-gray-100 flex items-center justify-center'> <View style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%' }} className='bg-gray-100 flex items-center justify-center'>

View File

@@ -217,7 +217,7 @@ const CategoryPage: React.FC = () => {
<Image <Image
className='w-full h-full' className='w-full h-full'
src={getCompressedImageUrl(item.image || item.files || '')} src={getCompressedImageUrl(item.image || item.files || '')}
mode='aspectFill' mode='aspectFit'
lazyLoad lazyLoad
/> />
</View> </View>