Files
mini-programs/src/components/CustomerNavbarBack/index.tsx
juguohong 4e68db2476 列表
2025-08-31 20:24:42 +08:00

33 lines
895 B
TypeScript

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;