From 2917f201ec1b32f8c033f0bbf408f1ac1b25f044 Mon Sep 17 00:00:00 2001 From: czm <2192718639@qq.com> Date: Tue, 28 Feb 2023 16:10:51 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(ID1001378=20=E9=9D=A2?= =?UTF-8?q?=E6=96=99=E8=AF=A6=E6=83=85=E9=A1=B5=E7=9A=84=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=A4=B1=E7=9C=9F):?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LabAndImg/index.tsx | 5 +++-- src/pages/details/index.tsx | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/LabAndImg/index.tsx b/src/components/LabAndImg/index.tsx index b8918f4..ebeadd7 100644 --- a/src/components/LabAndImg/index.tsx +++ b/src/components/LabAndImg/index.tsx @@ -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('') // 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]) } diff --git a/src/pages/details/index.tsx b/src/pages/details/index.tsx index 8a8ec41..3df5ad5 100644 --- a/src/pages/details/index.tsx +++ b/src/pages/details/index.tsx @@ -405,6 +405,7 @@ const Details = (props: Params) => {