mirror of https://gitee.com/antv-l7/antv-l7
fix: 事件off传参错误
This commit is contained in:
parent
304302a3ac
commit
9af05f2671
|
@ -14,7 +14,7 @@ export const LayerEvent = React.memo((props: ILayerProps) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
layer.on(type, handler);
|
layer.on(type, handler);
|
||||||
return () => {
|
return () => {
|
||||||
layer.off('type', handler);
|
layer.off(type, handler);
|
||||||
};
|
};
|
||||||
}, [type]);
|
}, [type]);
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue