✨ feat(ID1000801): 2.1面料详情页:色号补充涨跌(标准报价前后对比)、更新的日期;
【2.1面料详情页:色号补充涨跌(标准报价前后对比)、更新的日期;】 https://www.tapd.cn/53459131/prong/stories/view/1153459131001000801
This commit is contained in:
committed by
xuan
parent
979373a2f4
commit
14767fed64
@@ -13,12 +13,13 @@ interface Param {
|
||||
rgb?: { r: number; g: number; b: number } // rgb
|
||||
title?: string
|
||||
}
|
||||
customImageStyle?: React.CSSProperties
|
||||
showStatus?: true | false
|
||||
onClick?: (val: Param['value']) => void
|
||||
round?: boolean
|
||||
name?: string
|
||||
}
|
||||
const LabAndImg = ({ value, onClick, showStatus = false, round = false, name = '' }: Param) => {
|
||||
const LabAndImg = ({ value, onClick, showStatus = false, round = false, name = '', customImageStyle = {} }: Param) => {
|
||||
const [imgs, setImgs] = useState<string>('')
|
||||
|
||||
// lab是否都是0
|
||||
@@ -65,12 +66,12 @@ const LabAndImg = ({ value, onClick, showStatus = false, round = false, name = '
|
||||
src={imgs}
|
||||
onError={e => checkLoad(e)}
|
||||
className={styles.labAndImg_image}
|
||||
style={{ borderRadius: round ? '50%' : '' }}
|
||||
style={{ borderRadius: round ? '50%' : '', ...customImageStyle }}
|
||||
></Image>
|
||||
)}
|
||||
{!value.texture_url && rgbStyle && <View className={styles.boxColor} style={{ ...rgbStyle, borderRadius: round ? '50%' : '' }}></View>}
|
||||
{!value.texture_url && rgbStyle && <View className={styles.boxColor} style={{ ...rgbStyle, borderRadius: round ? '50%' : '', ...customImageStyle }}></View>}
|
||||
{!value.texture_url && !rgbStyle && (
|
||||
<Image mode="aspectFill" src={formatImgUrl('')} className={styles.labAndImg_image} style={{ borderRadius: round ? '50%' : '' }} lazyLoad></Image>
|
||||
<Image mode="aspectFill" src={formatImgUrl('')} className={styles.labAndImg_image} style={{ borderRadius: round ? '50%' : '', ...customImageStyle }} lazyLoad></Image>
|
||||
)}
|
||||
{name && <View className={styles.labAndImg_name}>{name}</View>}
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user