Skip to content

Commit

Permalink
fix: 组件 AMapEllipse 异步加载了错误的插件
Browse files Browse the repository at this point in the history
  • Loading branch information
xyy94813 committed Sep 20, 2023
1 parent 676d3a4 commit c6edeee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/AMapEllipse/AMapEllipse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const AMapEllipse: FC<AMapEllipseProps> = ({
onTouchend,
}) => {
const initInstance = useCallback((AMap) => new AMap!.Ellipse(), []);
const curInstance = useAMapPluginInstance<AMap.MapType>('MapType', initInstance);
const curInstance = useAMapPluginInstance<AMap.Ellipse>('Ellipse', initInstance);

useSetter<Parameters<AMap.Ellipse['setCenter']>>(curInstance, 'setCenter', center!);
useSetter<Parameters<AMap.Ellipse['setRadius']>>(curInstance, 'setRadius', radius!);
Expand Down

0 comments on commit c6edeee

Please sign in to comment.