index.js
522 Bytes
import Taro, {Component} from '@tarojs/taro';
import {View} from '@tarojs/components';
import './index.scss';
export default class PageTitle extends Component {
constructor(props) {
super(props);
this.state = {};
}
static defaultProps = {
pageTitle: '',
selfClass: ''
}
render() {
let {selfClass, pageTitle} = this.props;
return (
<View className={selfClass ? `${selfClass} page-title` : 'page-title'}>{pageTitle}</View>
)
}
}