UNPKG

taro-material

Version:

Mini Program components that implement Google's Material Design.

54 lines (41 loc) 1.17 kB
import Nerv from "nervjs"; import Taro, { Component } from "@tarojs/taro-h5"; import { View } from '@tarojs/components'; import RMTypography from "../Typography/index"; import RMIcon from "../Icon/index"; import './NoData.scss'; // import NoDataImg from '../../../images/NoData.png' class RMNoData extends Component { componentWillUnmount() {} componentDidShow() {} componentDidHide() {} render() { const { title, background, color } = this.props; const style = {}; if (background) { style.background = background; } if (color) { style.color = color; } return <View className="root" style={style}> <View className="content"> <View className="img"> {/* <Image className='img' mode='aspectFit' src={NoDataImg}/> */} <RMIcon fontSize="inherit" color="inherit"> mood_bad </RMIcon> </View> <RMTypography color={color} fontSize={12}> {title} </RMTypography> </View> </View>; } } RMNoData.defaultProps = { title: '暂时没有数据', background: '', color: '' }; export default RMNoData;