封装图片组件

This commit is contained in:
2022-06-10 15:41:33 +08:00
parent 8197140027
commit 38a3b348bd
57 changed files with 2899 additions and 181 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ import Taro from "@tarojs/taro"
import { goLink } from "@/common/common"
import styles from './index.module.scss'
import { formatHashTag, formatImgUrl } from "@/common/fotmat"
import LabAndImg from "../LabAndImg"
type Params = {
desStatus?: true|false,
@@ -14,7 +15,7 @@ export default ({desStatus = true, productList = []}:Params) => {
{productList?.map(item => {
return <View className={styles.products_item} onClick={() => goLink(`/pages/details/index?id=${item.id}`)}>
<View className={styles.item_img}>
<Image src={formatImgUrl(item.texture_url)}/>
<LabAndImg value={{lab:item.lab,rgb:item.rgb,texture_url:item.texture_url}}/>
<View className={styles.num}>{item.product_color_count}色</View>
</View>
<View className={styles.item_con}>