import React, { Component } from 'react';
import { Tabs, Radio } from 'antd';
import './index.less';
class TabLayout extends Component {
constructor(props) {
super(props);
const key = props.itemList && props.itemList.length > 0 ? props.itemList[0].key : '';
const defaultActiveKey = props.defaultActiveKey || key;
this.state = { defaultActiveKey };
if (defaultActiveKey !== props.defaultActiveKey) this.onClick(defaultActiveKey);
}
onClick(tab) {
if (this.props.onChange) this.props.onChange(tab);
}
getItem(item) {
const { button = false } = this.props;
return button ? (