Skip to content

Commit 50a4f68

Browse files
committed
chore: format code.
1 parent 8076230 commit 50a4f68

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Map/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ export interface MapProps extends BMap.MapOptions, BMap.MapEvents {
100100
* 将全景实例与Map类进行绑定
101101
*/
102102
panorama?: BMap.Panorama;
103-
104-
viewport?:(view: Array<BMap.Point> | BMap.Viewport, viewportOptions: BMap.ViewportOptions)=>void;
103+
104+
viewport?: (view: Array<BMap.Point> | BMap.Viewport, viewportOptions: BMap.ViewportOptions) => void;
105105
}
106106

107107
export type MapChildRenderProps =

src/Polygon/usePolygon.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default function usePolygon(props = {} as UsePolygon) {
3333
enableClicking,
3434
};
3535

36-
useEffect(function () {
36+
useEffect(() => {
3737
if (!BMap || !map) return noop;
3838
const points = (path || []).map((item) => new BMap.Point(item.lng, item.lat));
3939
const instance = new BMap.Polygon(points, opts);
@@ -42,6 +42,7 @@ export default function usePolygon(props = {} as UsePolygon) {
4242
return function () {
4343
map.removeOverlay(instance);
4444
};
45+
// eslint-disable-next-line react-hooks/exhaustive-deps
4546
}, [map, props.path]);
4647

4748
useEffect(() => {

0 commit comments

Comments
 (0)