bug(ECX-8041):

This commit is contained in:
zhangjing1
2026-03-04 18:45:39 +08:00
parent 5a4e3fa516
commit e233050f2c
3 changed files with 4 additions and 7 deletions

View File

@@ -87,7 +87,7 @@ function SpImage(props) {
return (
<View
className={classNames('sp-image-container sp-image', props.className)}
style={containerStyle}
style={{ ...containerStyle, ...props.style }}
>
{/* 加载占位区域(未加载时显示) */}
{!state.loadSuccess && (
@@ -148,6 +148,7 @@ SpImage.defaultProps = {
ratio: [],
src: '',
width: '',
style: {},
placeholderColor: 'transparent',
onClick: () => {},
onError: () => {},

View File

@@ -5,7 +5,7 @@
import React, { useEffect, useRef, useMemo } from 'react'
import { useSelector, useDispatch } from 'react-redux'
import Taro, { getCurrentInstance, useShareAppMessage, useShareTimeline } from '@tarojs/taro'
import { View, Text, Swiper, SwiperItem, Video, ScrollView } from '@tarojs/components'
import { View, Text, Swiper, SwiperItem, Video, ScrollView, Image } from '@tarojs/components'
import { useImmer } from 'use-immer'
import { AtFloatLayout, AtButton } from 'taro-ui'
import {
@@ -546,7 +546,7 @@ function EspierDetail(props) {
{info?.imgs?.map((img, idx) => (
<SwiperItem key={`swiperitem__${idx}`}>
<View style={setSwiperCss(img)}>
<SpImage mode='scaleToFill' src={img} className='swiperitem__img' />
<Image mode='scaleToFill' src={img} className='swiperitem__img' />
</View>
</SwiperItem>
))}

View File

@@ -21,10 +21,6 @@
overflow: hidden;
// height: 750px;
.swiperitem__img {
visibility: hidden;
opacity: 0;
}
.sp-image {
width: 100%;
height: 100%;
box-sizing: border-box;