🐞 fix(ID1001378 面料详情页的图片失真):
This commit is contained in:
@@ -18,8 +18,9 @@ interface Param {
|
||||
onClick?: (val: Param['value']) => void
|
||||
round?: boolean
|
||||
name?: string
|
||||
suffix?: string
|
||||
}
|
||||
const LabAndImg = ({ value, onClick, showStatus = false, round = false, name = '', customImageStyle = {} }: Param) => {
|
||||
const LabAndImg = ({ value, onClick, showStatus = false, round = false, name = '', customImageStyle = {}, suffix = '!w200' }: Param) => {
|
||||
const [imgs, setImgs] = useState<string>('')
|
||||
|
||||
// lab是否都是0
|
||||
@@ -35,7 +36,7 @@ const LabAndImg = ({ value, onClick, showStatus = false, round = false, name = '
|
||||
useEffect(() => {
|
||||
if (value?.texture_url) {
|
||||
const imgs = value.texture_url.split(',').map((item) => {
|
||||
return formatImgUrl(item)
|
||||
return formatImgUrl(item, suffix)
|
||||
})
|
||||
setImgs(() => imgs[0])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user