/* eslint-disable object-curly-newline */ import React, { Component } from 'react'; import { Row, Col, Tabs } from 'antd'; import TimeLineChart from '../TimelineChart'; import NumberInfo from '../../NumberInfo'; import Pie from '../Pie'; import styles from '../index.less'; import * as utils from '../../../utils/utils'; const { TabPane } = Tabs; class TimeLineGroup extends Component { constructor(props) { super(props); this.state = { offlineCard: styles.offlineCard, tabGroup: styles.tabGroup, currentTabKey: utils.isNotEmptyArr(props.data) ? props.data[0].x : '', }; } handleTabChange = (key) => { this.setState({ currentTabKey: key, }); }; render() { const { offlineCard, currentTabKey, tabGroup } = this.state; const { data, titleMap, subTitle, yUnit } = this.props; const TabGroup = ({ tabData, currentTabKey: currentKey }) => ( ); return ( { data.map(item => ( } key={item.x} > )) } ); } } export default TimeLineGroup;