import React, { Component } from 'react'; import './index.less'; import Module from '../Module'; import Tabs from '../Tabs'; import Icon from '../Icon'; class QAItem extends Component { constructor(props) { super(props); this.Text = null; this.state = { show: false, more: false }; this.checkHeight(); } checkHeight() { if (this.Text != null) { console.log(this.Text.offsetHeight); if (this.Text.offsetHeight > 80) { this.setState({ more: true }); } } else { setTimeout(() => { this.checkHeight(); }, 1); } } render() { const { data } = this.props; const { show, more } = this.state; return (