From d7ac1ba828c2f5a2d273d5216a23d1f4e2ab3704 Mon Sep 17 00:00:00 2001 From: cuiyuan Date: Thu, 9 Aug 2018 14:48:03 +0800 Subject: [PATCH] remove bind --- web/src/index/component/sidebar.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/web/src/index/component/sidebar.js b/web/src/index/component/sidebar.js index a403b55..fa24ff9 100755 --- a/web/src/index/component/sidebar.js +++ b/web/src/index/component/sidebar.js @@ -94,9 +94,6 @@ export default class Sidebar extends Component { showViewSummaryTrigger(e, name) { e.preventDefault(); - e.stopPropagation(); - e.nativeEvent.stopImmediatePropagation(); - e.cancelBubble = true; this.state.showViewSummaryTrigger[name] = true; this.setState({ showViewSummaryTrigger: this.state.showViewSummaryTrigger @@ -105,9 +102,6 @@ export default class Sidebar extends Component { hideViewSummaryTrigger(e, name) { e.preventDefault(); - e.stopPropagation(); - e.nativeEvent.stopImmediatePropagation(); - e.cancelBubble = true; this.state.showViewSummaryTrigger[name] = false; this.setState({ showViewSummaryTrigger: this.state.showViewSummaryTrigger @@ -198,8 +192,8 @@ export default class Sidebar extends Component { return (
  • this.dataClick(e, item.name)} - onMouseOver={(e, name) => this.showViewSummaryTrigger.bind(this, e, item.name)} - onMouseOut={(e, name) => this.hideViewSummaryTrigger.bind(this, e, item.name)} + onMouseOver={(e, name) => this.showViewSummaryTrigger(e, item.name)} + onMouseOut={(e, name) => this.hideViewSummaryTrigger(e, item.name)} title={item.name} className={item.name === this.props.dataName ? 'active' : ''} ref={'li' + item.name}