Skip to content

Commit

Permalink
feat: 高德地图
Browse files Browse the repository at this point in the history
  • Loading branch information
wkylin committed Jul 20, 2024
1 parent e5c70ce commit d9d3007
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 0 deletions.
79 changes: 79 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"@jiaminghi/data-view-react": "^1.2.5",
"@loadable/component": "^5.16.4",
"@pansy/react-amap": "^2.21.0",
"@react-spring/web": "^9.7.3",
"@react-three/drei": "^9.107.3",
"@react-three/fiber": "^8.16.8",
Expand Down
1 change: 1 addition & 0 deletions src/pages/layout/proSecNav/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const ProSecNav = () => {
{ label: 'Mermaid', key: '/mermaid', icon: <FireOutlined /> },
{ label: 'Dynamic', key: '/dynamic', icon: <QrcodeOutlined /> },
{ label: 'BigScreen', key: '/big-screen', icon: <FireOutlined /> },
{ label: 'ReactAmap', key: '/react-amap', icon: <QrcodeOutlined /> },
{
label: '技术栈',
key: '/sub-act',
Expand Down
13 changes: 13 additions & 0 deletions src/pages/reactAmap/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react'
import FixTabPanel from '@stateless/FixTabPanel'
import { Map } from '@pansy/react-amap'

const ReactAmap = () => (
<FixTabPanel>
<div style={{ height: 500 }}>
<Map center={[108.484886, 34.293777]} />
</div>
</FixTabPanel>
)

export default ReactAmap
9 changes: 9 additions & 0 deletions src/routers/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const PrismRender = lazy(() => import('@pages/prism'))
// const Mermaid = lazy(() => import('@pages/mermaid'))
// const DynamicModal = lazy(() => import('@pages/dynamicModal'))
const BigScreen = lazy(() => import('@pages/bigScreen'))
const ReactAmap = lazy(() => import('@pages/reactAmap'))
const Exception403 = lazy(() => import('@stateless/Exception/exception403'))
const NoMatch = lazy(() => import('@stateless/NoMatch'))

Expand Down Expand Up @@ -169,6 +170,14 @@ const rootRouter = [
auth: false,
element: lazyLoad(BigScreen),
},
{
index: false,
path: 'react-amap',
name: 'react-amap',
key: '/react-amap',
auth: false,
element: lazyLoad(ReactAmap),
},
{
index: false,
path: 'coupons',
Expand Down

0 comments on commit d9d3007

Please sign in to comment.