react event 防抖传参
// echarts图表设置完毕后,添加事件监听,才用lodash.js的防抖函数 useEffect(() => { const zrMouseMove = (event) => { console.log('[测试]event', event.event.x, event.event.y, event); }; const zrMouseMoveFn = _.debounce(zrMouseMove,100) if (chartObjRef.current) { chartObjRef.current.getZr().on('mousemove', zrMouseMoveFn); } return () => { chartObjRef.current.getZr().off('mousemove', zrMouseMoveFn); } }, [chartObjRef?.current)