商城测试版v7
This commit is contained in:
@@ -18,6 +18,11 @@
|
||||
margin-top: 100px;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
.rgb{
|
||||
width: 600px;
|
||||
height: 600px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
image{
|
||||
width:100%;
|
||||
border-radius: 10px;
|
||||
|
||||
@@ -1,25 +1,21 @@
|
||||
import LabAndImg from "@/components/LabAndImg"
|
||||
import { Image, View } from "@tarojs/components"
|
||||
import { View } from "@tarojs/components"
|
||||
import { useMemo } from "react"
|
||||
import styles from './index.module.scss'
|
||||
|
||||
export type colorItem = {
|
||||
title: string,
|
||||
lab: {l:number, a:number, b:number},
|
||||
rgb: {r:number, g:number, b:number},
|
||||
texture_url: string
|
||||
}
|
||||
|
||||
export type colorParams = {
|
||||
value?: colorItem,
|
||||
value?: { backgroundColor: string; }|null,
|
||||
show?: false|true
|
||||
onClose?: () => void
|
||||
}
|
||||
export default ({value, show = false, onClose}: colorParams) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
{show&&<View className={styles.main} catch-move="true" onClick={() => onClose?.()}>
|
||||
<View className={styles.con}>
|
||||
<LabAndImg value={{lab:value?.lab,rgb:value?.rgb,texture_url:value?.texture_url}}/>
|
||||
<View className={styles.name}>{value?.title}</View>
|
||||
<View className={styles.rgb} style={value!}></View>
|
||||
<View className={styles.name}>{'颜色'}</View>
|
||||
</View>
|
||||
</View>}
|
||||
</>
|
||||
|
||||
@@ -239,7 +239,6 @@ export default (props:Params) => {
|
||||
<OrderCount show={showOrderCount} onClose={() => setShowOrderCount(false)} title={productName} productId={productInfo.id}/>
|
||||
</CustomWrapper>
|
||||
<ShopCart show={showCart} onClose={() => setShowCart(false)}/>
|
||||
<Preview value={colorInfo} show={showPreview} onClose={() => setShowPreview(false)}/>
|
||||
<AddCollection show={collectionShow} onAdd={onAdd} onClose={closeCollection}/>
|
||||
<View className='common_safe_area_y'></View>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user