fix: 事件off传参错误

This commit is contained in:
聆一 2020-02-21 15:00:10 +08:00
parent 304302a3ac
commit 9af05f2671
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ export const LayerEvent = React.memo((props: ILayerProps) => {
useEffect(() => {
layer.on(type, handler);
return () => {
layer.off('type', handler);
layer.off(type, handler);
};
}, [type]);
return null;