下单功能基本完成
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
.main{
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0,0,0, 0.8);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
.con{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
margin-top: 200px;
|
||||
image{
|
||||
width:100%;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.name {
|
||||
width: 488px;
|
||||
height: 72px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-size: 26px;
|
||||
border-radius: 20px;
|
||||
line-height: 72px;
|
||||
margin-top: 10px;
|
||||
background-color: rgba(0,0,0, 0.5);
|
||||
padding: 0 10px;
|
||||
@include common_ellipsis
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { Image, View } from "@tarojs/components"
|
||||
import styles from './index.module.scss'
|
||||
|
||||
export type colorItem = {
|
||||
title: string,
|
||||
img: string
|
||||
}
|
||||
export type colorParams = {
|
||||
value?: colorItem,
|
||||
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}>
|
||||
<Image mode="aspectFill" src={value?.img as string}/>
|
||||
<View className={styles.name}>{value?.title}</View>
|
||||
</View>
|
||||
</View>}
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user