import React, { Component } from 'react'; import style from './index.less'; import info2 from './../img/info2.png'; import info3 from './../img/info3.png'; import $ from "jquery"; class AdverseReactions extends Component { constructor(props){ super(props); this.state = { currentIndex: -1 } this.handleMouseLeaveDrug = this.handleMouseLeaveDrug.bind(this); this.handleMouseLeaveImg = this.handleMouseLeaveImg.bind(this); this.setDrugInfo = this.setDrugInfo.bind(this); } changeReact(it, index) { this.props.changeReact(it, index); } handleMouseEnterDrug(index, item) { this.setState({ currentIndex: index, }) } handleMouseLeaveDrug() { this.setState({ currentIndex: -1, }) } handleMouseEnterImg() { this.setState({ hasEnterImg: true }) } handleMouseLeaveImg() { this.setState({ hasEnterImg: false }) } setDrugInfo(item) { const { setDrugInfo } = this.props; setDrugInfo && setDrugInfo(item, 10, 6); } render() { const { icon, titleStyle,titleBg, filter, title, adversReactionList, showDrugInfo, setDrugInfo } = this.props const { currentIndex, hasEnterImg } = this.state return(