Skip to content

Commit c72d710

Browse files
authored
fix: marker event type (#232)
1 parent 48dcc82 commit c72d710

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/components/Marker/types.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
import type { ILngLat } from '@antv/l7';
22

3+
/**
4+
* 锚点事件类型
5+
*/
6+
export type MarkerEventType = {
7+
data?: MarkerProps['extData'];
8+
lngLat: ILngLat;
9+
target: MouseEvent | TouchEvent;
10+
};
11+
312
/**
413
* 锚点相对位置
514
*/
@@ -44,7 +53,7 @@ export interface MarkerProps {
4453
/** 用户自定义属性,支持任意数据类型,存储 marker 属性信息。*/
4554
extData?: Record<string, any>;
4655
/** 点击事件 */
47-
onClick?: (e: MouseEvent) => void;
56+
onClick?: (e: MarkerEventType) => void;
4857
/** 子组件 */
4958
children?: React.ReactNode;
5059
}

0 commit comments

Comments
 (0)