import Taro, { Component } from '@tarojs/taro' import { View, Text, Image } from '@tarojs/components' import './index.scss' import { ComponentClass } from 'react' type PageOwnProps = { showBack?: boolean showhome?: boolean onBackClick?: any onHomeClick?: any title?: any className?: any unShow?: boolean } type PageState = {} type IProps = PageOwnProps interface Index { props: IProps; } class Index extends Component { static options = { addGlobalClass: true } state = { } handleBackClick = () => { this.props.onBackClick() } handleHomeClick = () => { this.props.onHomeClick() } render() { const { title, className, unShow, showBack, showhome } = this.props return ( { !unShow && { showBack && } { showhome && } {title} } ) } } export default Index as ComponentClass