diff --git a/packages/plugins/map/src/client/components/AMap.tsx b/packages/plugins/map/src/client/components/AMap.tsx index 91d83ac1d..a06220b40 100644 --- a/packages/plugins/map/src/client/components/AMap.tsx +++ b/packages/plugins/map/src/client/components/AMap.tsx @@ -11,6 +11,7 @@ import Search from './Search'; import { useMemoizedFn } from 'ahooks'; import { useMapConfiguration } from '../hooks'; import { useHistory } from 'react-router'; +import { SyncOutlined } from '@ant-design/icons'; interface AMapComponentProps { accessKey: string; @@ -177,6 +178,12 @@ const AMapComponent: React.FC = (props) => { }); }; + const onFocusOverlay = () => { + if (overlay.current) { + map.current.setFitView([overlay.current]); + } + }; + // 编辑时 useEffect(() => { if (!aMap.current) return; @@ -301,6 +308,24 @@ const AMapComponent: React.FC = (props) => { height: '500px', }} > + {/* bottom: 20px; right: 50%; transform: translateX(50%); z-index: 2; */} +
+ +
{!disabled ? ( <> @@ -330,6 +355,7 @@ const AMapComponent: React.FC = (props) => { }} onClick={onReset} type="primary" + danger > {t('Clear')}