import React from 'react';
import { WeaTab } from 'ecCom';
import "./index.less";

export default class CustomTab extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            selectedKey: "0"
        }
    }
    render() {
        return (<div className="tabWrapper">
            <div className="weaTab">
                {
                    this.props.topTab && <WeaTab
                    datas={this.props.topTab}
                    keyParam="viewcondition" //主键
                    selectedKey={this.state.selectedKey}
                    onChange={(v) => {
                        this.setState({selectedKey: v})
                        this.props.onChange(v);
                    }}
                />
                }
                {
                    this.props.leftOperation && this.props.leftOperation
                }
            
            </div>
            <div className="tabSearchWrapper">
                {
                    this.props.searchOperationItem
                }
            </div>
        </div>)
    }
}