列表
This commit is contained in:
50
src/components/CustomerNavbarBack/index.module.scss
Normal file
50
src/components/CustomerNavbarBack/index.module.scss
Normal file
@@ -0,0 +1,50 @@
|
||||
.customerNavbarBack {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 999;
|
||||
background-color: #ffffff;
|
||||
|
||||
.container {
|
||||
padding-left: 17px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 1px;
|
||||
height: 25px;
|
||||
background-color: #0000000F;
|
||||
}
|
||||
|
||||
.back {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.change {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.cityWrapper {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.city {
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.infoWrapper {
|
||||
line-height: 12px;
|
||||
}
|
||||
|
||||
.info {
|
||||
font-weight: 400;
|
||||
font-size: 10px;
|
||||
line-height: 12px;
|
||||
color: #3C3C4399;
|
||||
}
|
||||
}
|
||||
32
src/components/CustomerNavbarBack/index.tsx
Normal file
32
src/components/CustomerNavbarBack/index.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import { View, Image } from "@tarojs/components";
|
||||
import img from "@/config/images";
|
||||
import styles from "./index.module.scss";
|
||||
import { useGlobalState } from "@/store/global";
|
||||
import Taro from "@tarojs/taro";
|
||||
|
||||
const ListHeader = () => {
|
||||
const { statusNavbarHeightInfo } = useGlobalState();
|
||||
const { statusBarHeight, navbarHeight, totalHeight } = statusNavbarHeightInfo;
|
||||
const handleBack = () => {
|
||||
Taro.navigateBack();
|
||||
}
|
||||
|
||||
return (
|
||||
<View
|
||||
className={styles.customerNavbarBack}
|
||||
style={{ height: `${totalHeight}px` }}
|
||||
>
|
||||
<View
|
||||
className={styles.container}
|
||||
style={{
|
||||
height: `${navbarHeight}px`,
|
||||
paddingTop: `${statusBarHeight}px`,
|
||||
}}
|
||||
>
|
||||
{/* back */}
|
||||
<Image src={img.ICON_LIST_SEARCH_BACK} className={styles.back} onClick={handleBack} />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
export default ListHeader;
|
||||
Reference in New Issue
Block a user