index.js 738 Bytes
import React from "react";

export default class NoData extends React.Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  render() {
    const haveNoData={
        position: 'absolute',
        top: '50%',
        left: '50%',
        textAlign: 'center',
        transform: 'translate(-50%, -50%)'
    }
    const img={
      width:'1.51rem',
    }
    const text={
      textAlign: 'center',
      fontSize: '.15rem',
      color: '#666666',
      marginTop:'20px'
    }
    return (
      <div style={haveNoData}>
        <img style={img} src={require('../../assets/image/clientless.png')} alt="" />
        <div style={text}>{this.state.infoText || "当前暂无数据"}</div>
      </div>
    );
  }
}