diff --git a/src/components/amap/location/index.less b/src/components/amap/location/index.less index 8661c5fbb..cd21cb5a6 100644 --- a/src/components/amap/location/index.less +++ b/src/components/amap/location/index.less @@ -7,6 +7,7 @@ &-list { height: 500px; + overflow: auto; &-header { display: flex; @@ -15,7 +16,8 @@ } &-checked { - color: var(--oak-brand-color); + color: var(--oak-primary-color); + font-size: 24px; } &-loadingBox { @@ -24,16 +26,5 @@ justify-content: center; min-height: 100px; } - - &-noData { - display: flex; - flex-direction: row; - justify-content: center; - min-height: 100px; - align-items: center; - color: var(--oak-text-color-placeholder); - align-self: center; - } - } } \ No newline at end of file diff --git a/src/components/amap/location/index.tsx b/src/components/amap/location/index.tsx index dafe6c1d8..0a8b2cfe2 100644 --- a/src/components/amap/location/index.tsx +++ b/src/components/amap/location/index.tsx @@ -1,23 +1,22 @@ import React, { useState, useEffect, useRef } from 'react'; import { - Dialog, + Modal, Row, Col, - List, - Input, - InputValue, + ModalProps, Button, - Loading, - DialogProps, -} from 'tdesign-react'; -import { SearchIcon, CheckCircleFilledIcon } from 'tdesign-icons-react'; + Input, + List, + Empty, + Spin, +} from 'antd'; +import { SearchOutlined, CheckCircleFilled } from '@ant-design/icons'; import { Geolocation, GeolocationProps } from '@uiw/react-amap'; import Map from './../map'; import PositionPicker from './PositionPicker' import './index.less'; -const { ListItem, ListItemMeta } = List; export type LocationProps = { akey: string; @@ -32,7 +31,7 @@ export type LocationProps = { ) => void; geolocationProps?: GeolocationProps; useGeolocation?: boolean; - dialogProps?: DialogProps; + dialogProps?: ModalProps; }; export type Poi = { @@ -72,8 +71,8 @@ const Location = (props: LocationProps) => { } = props; const prefixCls = 'oak'; - const searchRef = useRef(); - const [searchValue, setSearchValue] = useState(''); + const searchRef = useRef(); + const [searchValue, setSearchValue] = useState(''); const [refresh, setRefresh] = useState(true); // 点击poi不触发setPositionPickerResult const [mode, setMode] = useState('dragMap'); @@ -224,15 +223,18 @@ const Location = (props: LocationProps) => { return ( - { + open={visible} + onCancel={() => { onClose && onClose(); clearData(); }} - onConfirm={() => { + onOk={() => { if (!currentPoi) { return; } @@ -245,8 +247,8 @@ const Location = (props: LocationProps) => { }} >
- - + + { )} - +
{ ref={searchRef} placeholder="搜索地点" value={searchValue} - clearable - onChange={(value) => { - setSearchValue(value); + allowClear + onChange={(e) => { + setSearchValue(e.target.value); }} - onClear={() => { - setSearchValue(''); - }} - prefixIcon={} + prefix={} onFocus={() => { setMode('searchPoi'); setFocus(true); @@ -321,8 +320,7 @@ const Location = (props: LocationProps) => { {mode === 'searchPoi' && (
); })} @@ -382,15 +379,10 @@ const Location = (props: LocationProps) => {
-
)} @@ -406,26 +398,23 @@ const Location = (props: LocationProps) => { ); }} > - - ) : ( -
- ) - } + + {currentPoi?.id === + poi.id && ( + + )} +
, + ]} > - { poi.address }`} /> -
+
); }) - : show && ( -
- 无搜素结果 -
+ : show && + !searchLoading && ( + )} )} @@ -455,7 +446,7 @@ const Location = (props: LocationProps) => { -
+ ); }; diff --git a/src/components/func/debugPanel/web.module.less b/src/components/func/debugPanel/web.module.less index ab16b7613..e0ba4cdf1 100644 --- a/src/components/func/debugPanel/web.module.less +++ b/src/components/func/debugPanel/web.module.less @@ -1,9 +1,5 @@ .container { - height: 100vh; display: flex; - flex-direction: column; - justify-content: 'center'; - align-items: 'center'; } diff --git a/src/components/func/debugPanel/web.tsx b/src/components/func/debugPanel/web.tsx index 74c0714ba..c6913192a 100644 --- a/src/components/func/debugPanel/web.tsx +++ b/src/components/func/debugPanel/web.tsx @@ -1,7 +1,6 @@ import React from 'react'; -import { Button, Space, Drawer, DialogPlugin } from 'tdesign-react'; -import { ChevronUpIcon } from 'tdesign-icons-react'; -// import { saveAs } from 'file-saver'; +import { Button, Space, Drawer, Modal, Tooltip } from 'antd'; +import { UpOutlined } from '@ant-design/icons'; export default function render(this: any) { const { placement = 'bottom', style = {} } = this.props; @@ -9,14 +8,14 @@ export default function render(this: any) { return ( - - - + + + + + + + - - + + + + + + + + + + + + +