<ReactEcharts
className={styles.barBox}
option={this.getBarOption(barData)}
ref={(e) => {
this.echartsReact = e;
}}
// onEvents={{ click: (e) => this.onBarClick(e) }}
onChartReady={(e) => this.onChartReadyCallback(e)}
// lazyUpdate={true}
notMerge={true}
// theme={'theme_name'}
// onChartReady={this.onChartReadyCallback}
// opts={}
/>
onEvents引起每次刷新闪烁
解决方法
通过onChartReady回调,拿到实例去绑定事件;通过onEvents的话,图标组件内部重新渲染图标去绑定事件了