|
|
@@ -0,0 +1,32 @@ |
|
|
|
import { ScrollView, View } from '@tarojs/components'; |
|
|
|
import React from 'react'; |
|
|
|
import { useSelector } from 'react-redux'; |
|
|
|
import { AtNavBar } from 'taro-ui'; |
|
|
|
import styles from './page.module.scss'; |
|
|
|
|
|
|
|
export default function Page(props) { |
|
|
|
const { wrapperClassName, className, children, headerColor, title = '', leftText } = props; |
|
|
|
const statusBarHeight = useSelector(state => state.app.statusBarHeight); |
|
|
|
return ( |
|
|
|
<View className={[styles.page, wrapperClassName]}> |
|
|
|
<View className={styles.statusBar} style={{ height: `${statusBarHeight}Px`, backgroundColor: headerColor }} /> |
|
|
|
{/* <View className={styles.header} style={{ backgroundColor: headerColor }}> |
|
|
|
<View className={styles.headerLeft}></View> |
|
|
|
<View className={styles.headerCenter}>{title}</View> |
|
|
|
<View className={styles.headerRight} /> |
|
|
|
</View> */} |
|
|
|
<View className={styles.header} style={{ backgroundColor: headerColor }} onClickLeftIcon={() => {}}> |
|
|
|
<AtNavBar |
|
|
|
className={styles.navBar} |
|
|
|
leftIconType={leftText ? "chevron-left" : undefined} |
|
|
|
leftText={leftText} |
|
|
|
> |
|
|
|
<View>{title}</View> |
|
|
|
</AtNavBar> |
|
|
|
</View> |
|
|
|
<View className={[styles.container, className]} style={{ height: `calc(100% - ${statusBarHeight}Px - 44Px)` }}> |
|
|
|
{children} |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
) |
|
|
|
} |