fix(images): 修正图片展示模式为aspectFit
- 将商品分类页图片组件的mode属性从aspectFill改为aspectFit - 修改首页图片组件的mode属性以保持图片完整显示 - 防止图片裁剪,提升图片展示效果一致性
This commit is contained in:
@@ -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'>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user